Skip to content

Harden PCI resource array indexing

Philipp Stanner linux-pci lkml stable 1 version Applied

Status from this message: Applied to pci/devres for v6.15, thanks, Philipp!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest2 patches 1 replyApplied

Changes in v3 from the cover letter

- Use PCI_NUM_RESOURCES as the devres array length and provide that as a bugfix to be backported. (Damien)

[1] https://lore.kernel.org/linux-pci/[email protected]/
[2] https://lore.kernel.org/linux-pci/[email protected]/

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2PCI: Fix wrong length of devres arraydrivers/pci/devres.c+1 -10 replies
2/2PCI: Check BAR index for validitydrivers/pci/devres.c drivers/pci/iomap.c drivers/pci/pci.c +1 more+57 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/2] Harden PCI resource array indexing

This is a v3, spiritually successing "v1" the original implementation of length checking [1], and "v2", the fix squashed in by Krzyzstof [2].

Changes in v3:
- Use PCI_NUM_RESOURCES as the devres array length and provide that as a bugfix to be backported. (Damien)

[1] https://lore.kernel.org/linux-pci/[email protected]/
[2] https://lore.kernel.org/linux-pci/[email protected]/

Philipp Stanner (2):
PCI: Fix wrong length of devres array
PCI: Check BAR index for validity

 drivers/pci/devres.c | 18 +++++++++++++++---
 drivers/pci/iomap.c  | 29 +++++++++++++++++++++--------
 drivers/pci/pci.c    |  6 ++++++
 drivers/pci/pci.h    | 16 ++++++++++++++++
 4 files changed, 58 insertions(+), 11 deletions(-)
Signature · 1 line
2.48.1