diff options
Diffstat (limited to 'debian/patches/seccomp-handle-shm.patch')
-rw-r--r-- | debian/patches/seccomp-handle-shm.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/patches/seccomp-handle-shm.patch b/debian/patches/seccomp-handle-shm.patch new file mode 100644 index 000000000..7ad068190 --- /dev/null +++ b/debian/patches/seccomp-handle-shm.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From ceefaa8ee80b63c0890d24c42369dc51880f53ea Mon Sep 17 00:00:00 2001 | ||
2 | From: Lonnie Abelbeck <lonnie@abelbeck.com> | ||
3 | Date: Tue, 1 Oct 2019 09:05:09 -0500 | ||
4 | Subject: Deny (non-fatal) shmget/shmat/shmdt in preauth privsep child. | ||
5 | |||
6 | New wait_random_seeded() function on OpenSSL 1.1.1d uses shmget, shmat, and shmdt | ||
7 | in the preauth codepath, deny (non-fatal) in seccomp_filter sandbox. | ||
8 | |||
9 | Bug: https://github.com/openssh/openssh-portable/pull/149 | ||
10 | Bug-Debian: https://bugs.debian.org/941663 | ||
11 | Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=3ef92a657444f172b61f92d5da66d94fa8265602 | ||
12 | Last-Update: 2019-10-05 | ||
13 | |||
14 | Patch-Name: seccomp-handle-shm.patch | ||
15 | --- | ||
16 | sandbox-seccomp-filter.c | 9 +++++++++ | ||
17 | 1 file changed, 9 insertions(+) | ||
18 | |||
19 | diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c | ||
20 | index ef4de8c65..e8f31555e 100644 | ||
21 | --- a/sandbox-seccomp-filter.c | ||
22 | +++ b/sandbox-seccomp-filter.c | ||
23 | @@ -149,6 +149,15 @@ static const struct sock_filter preauth_insns[] = { | ||
24 | #ifdef __NR_stat64 | ||
25 | SC_DENY(__NR_stat64, EACCES), | ||
26 | #endif | ||
27 | +#ifdef __NR_shmget | ||
28 | + SC_DENY(__NR_shmget, EACCES), | ||
29 | +#endif | ||
30 | +#ifdef __NR_shmat | ||
31 | + SC_DENY(__NR_shmat, EACCES), | ||
32 | +#endif | ||
33 | +#ifdef __NR_shmdt | ||
34 | + SC_DENY(__NR_shmdt, EACCES), | ||
35 | +#endif | ||
36 | |||
37 | /* Syscalls to permit */ | ||
38 | #ifdef __NR_brk | ||