The branch, master has been updated
       via  6c0a4b19fe9 nsswitch: Do not leak memory in wbinfo_pam_logon() of 
wbinfo
      from  3f82b8530a2 vfs_streams_xattr: Fix CID 1667321 REVERSE_INULL

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6c0a4b19fe9cbcf91289c9e97d8d6b65433f1810
Author: Andreas Schneider <[email protected]>
Date:   Wed Oct 22 11:47:43 2025 +0200

    nsswitch: Do not leak memory in wbinfo_pam_logon() of wbinfo
    
    We need to always free the memory, not only if verbose mode is wanted.
    
    Direct leak of 40 byte(s) in 1 object(s) allocated from:
        #0 0x7f4df73215a3 in calloc (/lib64/libasan.so.8+0x1215a3) (BuildId: 
388ee9ac193f74c177c6f52988d2d0dab110de41)
        #1 0x7f4df712833f in wbcAllocateMemory 
../../nsswitch/libwbclient/wbclient.c:216
        #2 0x7f4df712d996 in wbc_create_logon_info 
../../nsswitch/libwbclient/wbc_pam.c:326
        #3 0x7f4df712d996 in wbcCtxLogonUser 
../../nsswitch/libwbclient/wbc_pam.c:1288
        #4 0x7f4df712dda5 in wbcLogonUser 
../../nsswitch/libwbclient/wbc_pam.c:1311
        #5 0x00000021c014 in wbinfo_pam_logon ../../nsswitch/wbinfo.c:1995
        #6 0x00000021c014 in main ../../nsswitch/wbinfo.c:3209
        #7 0x7f4df422b2fa in __libc_start_call_main (/lib64/libc.so.6+0x2b2fa) 
(BuildId: 8523b213e7586a93ab00f6dd476418b1e521e62c)
        #8 0x7ffc9aee3e03  ([stack]+0x20e03)
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>
    
    Autobuild-User(master): Anoop C S <[email protected]>
    Autobuild-Date(master): Thu Oct 30 09:11:26 UTC 2025 on atb-devel-224

-----------------------------------------------------------------------

Summary of changes:
 nsswitch/wbinfo.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index 39d03f7bd1b..2f040728723 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -2037,10 +2037,9 @@ static bool wbinfo_pam_logon(char *username, bool 
verbose)
                        d_printf(" %s", buf);
                }
                d_printf("\n");
-
-               wbcFreeMemory(info);
-               info = NULL;
        }
+       wbcFreeMemory(info);
+       info = NULL;
 
        wbcFreeMemory(params.blobs);
 


-- 
Samba Shared Repository

Reply via email to