mirror of
https://github.com/opnsense/src.git
synced 2026-02-25 02:42:54 -05:00
We do not include sys/rman.h and so machine/resource.h ends up not being included by the time pci_private.h is included. This means PCI_RES_BUS is never defined, and so the sc_bus member of pci_softc is not present when compiling ofw_pci, resulting in the wrong softc size being passed to DEFINE_CLASS_1 and thus any attempts by pci(4) to access that member are out-of-bounds reads or writes. This is pretty fragile; arguably pci_private.h should be including sys/rman.h, but this is the minimal needed change to fix the bug whilst maintaining the status quo. Found by: CHERI Reported by: andrew |
||
|---|---|---|
| .. | ||
| ofw_bus.h | ||
| ofw_bus_if.m | ||
| ofw_bus_subr.c | ||
| ofw_bus_subr.h | ||
| ofw_console.c | ||
| ofw_cpu.c | ||
| ofw_cpu.h | ||
| ofw_disk.c | ||
| ofw_fdt.c | ||
| ofw_graph.c | ||
| ofw_graph.h | ||
| ofw_if.m | ||
| ofw_pci.c | ||
| ofw_pci.h | ||
| ofw_pcib.c | ||
| ofw_standard.c | ||
| ofw_subr.c | ||
| ofw_subr.h | ||
| ofwbus.c | ||
| ofwpci.h | ||
| ofwvar.h | ||
| openfirm.c | ||
| openfirm.h | ||
| openfirmio.c | ||
| openfirmio.h | ||