summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2019-10-05 22:29:01 +0100
committerColin Watson <cjwatson@debian.org>2019-10-05 22:30:21 +0100
commit699f6971bc8a142016c60e712839a9722886522f (patch)
treec2c1ade36e56d72b63d91cc4168eaa2b203b5c7b /debian
parent07252689f247e0ea037027ebd17b09b33ce1f5b4 (diff)
parentceefaa8ee80b63c0890d24c42369dc51880f53ea (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-dpm4
-rw-r--r--debian/changelog5
-rw-r--r--debian/patches/seccomp-handle-shm.patch38
-rw-r--r--debian/patches/series1
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
261d2706623ed144ee9cbd212d13eeba202a7ce26 2ceefaa8ee80b63c0890d24c42369dc51880f53ea
361d2706623ed144ee9cbd212d13eeba202a7ce26 3ceefaa8ee80b63c0890d24c42369dc51880f53ea
4102062f825fb26a74295a1c089c00c4c4c76b68a 4102062f825fb26a74295a1c089c00c4c4c76b68a
5102062f825fb26a74295a1c089c00c4c4c76b68a 5102062f825fb26a74295a1c089c00c4c4c76b68a
6openssh_8.0p1.orig.tar.gz 6openssh_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
8openssh (1:8.0p1-6) unstable; urgency=medium 13openssh (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 @@
1From ceefaa8ee80b63c0890d24c42369dc51880f53ea Mon Sep 17 00:00:00 2001
2From: Lonnie Abelbeck <lonnie@abelbeck.com>
3Date: Tue, 1 Oct 2019 09:05:09 -0500
4Subject: Deny (non-fatal) shmget/shmat/shmdt in preauth privsep child.
5
6New wait_random_seeded() function on OpenSSL 1.1.1d uses shmget, shmat, and shmdt
7in the preauth codepath, deny (non-fatal) in seccomp_filter sandbox.
8
9Bug: https://github.com/openssh/openssh-portable/pull/149
10Bug-Debian: https://bugs.debian.org/941663
11Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=3ef92a657444f172b61f92d5da66d94fa8265602
12Last-Update: 2019-10-05
13
14Patch-Name: seccomp-handle-shm.patch
15---
16 sandbox-seccomp-filter.c | 9 +++++++++
17 1 file changed, 9 insertions(+)
18
19diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c
20index 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
27conch-old-privkey-format.patch 27conch-old-privkey-format.patch
28revert-ipqos-defaults.patch 28revert-ipqos-defaults.patch
29fix-utimensat-test.patch 29fix-utimensat-test.patch
30seccomp-handle-shm.patch