diff options
author | Colin Watson <cjwatson@debian.org> | 2020-01-11 23:34:11 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2020-01-11 23:35:35 +0000 |
commit | 1e27566efe47a292e9401251f6b27a5eac1a63b1 (patch) | |
tree | b8fc96b1b82a9236bb9447e2fae012abbaa00fda /debian/patches | |
parent | 284dd49ce99669f2e70bc09eebf6ca685f3b9f58 (diff) | |
parent | 489e04f2c23327dd95981327d8757144a4e574af (diff) |
Deny (non-fatal) ipc in preauth privsep child
Closes: #946242
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/sandbox-seccomp-ipc.patch | 33 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/sandbox-seccomp-ipc.patch b/debian/patches/sandbox-seccomp-ipc.patch new file mode 100644 index 000000000..cbeb6613d --- /dev/null +++ b/debian/patches/sandbox-seccomp-ipc.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 489e04f2c23327dd95981327d8757144a4e574af Mon Sep 17 00:00:00 2001 | ||
2 | From: Jeremy Drake <github@jdrake.com> | ||
3 | Date: Fri, 11 Oct 2019 18:31:05 -0700 | ||
4 | Subject: Deny (non-fatal) ipc in preauth privsep child. | ||
5 | |||
6 | As noted in openssh/openssh-portable#149, i386 does not have have | ||
7 | _NR_shmget etc. Instead, it has a single ipc syscall (see man 2 ipc, | ||
8 | https://linux.die.net/man/2/ipc). Add this syscall, if present, to the | ||
9 | list of syscalls that seccomp will deny non-fatally. | ||
10 | |||
11 | Bug-Debian: https://bugs.debian.org/946242 | ||
12 | Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=30f704ebc0e9e32b3d12f5d9e8c1b705fdde2c89 | ||
13 | Last-Update: 2020-01-11 | ||
14 | |||
15 | Patch-Name: sandbox-seccomp-ipc.patch | ||
16 | --- | ||
17 | sandbox-seccomp-filter.c | 3 +++ | ||
18 | 1 file changed, 3 insertions(+) | ||
19 | |||
20 | diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c | ||
21 | index 999c46c9f..0914e48ba 100644 | ||
22 | --- a/sandbox-seccomp-filter.c | ||
23 | +++ b/sandbox-seccomp-filter.c | ||
24 | @@ -177,6 +177,9 @@ static const struct sock_filter preauth_insns[] = { | ||
25 | #ifdef __NR_shmdt | ||
26 | SC_DENY(__NR_shmdt, EACCES), | ||
27 | #endif | ||
28 | +#ifdef __NR_ipc | ||
29 | + SC_DENY(__NR_ipc, EACCES), | ||
30 | +#endif | ||
31 | |||
32 | /* Syscalls to permit */ | ||
33 | #ifdef __NR_brk | ||
diff --git a/debian/patches/series b/debian/patches/series index 8dbd1355a..59c651095 100644 --- a/debian/patches/series +++ b/debian/patches/series | |||
@@ -27,3 +27,4 @@ regress-2020.patch | |||
27 | sandbox-seccomp-clock_nanosleep.patch | 27 | sandbox-seccomp-clock_nanosleep.patch |
28 | sandbox-seccomp-clock_nanosleep_time64.patch | 28 | sandbox-seccomp-clock_nanosleep_time64.patch |
29 | sandbox-seccomp-clock_gettime64.patch | 29 | sandbox-seccomp-clock_gettime64.patch |
30 | sandbox-seccomp-ipc.patch | ||