dovetail: Adjust EXIT_SYSCALL_* values to avoid clash with seccomp
PATCH v2 1/1 dovetail: Adjust EXIT_SYSCALL_* values to avoid clash with seccomp
From: Jan Kiszka <[email protected]>
__secure_computing, called by syscall_trace_enter, returns -1 when a call should be skipped. We must avoid that this is interpreted as EXIT_SYSCALL_OOB in the dovetail case.
Fixes, e.g., crashes of Chrome in sandbox mode.
Signed-off-by Jan Kiszka <[email protected]>
--- include/linux/entry-common.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
include/linux/entry-common.h +4 -3
@@ -64,10 +64,11 @@/* * Status codes of syscall entry when Dovetail is enabled. Must not -* conflict with valid syscall numbers. +* conflict with valid syscall numbers. And with -1 which seccomp uses +* to skip an syscall. */ -#define EXIT_SYSCALL_OOB (-1) -#define EXIT_SYSCALL_TAIL (-2) +#define EXIT_SYSCALL_OOB (-2) +#define EXIT_SYSCALL_TAIL (-3)/** * arch_check_user_regs - Architecture specific sanity check for user mode regs
Signature · 1 line
2.31.1
Philippe Gerum
AppliedQuoted 22 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
__secure_computing, called bysyscall_trace_enter, returns -1 when a call should be skipped. We must avoid that this is interpreted asEXIT_SYSCALL_OOBin the dovetail case.Fixes, e.g., crashes of Chrome in sandbox mode.
Signed-off-by Jan Kiszka <[email protected]>--- include/linux/entry-common.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)include/linux/entry-common.h +0
-1@@ -64,10 +64,11 @@/* * Status codes of syscall entry when Dovetail is enabled. Must not -* conflict with valid syscall numbers.
include/linux/entry-common.h line 74
Quoted 10 lines
include/linux/entry-common.h +4
-2+* conflict with valid syscall numbers. And with -1 which seccomp uses +* to skip an syscall. */ -#define EXIT_SYSCALL_OOB (-1) -#define EXIT_SYSCALL_TAIL (-2) +#define EXIT_SYSCALL_OOB (-2) +#define EXIT_SYSCALL_TAIL (-3)/** * arch_check_user_regs - Architecture specific sanity check for user mode regs
Merged, thanks.
Signature · 1 line
Philippe.