]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
nsswitch/libwbclient: Zero memory in libwbclient gitlab/master
authorPavel Filipenský <pfilipensky@samba.org>
Mon, 8 Dec 2025 15:09:53 +0000 (16:09 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 8 Jan 2026 12:59:02 +0000 (12:59 +0000)
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jan  8 12:59:02 UTC 2026 on atb-devel-224

nsswitch/libwbclient/wbc_util.c

index d97e00db383a33d1d02a7b53b30d7fcb74704c14..59204b4deac5a22fe38dd91047531e825fed7166 100644 (file)
@@ -848,6 +848,11 @@ static void wbcNamedBlobDestructor(void *ptr)
 
        while (b->name != NULL) {
                free(discard_const_p(char, b->name));
+               /*
+                * This targets sensitive data like "session_key". To make the
+                * implementation simple, we zero every wbcNamedBlob.
+                */
+               BURN_PTR_SIZE(b->blob.data, b->blob.length);
                free(b->blob.data);
                b += 1;
        }