diff options
Diffstat (limited to 'debian/patches-applied/057_pam_unix_passwd_OOM_check')
-rw-r--r-- | debian/patches-applied/057_pam_unix_passwd_OOM_check | 21 |
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..? */ |