diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2021-02-02 15:48:32 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2021-02-15 13:59:20 +0000 |
commit | 050ad7c679ebdc8193316894fd176048f3a5155e (patch) | |
tree | cad6a8566aa84740a5da47e702a5a46eb24fda93 /security/yama | |
parent | f33f6d66c4c5af81007a1144fca8bf4c6d7c0e63 (diff) |
PCI: pci-bridge-emul: fix array overruns, improve safety
We allow up to PCI_EXP_SLTSTA2 registers to be accessed, but the
PCIe behaviour (pcie_cap_regs_behavior) array only covers up to
PCI_EXP_RTSTA. Expand this array to avoid walking off the end of it.
Do the same for pci_regs_behavior for consistency, and add a
BUILD_BUG_ON() to also check the bridge->conf structure size.
Fixes: 23a5fba4d941 ("PCI: Introduce PCI bridge emulated config space common logic")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'security/yama')
0 files changed, 0 insertions, 0 deletions