aboutsummaryrefslogtreecommitdiff
path: root/debian/patches-applied/057_pam_unix_passwd_OOM_check
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2019-01-02 12:24:44 -0800
committerSteve Langasek <vorlon@debian.org>2019-01-02 12:27:24 -0800
commita6f4ab0bebc76acf85cc0244bd21c1036009c28c (patch)
treedf0d6a57d2b91ab9038e8d7b0d62f28c2daa66db /debian/patches-applied/057_pam_unix_passwd_OOM_check
parent10b6243f4664747e815372070142d6c5853176da (diff)
downloadpam-a6f4ab0bebc76acf85cc0244bd21c1036009c28c.tar.gz
pam-a6f4ab0bebc76acf85cc0244bd21c1036009c28c.tar.bz2
pam-a6f4ab0bebc76acf85cc0244bd21c1036009c28c.zip
fix-up commit for grafting svn history onto git history
Diffstat (limited to 'debian/patches-applied/057_pam_unix_passwd_OOM_check')
-rw-r--r--debian/patches-applied/057_pam_unix_passwd_OOM_check21
1 files changed, 21 insertions, 0 deletions
diff --git a/debian/patches-applied/057_pam_unix_passwd_OOM_check b/debian/patches-applied/057_pam_unix_passwd_OOM_check
new file mode 100644
index 00000000..afae12e1
--- /dev/null
+++ b/debian/patches-applied/057_pam_unix_passwd_OOM_check
@@ -0,0 +1,21 @@
+Index: Linux-PAM/modules/pam_unix/pam_unix_passwd.c
+===================================================================
+--- Linux-PAM/modules/pam_unix/pam_unix_passwd.c.orig
++++ Linux-PAM/modules/pam_unix/pam_unix_passwd.c
+@@ -1323,6 +1323,16 @@
+ }
+ }
+
++ /* A null pointer here indicates a memory failure
++ somewhere along the way; don't set the password to
++ NULL! */
++ if (tpass == NULL) {
++ pam_syslog(pamh, LOG_CRIT,
++ "out of memory for password");
++ pass_new = pass_old = NULL; /* tidy up */
++ return PAM_BUF_ERR;
++ }
++
+ D(("password processed"));
+
+ /* update the password database(s) -- race conditions..? */