dovetail: Adjust EXIT_SYSCALL_* values to avoid clash with seccomp
PATCH 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.
---
"Fixes" is my observation - Yuta-san, please confirm also for your setup.
include/linux/entry-common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/entry-common.h +2 -2
@@ -66,8 +66,8 @@* Status codes of syscall entry when Dovetail is enabled. Must not * conflict with valid syscall numbers. */ -#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
Hi Jan-san
Thanks for the fix.
I checked, and the browser now works fine with xenomai3.2 dovetail.
Thank you for your quick response.
It was very helpful.
Yuta Ando
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Friday, November 12, 2021 3:57 AM
To: Philippe Gerum <[email protected]>
Cc: Xenomai <[email protected]>; Ando Yuta <[email protected]>
Subject: [PATCH] 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.
---
"Fixes" is my observation - Yuta-san, please confirm also for your setup.
include/linux/entry-common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/entry-common.h +2 -2
@@ -66,8 +66,8 @@* Status codes of syscall entry when Dovetail is enabled. Must not * conflict with valid syscall numbers. */ -#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
--
2.31.1
Quoted 22 lines · Jan Kiszka via Xenomai
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.
Reported-by Ando Yuta <[email protected]>Signed-off-by Jan Kiszka <[email protected]>---
"Fixes" is my observation - Yuta-san, please confirm also for your setup.
include/linux/entry-common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/linux/entry-common.h +0
-0
include/linux/entry-common.h line 67
Quoted 2 lines
include/linux/entry-common.h +0
-0@@ -66,8 +66,8 @@* Status codes of syscall entry when Dovetail is enabled. Must not * conflict with valid syscall numbers.
Maybe extend this comment why -1 can not be used here?
Quoted 8 lines
include/linux/entry-common.h +2
-2*/ -#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
Quoted 18 lines · Florian (T RDA IOT SES-DE)
Quoted 17 lines · Jan Kiszka via Xenomai
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.
Reported-by Ando Yuta <[email protected]>Signed-off-by Jan Kiszka <[email protected]>---
"Fixes" is my observation - Yuta-san, please confirm also for your setup.
include/linux/entry-common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 10 lines
include/linux/entry-common.h line 67
Quoted 7 lines
include/linux/entry-common.h +0
-0@@ -66,8 +66,8 @@* Status codes of syscall entry when Dovetail is enabled. Must not * conflict with valid syscall numbers. Maybe extend this comment why -1 can not be used here?
Good point.
Jan
Quoted 9 lines
Quoted 8 lines
include/linux/entry-common.h +2
-2*/ -#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 · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux