# CVE-2024-58006: PCI: dwc: ep: Prevent changing BAR size/flags in pci\_epc\_set\_bar()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.6
- **CVSS:** 9.6 (v3.1, CNA) `CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Adjacent network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.38% (percentile 24, 2026-11-26)
- **Published:** 2025-02-27T02:12:02.932Z
- **Modified:** 2026-10-30T13:17:50.153Z

## Who should check

- Anyone running Linux \>= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, \< 8dbc2d9e6b8612b9d5f41c0ea875e86183ff9617; \>= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, \< 01aaa7935af3050fd1e1e7de50001247c75baeab; \>= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, \< b5cacfd067060c75088363ed3e19779078be2755; \>= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, \< 3229c15d6267de8e704b4085df8a82a5af2d63eb; \>= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, \< 3708acbd5f169ebafe1faa519cb28adc56295546
- Anyone running Linux 6.0

## Description

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

PCI: dwc: ep: Prevent changing BAR size/flags in pci\_epc\_set\_bar()

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

This means that set\_bar() can be called twice, without ever calling
clear\_bar() (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 set\_bar() 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 pci\_epf\_bar.

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

## Affected and fixed versions

- Linux: \>= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, \< 8dbc2d9e6b8612b9d5f41c0ea875e86183ff9617; \>= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, \< 01aaa7935af3050fd1e1e7de50001247c75baeab; \>= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, \< b5cacfd067060c75088363ed3e19779078be2755; \>= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, \< 3229c15d6267de8e704b4085df8a82a5af2d63eb; \>= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, \< 3708acbd5f169ebafe1faa519cb28adc56295546 (cvelist)
- Linux: 6.0 (cvelist)

## Mitigation

- Upgrade Linux to 3708acbd5f169ebafe1faa519cb28adc56295546 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-58006. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-58006.md
Affected: Linux >= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, < 8dbc2d9e6b8612b9d5f41c0ea875e86183ff9617; >= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, < 01aaa7935af3050fd1e1e7de50001247c75baeab; >= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, < b5cacfd067060c75088363ed3e19779078be2755; >= 4284c88fff0efc4e418abb5…
Fixed in: Linux 8dbc2d9e6b8612b9d5f41c0ea875e86183ff9617, Linux 01aaa7935af3050fd1e1e7de50001247c75baeab, Linux 3229c15d6267de8e704b4085df8a82a5af2d63eb, Linux 3708acbd5f169ebafe1faa519cb28adc56295546

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-58006 being exploited?

There is no confirmed exploitation: CVE-2024-58006 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.38% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-58006?

Critical: CVSS 9.6 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-58006?

Linux \>= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, \< 8dbc2d9e6b8612b9d5f41c0ea875e86183ff9617; \>= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, \< 01aaa7935af3050fd1e1e7de50001247c75baeab; \>= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, \< b5cacfd067060c75088363ed3e19779078be2755; \>= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, \< 3229c15d6267de8e704b4085df8a82a5af2d63eb; \>= 4284c88fff0efc4e418abb53d78e02dc4f099d6c, \< 3708acbd5f169ebafe1faa519cb28adc56295546; Linux 6.0.

### Is there a fix for CVE-2024-58006?

Yes. Fixed in Linux 8dbc2d9e6b8612b9d5f41c0ea875e86183ff9617, Linux 01aaa7935af3050fd1e1e7de50001247c75baeab, Linux 3229c15d6267de8e704b4085df8a82a5af2d63eb, Linux 3708acbd5f169ebafe1faa519cb28adc56295546. Upgrade Linux to 3708acbd5f169ebafe1faa519cb28adc56295546 or later.

### How do I check if I'm affected by CVE-2024-58006?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/b5cacfd067060c75088363ed3e19779078be2755>
- patch: <https://git.kernel.org/stable/c/3229c15d6267de8e704b4085df8a82a5af2d63eb>
- patch: <https://git.kernel.org/stable/c/3708acbd5f169ebafe1faa519cb28adc56295546>
- other: <https://git.kernel.org/stable/c/8dbc2d9e6b8612b9d5f41c0ea875e86183ff9617>
- other: <https://git.kernel.org/stable/c/01aaa7935af3050fd1e1e7de50001247c75baeab>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-58006>

HTML: <https://flawdb.com/CVE-2024-58006> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-58006>
