Bug 3291 - Uninitialized memory in cli_session_setup_guest
Summary: Uninitialized memory in cli_session_setup_guest
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Client Tools (show other bugs)
Version: 3.0.20b
Hardware: Other All
: P3 trivial
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-30 00:59 UTC by Volker Lendecke
Modified: 2005-11-30 10:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Lendecke 2005-11-30 00:59:59 UTC
When running winbind under valgrind I'm seeing usage of uninitialized memory when connecting to a DC as guest. It's the SMB header that is not correctly zero'ed. Proposed patch:

Index: libsmb/cliconnect.c
===================================================================
--- libsmb/cliconnect.c (Revision 11959)
+++ libsmb/cliconnect.c (Arbeitskopie)
@@ -163,6 +163,8 @@
        char *p;
        uint32 capabilities = cli_session_setup_capabilities(cli);

+       memset(cli->outbuf, '\0', smb_size);
+
        set_message(cli->outbuf,13,0,True);
        SCVAL(cli->outbuf,smb_com,SMBsesssetupX);
        cli_setup_packet(cli);
Comment 1 Volker Lendecke 2005-11-30 10:30:04 UTC
r11975