freebsd-dev/sys
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
..
amd64 bhyve: add support for MTRR 2022-01-14 12:41:44 +01:00
arm Revert "syscallarg_t: Add a type for system call arguments" 2022-01-12 23:29:20 +00:00
arm64 Revert "syscallarg_t: Add a type for system call arguments" 2022-01-12 23:29:20 +00:00
bsm
cam ata_xpt: Rename probe_softc to aprobe_softc 2022-01-14 17:21:09 -07:00
cddl dtrace: add a knob to control maximum size of principal buffers 2022-01-11 15:47:50 +02:00
compat ia32_signal.h: Drop #ifdef's for old compat structures. 2022-01-13 17:44:15 -08:00
conf x86: Speed up clock calibration 2022-01-12 12:34:07 -08:00
contrib LinuxKPI / iwlwifi: fix spelling of constants 2022-01-09 02:21:05 +00:00
crypto crypto: Re-add encrypt/decrypt_multi hooks to enc_xform. 2022-01-11 14:17:41 -08:00
ddb ddb: Remove SOFTWARE_SSTEP support 2022-01-07 09:25:33 -07:00
dev ofw_pci: Fix incorrectly sized softc causing pci(4) out-of-bounds reads 2022-01-15 19:03:53 +00:00
dts
fs unionfs: allow vnode lock to be held shared during VOP_OPEN 2022-01-11 18:44:03 -08:00
gdb
geom Use G_ELI_IVKEYLEN as the size of IV in the user test code. 2022-01-13 17:22:06 -08:00
gnu
i386 Move struct freebsd4_ucontext to sys/i386/include/ucontext.h. 2022-01-13 17:17:43 -08:00
isa sys/isa: Use C99 fixed-width integer types. 2021-12-28 09:41:57 -08:00
kern Ignore calcru: runtime went backwards for vm_guest 2022-01-14 16:07:43 -08:00
kgssapi
libkern sys/libkern: Use C99 fixed-width integer types. 2021-12-28 09:42:11 -08:00
modules crypto.ko: Add hchacha20 from libsodium. 2022-01-11 14:15:51 -08:00
net netmap: fix LOR in iflib_netmap_register 2022-01-14 21:09:04 +00:00
net80211 net80211: adjust a printf to toeee80211_note 2021-12-26 17:26:58 +00:00
netgraph domains: make domain_init() initialize only global state 2022-01-03 10:15:22 -08:00
netinet tcp_usr_connect: report actual error code when stack requests drop 2022-01-13 10:32:41 -08:00
netinet6 domains: make domain_init() initialize only global state 2022-01-03 10:15:22 -08:00
netipsec syncache: accept packet with no SA when TCP_MD5SIG is set 2022-01-08 16:32:14 -09:00
netpfil pf: protect the rpool from races 2022-01-14 10:30:33 +01:00
netsmb
nfs
nfsclient
nfsserver
nlm sys/nlm: Use C99 fixed-width integer types. 2021-12-28 09:42:42 -08:00
ofed domains: init with standard SYSINIT(9) or VNET_SYSINIT() 2022-01-03 10:15:22 -08:00
opencrypto stand: Fix KASSERT use 2022-01-11 16:43:18 -07:00
powerpc powerpc: Fix syntax atomic.h 2022-01-14 19:11:22 +08:00
riscv Revert "syscallarg_t: Add a type for system call arguments" 2022-01-12 23:29:20 +00:00
rpc sys/rpc: Use C99 fixed-width integer types. 2021-12-28 09:43:15 -08:00
security
sys Move struct freebsd4_ucontext to sys/i386/include/ucontext.h. 2022-01-13 17:17:43 -08:00
teken
tests
tools Revert "syscallarg_t: Add a type for system call arguments" 2022-01-12 23:29:20 +00:00
ufs Avoid unnecessary setting of UFS flag requesting fsck(8) be run. 2022-01-09 16:18:28 -08:00
vm uma: Avoid polling for an invalid SMR sequence number 2022-01-14 15:38:02 -05:00
x86 Use CPUID leaf 0x40000010 for local APIC freq 2022-01-14 17:30:17 -08:00
xdr sys/xdr: Use C99 fixed-width integer types. 2021-12-28 09:43:26 -08:00
xen
Makefile Fix 'make cscope' with ALL_ARCH defined 2022-01-07 11:53:52 -04:00