The branch, master has been updated
       via  627de92 Add check for invalid data size.
      from  6400f3e s3: Fix some debug msgs in ntlm_auth

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


- Log -----------------------------------------------------------------
commit 627de92521cb20c5387656946bcbf5ecf3be5332
Author: Jeremy Allison <[email protected]>
Date:   Wed Sep 15 10:50:50 2010 -0700

    Add check for invalid data size.
    
    Jeremy.

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

Summary of changes:
 source3/smbd/nttrans.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index b602a51..9b3085c 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -2237,7 +2237,7 @@ static void call_nt_transact_ioctl(connection_struct 
*conn,
                 */
                struct dom_sid sid;
                uid_t uid;
-               size_t sid_len = MIN(data_count-4,SID_MAX_SIZE);
+               size_t sid_len;
 
                DEBUG(10,("FSCTL_FIND_FILES_BY_SID: called on 
FID[0x%04X]\n",fidnum));
 
@@ -2245,6 +2245,13 @@ static void call_nt_transact_ioctl(connection_struct 
*conn,
                        return;
                }
 
+               if (data_count < 8) {
+                       reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
+                       return;
+               }
+
+               sid_len = MIN(data_count-4,SID_MAX_SIZE);
+
                /* unknown 4 bytes: this is not the length of the sid :-(  */
                /*unknown = IVAL(pdata,0);*/
 


-- 
Samba Shared Repository

Reply via email to