diff options
author | Colin Watson <cjwatson@debian.org> | 2016-04-13 08:48:22 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2016-04-13 08:48:25 +0100 |
commit | c538beb27bf0892bce07fba749cc9f309089e838 (patch) | |
tree | d1e44e962068df2509f9d634b9b7424a300763cb /debian/patches | |
parent | 9f7ab403be0043d1b160999835af0a3783413775 (diff) | |
parent | 7f3fb4e5fdddc6600e70ae663c21511fbcf2c64c (diff) |
CVE-2015-8325: Ignore PAM environment vars when UseLogin=yes.
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/CVE-2015-8325.patch | 33 | ||||
-rw-r--r-- | debian/patches/series | 1 |
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 @@ | |||
1 | From 7f3fb4e5fdddc6600e70ae663c21511fbcf2c64c Mon Sep 17 00:00:00 2001 | ||
2 | From: Damien Miller <djm@mindrot.org> | ||
3 | Date: Wed, 13 Apr 2016 10:39:57 +1000 | ||
4 | Subject: ignore PAM environment vars when UseLogin=yes | ||
5 | |||
6 | If PAM is configured to read user-specified environment variables | ||
7 | and UseLogin=yes in sshd_config, then a hostile local user may | ||
8 | attack /bin/login via LD_PRELOAD or similar environment variables | ||
9 | set via PAM. | ||
10 | |||
11 | CVE-2015-8325, found by Shayan Sadigh, via Colin Watson | ||
12 | |||
13 | Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=85bdcd7c92fe7ff133bbc4e10a65c91810f88755 | ||
14 | Last-Update: 2016-04-13 | ||
15 | |||
16 | Patch-Name: CVE-2015-8325.patch | ||
17 | --- | ||
18 | session.c | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/session.c b/session.c | ||
22 | index 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 | |||
25 | sigstop.patch | 25 | sigstop.patch |
26 | systemd-readiness.patch | 26 | systemd-readiness.patch |
27 | debian-config.patch | 27 | debian-config.patch |
28 | CVE-2015-8325.patch | ||