The branch, v4-15-test has been updated
       via  d7ea8282448 s3:smbd: Out-by-4 error in smbd read reply max_send 
clamp
      from  604f94704f3 ldb: version 2.3.4

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-15-test


- Log -----------------------------------------------------------------
commit d7ea828244830ef70ea406f7c41ce1fc7801c281
Author: Robert Sprowson <webpa...@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 <webpa...@sprow.co.uk>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Noel Power <noel.po...@suse.com>
    
    Autobuild-User(master): Jeremy Allison <j...@samba.org>
    Autobuild-Date(master): Wed Jun  8 19:50:08 UTC 2022 on sn-devel-184
    
    (cherry picked from commit 174a76cc27f25120af5a86bee3f26d9afad87d8f)
    
    Autobuild-User(v4-15-test): Jule Anger <jan...@samba.org>
    Autobuild-Date(v4-15-test): Fri Jun 10 08:29:52 UTC 2022 on sn-devel-184

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

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 1e3104f58f2..879d5b2ae21 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -3853,7 +3853,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 "
@@ -3949,7 +3949,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

Reply via email to