[Bug 255862] [PATCH] dev/acpica: Fix a double free in acpi_pci_link_route_irqs
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri May 14 09:18:13 UTC 2021
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: bugs at FreeBSD.org
Reporter: lylgood at foxmail.com
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.
More information about the freebsd-bugs
mailing list