Jessica Clarke 4e3a43905e ofw_pci: Fix incorrectly sized softc causing pci(4) out-of-bounds reads
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
2022-01-15 19:03:53 +00:00
..
2021-12-10 11:48:42 +00:00
2021-12-10 11:45:36 +00:00
2020-10-02 18:18:01 +00:00
2021-12-10 12:02:05 +00:00
2021-12-03 23:29:51 -07:00
2021-12-14 14:59:09 +00:00
2021-09-03 13:51:08 -04:00
2020-02-03 17:35:11 +00:00
2021-04-27 19:07:33 +02:00
2022-01-11 15:56:07 +02:00
2021-09-16 16:47:45 +02:00
2021-12-09 16:37:26 +00:00
2021-10-02 10:43:41 +02:00
2021-12-06 11:28:01 +01:00
2021-11-25 11:25:11 +00:00
2020-07-01 00:33:16 +00:00
2020-02-03 17:35:11 +00:00
2021-12-04 11:07:04 -07:00
2021-11-25 00:45:12 -07:00
2021-12-16 13:23:30 +00:00
2021-12-09 20:21:16 +00:00
2020-08-31 15:03:23 +00:00
2020-09-18 16:48:08 +00:00
2020-02-07 19:53:07 +00:00
2022-01-14 07:34:39 +00:00
2020-11-19 03:59:21 +00:00
2021-12-09 17:04:57 -07:00
2021-08-10 20:44:27 -04:00
2022-01-04 16:01:14 -07:00
2021-12-10 11:53:38 +00:00
2021-12-18 23:43:00 +01:00
2021-11-18 23:05:32 -07:00
2021-12-14 14:24:21 +00:00
2020-10-05 19:58:55 +00:00
2022-01-11 21:19:53 +01:00
2021-12-14 14:08:35 +00:00
2021-12-14 14:31:10 +00:00
2021-12-14 14:08:17 +00:00
2021-12-06 11:27:59 +01:00
2021-08-16 06:28:33 +02:00
2021-09-02 22:25:16 -04:00
2021-12-14 14:12:35 +00:00
2021-10-02 10:47:21 +02:00
2021-12-06 11:28:03 +01:00