CVE-2024-58006

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

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

History

23 Oct 2025, 13:04

Type Values Removed Values Added
First Time Linux
Linux linux Kernel
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: PCI: dwc: ep: Impedir cambiar el tamaño/indicadores de BAR en pci_epc_set_bar() En el commit 4284c88fff0e ("PCI: designware-ep: Permitir que pci_epc_set_bar() actualice la dirección del mapa de entrada"), se modificó set_bar() para admitir el cambio dinámico de la dirección física de respaldo de un BAR que ya estaba configurado. Esto significa que se puede llamar a set_bar() dos veces, sin llamar nunca a clear_bar() (ya que llamar a clear_bar() borraría la dirección PCI del BAR asignada por el host). Esto solo se puede hacer si el nuevo tamaño/indicadores de BAR no difieren de la configuración de BAR existente. Agregue estas comprobaciones faltantes. Si permitimos que set_bar() establezca, por ejemplo, un nuevo tamaño de BAR que difiere del tamaño de BAR existente, el nuevo rango de traducción de direcciones será más pequeño que el tamaño de BAR ya determinado por el host, lo que significaría que una lectura más allá del nuevo tamaño de BAR pasaría la iATU sin traducir, lo que podría permitir que el host lea memoria que no pertenece a la nueva estructura pci_epf_bar. Mientras tanto, agregue comentarios que aclaren el soporte para cambiar dinámicamente la dirección física de un BAR. (Lo cual también faltaba).
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
CWE NVD-CWE-noinfo
CPE cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
References () https://git.kernel.org/stable/c/3229c15d6267de8e704b4085df8a82a5af2d63eb - () https://git.kernel.org/stable/c/3229c15d6267de8e704b4085df8a82a5af2d63eb - Patch
References () https://git.kernel.org/stable/c/3708acbd5f169ebafe1faa519cb28adc56295546 - () https://git.kernel.org/stable/c/3708acbd5f169ebafe1faa519cb28adc56295546 - Patch
References () https://git.kernel.org/stable/c/b5cacfd067060c75088363ed3e19779078be2755 - () https://git.kernel.org/stable/c/b5cacfd067060c75088363ed3e19779078be2755 - Patch

27 Feb 2025, 03:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-02-27 03:15

Updated : 2025-10-23 13:04


NVD link : CVE-2024-58006

Mitre link : CVE-2024-58006

CVE.ORG link : CVE-2024-58006


JSON object : View

Products Affected

linux

  • linux_kernel