https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255881

            Bug ID: 255881
           Summary: [PATCH] netsmb: Fix a use after free in
                    smb_t2_request_int
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 224944
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=224944&action=edit
adds a variable "sr_flags" to avoid the uaf bug.

Bug File: sys/netsmb/smb_rq.c

In function smb_t2_request_int, rqp is allocated by smb_rq_alloc(...,&rqp) and
with flags SMBR_ALLOCED set. In the freerq branch of smb_t2_request_int,
smb_rq_done() is called to free the rqp. But later, the freed rqp is
dereferenced by rqp->sr_flags, which is a uaf bug.

My patch adds a variable "sr_flags" to avoid the uaf bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to