Skip to content
Heist/ feed
Critical

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

Type: advisorySource: Official CVE List1 source record

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

Announced Group revision 1
Original source ↗

CVE-2024-58006

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2024-58006

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "4284c88fff0efc4e418abb53d78e02dc4f099d6c",
        "lessThan": "01aaa7935af3050fd1e1e7de50001247c75baeab",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "4284c88fff0efc4e418abb53d78e02dc4f099d6c",
        "lessThan": "b5cacfd067060c75088363ed3e19779078be2755",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "4284c88fff0efc4e418abb53d78e02dc4f099d6c",
        "lessThan": "3229c15d6267de8e704b4085df8a82a5af2d63eb",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "4284c88fff0efc4e418abb53d78e02dc4f099d6c",
        "lessThan": "3708acbd5f169ebafe1faa519cb28adc56295546",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "drivers/pci/controller/dwc/pcie-designware-ep.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "6.0"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "6.0",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "6.6.160",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.12.14",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.13.3",
        "versionType": "semver",
        "lessThanOrEqual": "6.13.*"
      },
      {
        "status": "unaffected",
        "version": "6.14",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "drivers/pci/controller/dwc/pcie-designware-ep.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2024-58006

Source reference: /cveMetadata/cveId

Publisher severity

critical

Source reference: /containers/cna/metrics

Event
#45935 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement