CVE-2024-58006
PCI: dwc: ep: Prevent changing BAR size/flags in pci_epc_set_bar()
Check your servers for CVE-2024-58006
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-58006 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.)
Severity (CVSS)
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
- Attack vector
- adjacent: the attacker has to be on the same local network or link
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- changed: the damage reaches other components, such as the host of a container or other users
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.31%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 25.5% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 4284c88fff0efc4e418abb53d78e02dc4f099d6c, before 8dbc2d9e6b8612b9d5f41c0ea875e86183ff9617 affected from 4284c88fff0efc4e418abb53d78e02dc4f099d6c, before 01aaa7935af3050fd1e1e7de50001247c75baeab affected from 4284c88fff0efc4e418abb53d78e02dc4f099d6c, before b5cacfd067060c75088363ed3e19779078be2755 affected from 4284c88fff0efc4e418abb53d78e02dc4f099d6c, before 3229c15d6267de8e704b4085df8a82a5af2d63eb affected from 4284c88fff0efc4e418abb53d78e02dc4f099d6c, before 3708acbd5f169ebafe1faa519cb28adc56295546
Other versions: unaffected
|
| Linux |
affected 6.0 unaffected before 6.0 unaffected from 6.1.191 up to and including 6.1.* unaffected from 6.6.160 up to and including 6.6.* unaffected from 6.12.14 up to and including 6.12.* unaffected from 6.13.3 up to and including 6.13.* unaffected 6.14 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-58006 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-58006
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2024-58006
trivy image --scanners vuln IMAGE | grep CVE-2024-58006
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/8dbc2d9e6b8612b9d5f41c0ea875e86183ff9617 git.kernel.org
- https://git.kernel.org/stable/c/01aaa7935af3050fd1e1e7de50001247c75baeab git.kernel.org
- https://git.kernel.org/stable/c/b5cacfd067060c75088363ed3e19779078be2755 git.kernel.org
- https://git.kernel.org/stable/c/3229c15d6267de8e704b4085df8a82a5af2d63eb git.kernel.org
- https://git.kernel.org/stable/c/3708acbd5f169ebafe1faa519cb28adc56295546 git.kernel.org
Source: the record CVE-2024-58006 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse