smbd: Correctly return INFO_LENGTH_MISMATCH for smb1
authorVolker Lendecke <vl@samba.org>
Tue, 27 Aug 2013 09:40:19 +0000 (09:40 +0000)
committerKarolin Seeger <kseeger@samba.org>
Fri, 6 Sep 2013 08:48:59 +0000 (10:48 +0200)
This is required if the client offered less buffer than the fixed portion
of the info level data requires

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10106
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 1b1935b876a14154ef74e447bf53eb7cd0a5dde9)

source3/smbd/trans2.c

index 101adead5ca211cd7abd04e2aa06d212c28e8634..2f2bbf6e0672f951e94acf734e4541b50630f9dd 100644 (file)
@@ -5589,6 +5589,10 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
                reply_nterror(req, status);
                return;
        }
+       if (fixed_portion > max_data_bytes) {
+               reply_nterror(req, NT_STATUS_INFO_LENGTH_MISMATCH);
+               return;
+       }
 
        send_trans2_replies(conn, req, NT_STATUS_OK, params, param_size, *ppdata, data_size,
                            max_data_bytes);