x86/CET: Update vfork to prevent child return
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 16 Sep 2020 23:00:14 +0000 (16:00 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 15 Oct 2020 11:00:36 +0000 (04:00 -0700)
commitc02695d776406faaf63418e4e80c4a7023af0b4f
tree0d7183d167d642375e062ad18bce2ccbdc2939bf
parentb8b53b338f6da91e86d115a39da860cefac736ad
x86/CET: Update vfork to prevent child return

Child of vfork should either call _exit or one of the exec family of
functions.  But normally there is nothing to prevent child of vfork from
return of the vfork-calling function.  Simpilfy x86 vfork when shadow
stack is in use to introduce mismatched shadow stack in child of vfork
to trigger SIGSEGV when the child returns from the function in which
vfork was called.
sysdeps/unix/sysv/linux/i386/vfork.S
sysdeps/unix/sysv/linux/x86/Makefile
sysdeps/unix/sysv/linux/x86/tst-cet-vfork-1.c [new file with mode: 0644]
sysdeps/unix/sysv/linux/x86_64/vfork.S