Module Name: src
Committed By: christos
Date: Thu Apr 14 16:42:09 UTC 2016
Modified Files:
src/crypto/external/bsd/openssh/dist: session.c
Log Message:
If PAM is configured to read user-specified environment variables
and UseLogin=yes in sshd_config, then a hostile local user may
attack /bin/login via LD_PRELOAD or similar environment variables
set via PAM.
CVE-2015-8325, found by Shayan Sadigh, via Colin Watson
https://anongit.mindrot.org/openssh.git/commit/?\
id=85bdcd7c92fe7ff133bbc4e10a65c91810f88755
XXX: pullup-7
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/crypto/external/bsd/openssh/dist/session.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/external/bsd/openssh/dist/session.c
diff -u src/crypto/external/bsd/openssh/dist/session.c:1.18 src/crypto/external/bsd/openssh/dist/session.c:1.19
--- src/crypto/external/bsd/openssh/dist/session.c:1.18 Thu Mar 10 20:55:00 2016
+++ src/crypto/external/bsd/openssh/dist/session.c Thu Apr 14 12:42:09 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: session.c,v 1.18 2016/03/11 01:55:00 christos Exp $ */
+/* $NetBSD: session.c,v 1.19 2016/04/14 16:42:09 christos Exp $ */
/* $OpenBSD: session.c,v 1.280 2016/02/16 03:37:48 djm Exp $ */
/*
@@ -36,7 +36,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: session.c,v 1.18 2016/03/11 01:55:00 christos Exp $");
+__RCSID("$NetBSD: session.c,v 1.19 2016/04/14 16:42:09 christos Exp $");
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/un.h>
@@ -1226,7 +1226,7 @@ do_setup_env(Session *s, const char *she
* Pull in any environment variables that may have
* been set by PAM.
*/
- if (options.use_pam) {
+ if (options.use_pam && !options.use_login) {
char **p;
p = fetch_pam_child_environment();