aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_unix
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2024-01-17 15:32:21 +0100
committerDmitry V. Levin <ldv@strace.io>2024-01-21 08:00:00 +0000
commit1a189b090270cf930b62ca005ad7e287e12fe04c (patch)
tree0f2234869ada3be26a91c28bc7e944e655775a33 /modules/pam_unix
parent0e80c788850c4a699e4bfb3ab7b44e354b8fdfd7 (diff)
downloadpam-1a189b090270cf930b62ca005ad7e287e12fe04c.tar.gz
pam-1a189b090270cf930b62ca005ad7e287e12fe04c.tar.bz2
pam-1a189b090270cf930b62ca005ad7e287e12fe04c.zip
pam_unix: cleanse crypt data
Cleanse the crypt data also in the failure branch to sanitize in case of partial data being written.
Diffstat (limited to 'modules/pam_unix')
-rw-r--r--modules/pam_unix/bigcrypt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/pam_unix/bigcrypt.c b/modules/pam_unix/bigcrypt.c
index 1b32c3f2..296e01f7 100644
--- a/modules/pam_unix/bigcrypt.c
+++ b/modules/pam_unix/bigcrypt.c
@@ -109,6 +109,7 @@ char *bigcrypt(const char *key, const char *salt)
pam_overwrite_array(keybuf);
free(dec_c2_cryptbuf);
#ifdef HAVE_CRYPT_R
+ pam_overwrite_object(cdata);
free(cdata);
#endif
return NULL;