Skip to content

Commit 695dd0d

Browse files
committed
signal/x86: In emulate_vsyscall force a signal instead of calling do_exit
Directly calling do_exit with a signal number has the problem that all of the side effects of the signal don't happen, such as killing all of the threads of a process instead of just the calling thread. So replace do_exit(SIGSYS) with force_fatal_sig(SIGSYS) which causes the signal handling to take it's normal path and work as expected. Cc: Andy Lutomirski <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Eric W. Biederman <[email protected]>
1 parent 086ec44 commit 695dd0d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/entry/vsyscall/vsyscall_64.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ bool emulate_vsyscall(unsigned long error_code,
226226
if ((!tmp && regs->orig_ax != syscall_nr) || regs->ip != address) {
227227
warn_bad_vsyscall(KERN_DEBUG, regs,
228228
"seccomp tried to change syscall nr or ip");
229-
do_exit(SIGSYS);
229+
force_fatal_sig(SIGSYS);
230+
return true;
230231
}
231232
regs->orig_ax = -1;
232233
if (tmp)

0 commit comments

Comments
 (0)