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

            Bug ID: 255862
           Summary: [PATCH] dev/acpica: Fix a double free in
                    acpi_pci_link_route_irqs
           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 224925
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=224925&action=edit
add a status check

Bug File: sys/dev/acpica/acpi_pci_link.c

In function acpi_pci_link_route_irqs, srsbuf->Pointer is freed via AcpiOsFree()
in the callee status = acpi_pci_link_srs_from_links(sc, &srsbuf), and then the
callee returns a FAILURE status.

But the returned status has not been checked, that causes srsbuf->Pointer is
freed again at line 916 and 876, which are double free bugs.

My patch adds a check on the returned status of acpi_pci_link_srs_from_links()
to avoid the double free.

-- 
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