Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | From a6c0847582305aaab122d54b635954829812922f Mon Sep 17 00:00:00 2001 |
| 2 | From: Alex Kiernan <alexk@zuma.ai> |
| 3 | Date: Thu, 30 Dec 2021 09:32:26 +0000 |
| 4 | Subject: [PATCH 1/2] ntpd/ntp_sandbox.c: allow newfstatat on all archs for |
| 5 | glibc-2.34 in seccomp filter |
| 6 | |
| 7 | On Yocto Poky, newfstatat is used on (at least) arm64, x86_64 and |
| 8 | riscv64: |
| 9 | |
| 10 | 2021-12-30T09:32:04 ntpd[341]: ERR: SIGSYS: got a trap. |
| 11 | 2021-12-30T09:32:04 ntpd[341]: ERR: SIGSYS/seccomp bad syscall 262/0xc000003e |
| 12 | |
| 13 | Upstream-Status: Backport [https://gitlab.com/NTPsec/ntpsec/-/commit/a6c0847582305aaab122d54b635954829812922f] |
| 14 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> |
| 15 | Signed-off-by: Alex Kiernan <alexk@zuma.ai> |
| 16 | --- |
| 17 | ntpd/ntp_sandbox.c | 2 +- |
| 18 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 19 | |
| 20 | diff --git a/ntpd/ntp_sandbox.c b/ntpd/ntp_sandbox.c |
| 21 | index 3d6bccdfcf77..1ae82a671344 100644 |
| 22 | --- a/ntpd/ntp_sandbox.c |
| 23 | +++ b/ntpd/ntp_sandbox.c |
| 24 | @@ -349,6 +349,7 @@ int scmp_sc[] = { |
| 25 | SCMP_SYS(lseek), |
| 26 | SCMP_SYS(membarrier), /* Needed on Alpine 3.11.3 */ |
| 27 | SCMP_SYS(munmap), |
| 28 | + SCMP_SYS(newfstatat), |
| 29 | SCMP_SYS(open), |
| 30 | #ifdef __NR_openat |
| 31 | SCMP_SYS(openat), /* SUSE */ |
| 32 | @@ -452,7 +453,6 @@ int scmp_sc[] = { |
| 33 | #endif |
| 34 | #if defined(__aarch64__) |
| 35 | SCMP_SYS(faccessat), |
| 36 | - SCMP_SYS(newfstatat), |
| 37 | SCMP_SYS(renameat), |
| 38 | SCMP_SYS(linkat), |
| 39 | SCMP_SYS(unlinkat), |
| 40 | -- |
| 41 | 2.34.1 |
| 42 | |