CVE-2024-58006

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-58006
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-58006.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-58006
Downstream
Related
Published
2025-02-27T02:12:02Z
Modified
2025-10-10T05:34:11.565958Z
Summary
PCI: dwc: ep: Prevent changing BAR size/flags in pci_epc_set_bar()
Details

In the Linux kernel, the following vulnerability has been resolved:

PCI: dwc: ep: Prevent changing BAR size/flags in pciepcset_bar()

In commit 4284c88fff0e ("PCI: designware-ep: Allow pciepcsetbar() update inbound map address") setbar() was modified to support dynamically changing the backing physical address of a BAR that was already configured.

This means that setbar() can be called twice, without ever calling clearbar() (as calling clear_bar() would clear the BAR's PCI address assigned by the host).

This can only be done if the new BAR size/flags does not differ from the existing BAR configuration. Add these missing checks.

If we allow setbar() to set e.g. a new BAR size that differs from the existing BAR size, the new address translation range will be smaller than the BAR size already determined by the host, which would mean that a read past the new BAR size would pass the iATU untranslated, which could allow the host to read memory not belonging to the new struct pciepf_bar.

While at it, add comments which clarifies the support for dynamically changing the physical address of a BAR. (Which was also missing.)

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4284c88fff0efc4e418abb53d78e02dc4f099d6c
Fixed
b5cacfd067060c75088363ed3e19779078be2755
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4284c88fff0efc4e418abb53d78e02dc4f099d6c
Fixed
3229c15d6267de8e704b4085df8a82a5af2d63eb
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4284c88fff0efc4e418abb53d78e02dc4f099d6c
Fixed
3708acbd5f169ebafe1faa519cb28adc56295546

Affected versions

v6.*

v6.0
v6.0-rc1
v6.0-rc2
v6.0-rc3
v6.0-rc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c5
v6.9-rc6
v6.9-rc7

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.0.0
Fixed
6.12.14
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.13.3