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 | |
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')
-rw-r--r-- | debian/.git-dpm | 4 | ||||
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | debian/patches/seccomp-handle-shm.patch | 38 | ||||
-rw-r--r-- | debian/patches/series | 1 |
4 files changed, 46 insertions, 2 deletions
diff --git a/debian/.git-dpm b/debian/.git-dpm index a00414acf..6b01a8e76 100644 --- a/debian/.git-dpm +++ b/debian/.git-dpm | |||
@@ -1,6 +1,6 @@ | |||
1 | # see git-dpm(1) from git-dpm package | 1 | # see git-dpm(1) from git-dpm package |
2 | 61d2706623ed144ee9cbd212d13eeba202a7ce26 | 2 | ceefaa8ee80b63c0890d24c42369dc51880f53ea |
3 | 61d2706623ed144ee9cbd212d13eeba202a7ce26 | 3 | ceefaa8ee80b63c0890d24c42369dc51880f53ea |
4 | 102062f825fb26a74295a1c089c00c4c4c76b68a | 4 | 102062f825fb26a74295a1c089c00c4c4c76b68a |
5 | 102062f825fb26a74295a1c089c00c4c4c76b68a | 5 | 102062f825fb26a74295a1c089c00c4c4c76b68a |
6 | openssh_8.0p1.orig.tar.gz | 6 | openssh_8.0p1.orig.tar.gz |
diff --git a/debian/changelog b/debian/changelog index bae206cf9..4577011ee 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -3,6 +3,11 @@ openssh (1:8.0p1-7) UNRELEASED; urgency=medium | |||
3 | [ Daniel Kahn Gillmor ] | 3 | [ Daniel Kahn Gillmor ] |
4 | * runit: Correct typo in comment. | 4 | * runit: Correct typo in comment. |
5 | 5 | ||
6 | [ Colin Watson ] | ||
7 | * Apply upstream patch to deny (non-fatally) shmget/shmat/shmdt in preauth | ||
8 | privsep child, coping with changes in OpenSSL 1.1.1d that broke OpenSSH | ||
9 | on Linux kernels before 3.19 (closes: #941663). | ||
10 | |||
6 | -- Colin Watson <cjwatson@debian.org> Wed, 28 Aug 2019 21:19:41 +0100 | 11 | -- Colin Watson <cjwatson@debian.org> Wed, 28 Aug 2019 21:19:41 +0100 |
7 | 12 | ||
8 | openssh (1:8.0p1-6) unstable; urgency=medium | 13 | openssh (1:8.0p1-6) unstable; urgency=medium |
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 | ||
diff --git a/debian/patches/series b/debian/patches/series index 7ca779801..4af8d8861 100644 --- a/debian/patches/series +++ b/debian/patches/series | |||
@@ -27,3 +27,4 @@ fix-interop-tests.patch | |||
27 | conch-old-privkey-format.patch | 27 | conch-old-privkey-format.patch |
28 | revert-ipqos-defaults.patch | 28 | revert-ipqos-defaults.patch |
29 | fix-utimensat-test.patch | 29 | fix-utimensat-test.patch |
30 | seccomp-handle-shm.patch | ||