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

- Priority: **Prioritise**
- Reason: Severe, CVSS 9.6 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 0% (FIRST, 04-12-2026)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2025-02-27 · Modified: 2026-10-30
- Aliases: UBUNTU-CVE-2024-58006, DEBIAN-CVE-2024-58006
- Record: https://cvemate.com/vulnerability/CVE-2024-58006 · JSON: https://cvemate.com/vulnerability/CVE-2024-58006/json

## Description

```text
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.)
```

## Signals

- CVSS: 9.6 critical (v3.1, CVE.org) CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
- EPSS: 0.309%, percentile 25.547%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 109)

- debian linux (Debian): All versions (No fix recorded) \| \< 6.1.192-1 \| \< 6.12.15-1
- ubuntu linux (Ubuntu): \< 6.8.0-64.67
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 6.8.0-1032.34
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1032.34~22.04.1
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1034.39
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-6.11 (Ubuntu): \< 6.11.0-1015.15~24.04.1

## References (first 20 of 21)

- <https://git.kernel.org/stable/c/b5cacfd067060c75088363ed3e19779078be2755>
- <https://git.kernel.org/stable/c/3229c15d6267de8e704b4085df8a82a5af2d63eb>
- <https://git.kernel.org/stable/c/3708acbd5f169ebafe1faa519cb28adc56295546>
- <https://ubuntu.com/security/CVE-2024-58006>
- <https://www.cve.org/CVERecord?id=CVE-2024-58006>
- <https://git.kernel.org/linus/3708acbd5f169ebafe1faa519cb28adc56295546>
- <https://ubuntu.com/security/notices/USN-7521-1>
- <https://ubuntu.com/security/notices/USN-7521-2>
- <https://ubuntu.com/security/notices/USN-7521-3>
- <https://ubuntu.com/security/notices/USN-7651-1>
- <https://ubuntu.com/security/notices/USN-7652-1>
- <https://ubuntu.com/security/notices/USN-7653-1>
- <https://ubuntu.com/security/notices/USN-7651-2>
- <https://ubuntu.com/security/notices/USN-7651-3>
- <https://ubuntu.com/security/notices/USN-7651-4>
- <https://ubuntu.com/security/notices/USN-7651-5>
- <https://ubuntu.com/security/notices/USN-7651-6>
- <https://ubuntu.com/security/notices/USN-7737-1>
- <https://security-tracker.debian.org/tracker/CVE-2024-58006>
- <https://git.kernel.org/stable/c/01aaa7935af3050fd1e1e7de50001247c75baeab>

---

Data as of 2026-12-05T03:52:08.423Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
