[Bug 255872] [PATCH] netgraph/bluetooth/hci: Fix a use after free in le_connection_complete

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri May 14 12:35:48 UTC 2021


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

            Bug ID: 255872
           Summary: [PATCH] netgraph/bluetooth/hci: Fix a use after free
                    in le_connection_complete
           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 224936
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=224936&action=edit
add goto out if ng_hci_lp_con_ind() error.

Bug File: sys/netgraph/bluetooth/hci/ng_hci_evnt.c

In function le_connection_complete, con is freed via ng_hci_free_con(con) at
line 530. But the freed con is still used later.

This free operation performs if an error happened in ng_hci_lp_con_ind(), i
think the developer forgot to goto out branch and cause this uaf. My patch fixs
this error.

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


More information about the freebsd-bugs mailing list