Blame openssh-7.2p2-CVE-2015-8325.patch
|
Jakub Jelen |
cf4e3a |
From 85bdcd7c92fe7ff133bbc4e10a65c91810f88755 Mon Sep 17 00:00:00 2001
|
|
Jakub Jelen |
cf4e3a |
From: Damien Miller <djm@mindrot.org>
|
|
Jakub Jelen |
cf4e3a |
Date: Wed, 13 Apr 2016 10:39:57 +1000
|
|
Jakub Jelen |
cf4e3a |
Subject: ignore PAM environment vars when UseLogin=yes
|
|
Jakub Jelen |
cf4e3a |
|
|
Jakub Jelen |
cf4e3a |
If PAM is configured to read user-specified environment variables
|
|
Jakub Jelen |
cf4e3a |
and UseLogin=yes in sshd_config, then a hostile local user may
|
|
Jakub Jelen |
cf4e3a |
attack /bin/login via LD_PRELOAD or similar environment variables
|
|
Jakub Jelen |
cf4e3a |
set via PAM.
|
|
Jakub Jelen |
cf4e3a |
|
|
Jakub Jelen |
cf4e3a |
CVE-2015-8325, found by Shayan Sadigh, via Colin Watson
|
|
Jakub Jelen |
cf4e3a |
---
|
|
Jakub Jelen |
cf4e3a |
session.c | 2 +-
|
|
Jakub Jelen |
cf4e3a |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Jakub Jelen |
cf4e3a |
|
|
Jakub Jelen |
cf4e3a |
diff --git a/session.c b/session.c
|
|
Jakub Jelen |
cf4e3a |
index 4859245..4653b09 100644
|
|
Jakub Jelen |
cf4e3a |
--- a/session.c
|
|
Jakub Jelen |
cf4e3a |
+++ b/session.c
|
|
Jakub Jelen |
cf4e3a |
@@ -1322,7 +1322,7 @@ do_setup_env(Session *s, const char *shell)
|
|
Jakub Jelen |
cf4e3a |
* Pull in any environment variables that may have
|
|
Jakub Jelen |
cf4e3a |
* been set by PAM.
|
|
Jakub Jelen |
cf4e3a |
*/
|
|
Jakub Jelen |
cf4e3a |
- if (options.use_pam) {
|
|
Jakub Jelen |
cf4e3a |
+ if (options.use_pam && !options.use_login) {
|
|
Jakub Jelen |
cf4e3a |
char **p;
|
|
Jakub Jelen |
cf4e3a |
|
|
Jakub Jelen |
cf4e3a |
p = fetch_pam_child_environment();
|
|
Jakub Jelen |
cf4e3a |
--
|
|
Jakub Jelen |
cf4e3a |
cgit v0.11.2
|
|
Jakub Jelen |
cf4e3a |
|
|
Jakub Jelen |
cf4e3a |
|