diff options
author | Colin Watson <cjwatson@debian.org> | 2019-10-05 22:29:01 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-10-05 22:30:21 +0100 |
commit | 699f6971bc8a142016c60e712839a9722886522f (patch) | |
tree | c2c1ade36e56d72b63d91cc4168eaa2b203b5c7b /debian/patches/seccomp-handle-shm.patch | |
parent | 07252689f247e0ea037027ebd17b09b33ce1f5b4 (diff) | |
parent | ceefaa8ee80b63c0890d24c42369dc51880f53ea (diff) |
Deny (non-fatal) shmget/shmat/shmdt in preauth privsep child
This copes with changes in OpenSSL 1.1.1d that broke OpenSSH on Linux
kernels before 3.19.
Closes: #941663
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 | ||