@@ -1,28 +0,0 @@
1−From 85bdcd7c92fe7ff133bbc4e10a65c91810f88755 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: [PATCH] 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− session.c | 2 +-
14− 1 file changed, 1 insertion(+), 1 deletion(-)
15−
16−diff --git a/session.c b/session.c
17−index 4859245..4653b09 100644
18−--- a/session.c
19−+++ b/session.c
20−@@ -1322,7 +1322,7 @@ do_setup_env(Session *s, const char *shell)
21− * Pull in any environment variables that may have
22− * been set by PAM.
23− */
24−- if (options.use_pam) {
25−+ if (options.use_pam && !options.use_login) {
26− char **p;
27−
28− p = fetch_pam_child_environment();