[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Wed Jun 8 19:51:02 UTC 2022


The branch, master has been updated
       via  174a76cc27f s3:smbd: Out-by-4 error in smbd read reply max_send clamp
      from  27ceb1c3ad7 tdb: version 1.4.7

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


- Log -----------------------------------------------------------------
commit 174a76cc27f25120af5a86bee3f26d9afad87d8f
Author: Robert Sprowson <webpages at sprow.co.uk>
Date:   Sun Jul 19 12:59:00 2020 +0100

    s3:smbd: Out-by-4 error in smbd read reply max_send clamp
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14443
    
    Signed-off-by: Robert Sprowson <webpages at sprow.co.uk>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Noel Power <noel.power at suse.com>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Wed Jun  8 19:50:08 UTC 2022 on sn-devel-184

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

Summary of changes:
 source3/smbd/smb1_reply.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb1_reply.c b/source3/smbd/smb1_reply.c
index 140d03242c3..6dfc636c9d8 100644
--- a/source3/smbd/smb1_reply.c
+++ b/source3/smbd/smb1_reply.c
@@ -2844,7 +2844,7 @@ static void reply_lockread_locked(struct tevent_req *subreq)
 	/*
 	 * However the requested READ size IS affected by max_send. Insanity.... JRA.
 	 */
-	maxtoread = req->xconn->smb1.sessions.max_send - (smb_size + 5*2 + 3);
+	maxtoread = req->xconn->smb1.sessions.max_send - (MIN_SMB_SIZE + 5*2 + 3);
 
 	if (numtoread > maxtoread) {
 		DBG_WARNING("requested read size (%zu) is greater than "
@@ -2940,7 +2940,7 @@ void reply_read(struct smb_request *req)
 	/*
 	 * The requested read size cannot be greater than max_send. JRA.
 	 */
-	maxtoread = xconn->smb1.sessions.max_send - (smb_size + 5*2 + 3);
+	maxtoread = xconn->smb1.sessions.max_send - (MIN_SMB_SIZE + 5*2 + 3);
 
 	if (numtoread > maxtoread) {
 		DEBUG(0,("reply_read: requested read size (%u) is greater than maximum allowed (%u/%u). \


-- 
Samba Shared Repository



More information about the samba-cvs mailing list