diff options
Diffstat (limited to 'debian/patches/CVE-2015-8325.patch')
-rw-r--r-- | debian/patches/CVE-2015-8325.patch | 33 |
1 files changed, 33 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(); | ||