[Bug 255869] [PATCH] kern: Fix a use after free bug in sodealloc

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri May 14 11:45:04 UTC 2021


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

            Bug ID: 255869
           Summary: [PATCH] kern: Fix a use after free bug in sodealloc
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: lylgood at foxmail.com

Created attachment 224933
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=224933&action=edit
adds a variable cr_uidinfo

Bug File: sys/kern/uipc_socket.c

In Function sodealloc, so->so_cred is freed via crfree() at line 479.
But, the freed so->so_cred is dereferenced by so->so_cred->cr_uidinfo at line
486 and 489, which are uaf bugs.

My patch adds a variable cr_uidinfo to avoid the uaf bugs.

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


More information about the freebsd-bugs mailing list