Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 May 2021 14:28:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 255881] [PATCH] netsmb: Fix a use after free in smb_t2_request_int
Message-ID:  <bug-255881-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255881

            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: bugs@FreeBSD.org
          Reporter: lylgood@foxmail.com

Created attachment 224944
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D224944&action=
=3Dedit
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.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255881-227>