GSD-2024-26650
Vulnerability from gsd - Updated: 2024-02-20 06:02Details
In the Linux kernel, the following vulnerability has been resolved:
platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe
p2sb_bar() unhides P2SB device to get resources from the device. It
guards the operation by locking pci_rescan_remove_lock so that parallel
rescans do not find the P2SB device. However, this lock causes deadlock
when PCI bus rescan is triggered by /sys/bus/pci/rescan. The rescan
locks pci_rescan_remove_lock and probes PCI devices. When PCI devices
call p2sb_bar() during probe, it locks pci_rescan_remove_lock again.
Hence the deadlock.
To avoid the deadlock, do not lock pci_rescan_remove_lock in p2sb_bar().
Instead, do the lock at fs_initcall. Introduce p2sb_cache_resources()
for fs_initcall which gets and caches the P2SB resources. At p2sb_bar(),
refer the cache and return to the caller.
Before operating the device at P2SB DEVFN for resource cache, check
that its device class is PCI_CLASS_MEMORY_OTHER 0x0580 that PCH
specifications define. This avoids unexpected operation to other devices
at the same DEVFN.
Tested-by Klara Modin <klarasmodin@gmail.com>
Aliases
{
"gsd": {
"metadata": {
"exploitCode": "unknown",
"remediation": "unknown",
"reportConfidence": "confirmed",
"type": "vulnerability"
},
"osvSchema": {
"aliases": [
"CVE-2024-26650"
],
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nplatform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe\n\np2sb_bar() unhides P2SB device to get resources from the device. It\nguards the operation by locking pci_rescan_remove_lock so that parallel\nrescans do not find the P2SB device. However, this lock causes deadlock\nwhen PCI bus rescan is triggered by /sys/bus/pci/rescan. The rescan\nlocks pci_rescan_remove_lock and probes PCI devices. When PCI devices\ncall p2sb_bar() during probe, it locks pci_rescan_remove_lock again.\nHence the deadlock.\n\nTo avoid the deadlock, do not lock pci_rescan_remove_lock in p2sb_bar().\nInstead, do the lock at fs_initcall. Introduce p2sb_cache_resources()\nfor fs_initcall which gets and caches the P2SB resources. At p2sb_bar(),\nrefer the cache and return to the caller.\n\nBefore operating the device at P2SB DEVFN for resource cache, check\nthat its device class is PCI_CLASS_MEMORY_OTHER 0x0580 that PCH\nspecifications define. This avoids unexpected operation to other devices\nat the same DEVFN.\n\nTested-by Klara Modin \u003cklarasmodin@gmail.com\u003e",
"id": "GSD-2024-26650",
"modified": "2024-02-20T06:02:29.082066Z",
"schema_version": "1.4.0"
}
},
"namespaces": {
"cve.org": {
"CVE_data_meta": {
"ASSIGNER": "cve@kernel.org",
"ID": "CVE-2024-26650",
"STATE": "PUBLIC"
},
"affects": {
"vendor": {
"vendor_data": [
{
"product": {
"product_data": [
{
"product_name": "Linux",
"version": {
"version_data": [
{
"version_affected": "\u003c",
"version_name": "9745fb07474f",
"version_value": "2841631a0365"
},
{
"version_value": "not down converted",
"x_cve_json_5_version_data": {
"defaultStatus": "affected",
"versions": [
{
"status": "affected",
"version": "6.0"
},
{
"lessThan": "6.0",
"status": "unaffected",
"version": "0",
"versionType": "custom"
},
{
"lessThanOrEqual": "6.1.*",
"status": "unaffected",
"version": "6.1.76",
"versionType": "custom"
},
{
"lessThanOrEqual": "6.6.*",
"status": "unaffected",
"version": "6.6.15",
"versionType": "custom"
},
{
"lessThanOrEqual": "6.7.*",
"status": "unaffected",
"version": "6.7.3",
"versionType": "custom"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "6.8",
"versionType": "original_commit_for_fix"
}
]
}
}
]
}
}
]
},
"vendor_name": "Linux"
}
]
}
},
"data_format": "MITRE",
"data_type": "CVE",
"data_version": "4.0",
"description": {
"description_data": [
{
"lang": "eng",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nplatform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe\n\np2sb_bar() unhides P2SB device to get resources from the device. It\nguards the operation by locking pci_rescan_remove_lock so that parallel\nrescans do not find the P2SB device. However, this lock causes deadlock\nwhen PCI bus rescan is triggered by /sys/bus/pci/rescan. The rescan\nlocks pci_rescan_remove_lock and probes PCI devices. When PCI devices\ncall p2sb_bar() during probe, it locks pci_rescan_remove_lock again.\nHence the deadlock.\n\nTo avoid the deadlock, do not lock pci_rescan_remove_lock in p2sb_bar().\nInstead, do the lock at fs_initcall. Introduce p2sb_cache_resources()\nfor fs_initcall which gets and caches the P2SB resources. At p2sb_bar(),\nrefer the cache and return to the caller.\n\nBefore operating the device at P2SB DEVFN for resource cache, check\nthat its device class is PCI_CLASS_MEMORY_OTHER 0x0580 that PCH\nspecifications define. This avoids unexpected operation to other devices\nat the same DEVFN.\n\nTested-by Klara Modin \u003cklarasmodin@gmail.com\u003e"
}
]
},
"generator": {
"engine": "bippy-b4257b672505"
},
"problemtype": {
"problemtype_data": [
{
"description": [
{
"lang": "eng",
"value": "n/a"
}
]
}
]
},
"references": {
"reference_data": [
{
"name": "https://git.kernel.org/stable/c/2841631a03652f32b595c563695d0461072e0de4",
"refsource": "MISC",
"url": "https://git.kernel.org/stable/c/2841631a03652f32b595c563695d0461072e0de4"
},
{
"name": "https://git.kernel.org/stable/c/847e1eb30e269a094da046c08273abe3f3361cf2",
"refsource": "MISC",
"url": "https://git.kernel.org/stable/c/847e1eb30e269a094da046c08273abe3f3361cf2"
},
{
"name": "https://git.kernel.org/stable/c/d281ac9a987c553d93211b90fd4fe97d8eca32cd",
"refsource": "MISC",
"url": "https://git.kernel.org/stable/c/d281ac9a987c553d93211b90fd4fe97d8eca32cd"
},
{
"name": "https://git.kernel.org/stable/c/5913320eb0b3ec88158cfcb0fa5e996bf4ef681b",
"refsource": "MISC",
"url": "https://git.kernel.org/stable/c/5913320eb0b3ec88158cfcb0fa5e996bf4ef681b"
}
]
}
},
"nvd.nist.gov": {
"cve": {
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nplatform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe\n\np2sb_bar() unhides P2SB device to get resources from the device. It\nguards the operation by locking pci_rescan_remove_lock so that parallel\nrescans do not find the P2SB device. However, this lock causes deadlock\nwhen PCI bus rescan is triggered by /sys/bus/pci/rescan. The rescan\nlocks pci_rescan_remove_lock and probes PCI devices. When PCI devices\ncall p2sb_bar() during probe, it locks pci_rescan_remove_lock again.\nHence the deadlock.\n\nTo avoid the deadlock, do not lock pci_rescan_remove_lock in p2sb_bar().\nInstead, do the lock at fs_initcall. Introduce p2sb_cache_resources()\nfor fs_initcall which gets and caches the P2SB resources. At p2sb_bar(),\nrefer the cache and return to the caller.\n\nBefore operating the device at P2SB DEVFN for resource cache, check\nthat its device class is PCI_CLASS_MEMORY_OTHER 0x0580 that PCH\nspecifications define. This avoids unexpected operation to other devices\nat the same DEVFN.\n\nTested-by Klara Modin \u003cklarasmodin@gmail.com\u003e"
},
{
"lang": "es",
"value": "En el kernel de Linux, se resolvi\u00f3 la siguiente vulnerabilidad: plataforma/x86: p2sb: permitir llamadas a p2sb_bar() durante la sonda del dispositivo PCI p2sb_bar() muestra el dispositivo P2SB para obtener recursos del dispositivo. Protege la operaci\u00f3n bloqueando pci_rescan_remove_lock para que los rescaneos paralelos no encuentren el dispositivo P2SB. Sin embargo, este bloqueo provoca un interbloqueo cuando /sys/bus/pci/rescan activa la nueva exploraci\u00f3n del bus PCI. La nueva exploraci\u00f3n bloquea pci_rescan_remove_lock y sondea los dispositivos PCI. Cuando los dispositivos PCI llaman a p2sb_bar() durante la prueba, bloquea pci_rescan_remove_lock nuevamente. De ah\u00ed el punto muerto. Para evitar el punto muerto, no bloquee pci_rescan_remove_lock en p2sb_bar(). En su lugar, realice el bloqueo en fs_initcall. Introduzca p2sb_cache_resources() para fs_initcall que obtiene y almacena en cach\u00e9 los recursos de P2SB. En p2sb_bar(), consulte el cach\u00e9 y regrese a la persona que llama. Antes de operar el dispositivo en P2SB DEVFN para cach\u00e9 de recursos, verifique que su clase de dispositivo sea PCI_CLASS_MEMORY_OTHER 0x0580 que definen las especificaciones PCH. Esto evita el funcionamiento inesperado de otros dispositivos en el mismo DEVFN. Probado por Klara Modin "
}
],
"id": "CVE-2024-26650",
"lastModified": "2024-03-27T12:29:41.530",
"metrics": {},
"published": "2024-03-26T18:15:10.530",
"references": [
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"url": "https://git.kernel.org/stable/c/2841631a03652f32b595c563695d0461072e0de4"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"url": "https://git.kernel.org/stable/c/5913320eb0b3ec88158cfcb0fa5e996bf4ef681b"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"url": "https://git.kernel.org/stable/c/847e1eb30e269a094da046c08273abe3f3361cf2"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"url": "https://git.kernel.org/stable/c/d281ac9a987c553d93211b90fd4fe97d8eca32cd"
}
],
"sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"vulnStatus": "Awaiting Analysis"
}
}
}
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…