summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2016-04-13 08:48:22 +0100
committerColin Watson <cjwatson@debian.org>2016-04-13 08:48:25 +0100
commitc538beb27bf0892bce07fba749cc9f309089e838 (patch)
treed1e44e962068df2509f9d634b9b7424a300763cb /debian/patches
parent9f7ab403be0043d1b160999835af0a3783413775 (diff)
parent7f3fb4e5fdddc6600e70ae663c21511fbcf2c64c (diff)
CVE-2015-8325: Ignore PAM environment vars when UseLogin=yes.
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/CVE-2015-8325.patch33
-rw-r--r--debian/patches/series1
2 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/CVE-2015-8325.patch b/debian/patches/CVE-2015-8325.patch
new file mode 100644
index 000000000..de2c33577
--- /dev/null
+++ b/debian/patches/CVE-2015-8325.patch
@@ -0,0 +1,33 @@
1From 7f3fb4e5fdddc6600e70ae663c21511fbcf2c64c Mon Sep 17 00:00:00 2001
2From: Damien Miller <djm@mindrot.org>
3Date: Wed, 13 Apr 2016 10:39:57 +1000
4Subject: ignore PAM environment vars when UseLogin=yes
5
6If PAM is configured to read user-specified environment variables
7and UseLogin=yes in sshd_config, then a hostile local user may
8attack /bin/login via LD_PRELOAD or similar environment variables
9set via PAM.
10
11CVE-2015-8325, found by Shayan Sadigh, via Colin Watson
12
13Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=85bdcd7c92fe7ff133bbc4e10a65c91810f88755
14Last-Update: 2016-04-13
15
16Patch-Name: CVE-2015-8325.patch
17---
18 session.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/session.c b/session.c
22index f246b8a..8ab9814 100644
23--- a/session.c
24+++ b/session.c
25@@ -1317,7 +1317,7 @@ do_setup_env(Session *s, const char *shell)
26 * Pull in any environment variables that may have
27 * been set by PAM.
28 */
29- if (options.use_pam) {
30+ if (options.use_pam && !options.use_login) {
31 char **p;
32
33 p = fetch_pam_child_environment();
diff --git a/debian/patches/series b/debian/patches/series
index e5821f627..b5c9fb392 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -25,3 +25,4 @@ gnome-ssh-askpass2-icon.patch
25sigstop.patch 25sigstop.patch
26systemd-readiness.patch 26systemd-readiness.patch
27debian-config.patch 27debian-config.patch
28CVE-2015-8325.patch