CVE-2025-38720 (GCVE-0-2025-38720)
Vulnerability from cvelistv5
Published
2025-09-04 15:33
Modified
2025-09-04 15:33
Severity ?
VLAI Severity ?
EPSS score ?
Summary
In the Linux kernel, the following vulnerability has been resolved:
net: hibmcge: fix rtnl deadlock issue
Currently, the hibmcge netdev acquires the rtnl_lock in
pci_error_handlers.reset_prepare() and releases it in
pci_error_handlers.reset_done().
However, in the PCI framework:
pci_reset_bus - __pci_reset_slot - pci_slot_save_and_disable_locked -
pci_dev_save_and_disable - err_handler->reset_prepare(dev);
In pci_slot_save_and_disable_locked():
list_for_each_entry(dev, &slot->bus->devices, bus_list) {
if (!dev->slot || dev->slot!= slot)
continue;
pci_dev_save_and_disable(dev);
if (dev->subordinate)
pci_bus_save_and_disable_locked(dev->subordinate);
}
This will iterate through all devices under the current bus and execute
err_handler->reset_prepare(), causing two devices of the hibmcge driver
to sequentially request the rtnl_lock, leading to a deadlock.
Since the driver now executes netif_device_detach()
before the reset process, it will not concurrently with
other netdev APIs, so there is no need to hold the rtnl_lock now.
Therefore, this patch removes the rtnl_lock during the reset process and
adjusts the position of HBG_NIC_STATE_RESETTING to ensure
that multiple resets are not executed concurrently.
References
Impacted products
{ "containers": { "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Linux", "programFiles": [ "drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "lessThan": "d85a6346fd6f595c4914205762d0cdf35c004a5e", "status": "affected", "version": "3f5a61f6d504f55ed1a36cce044d5123d508721f", "versionType": "git" }, { "lessThan": "1343a8994ca7dba78f5dd818e89d68331c21c35d", "status": "affected", "version": "3f5a61f6d504f55ed1a36cce044d5123d508721f", "versionType": "git" }, { "lessThan": "c875503a9b9082928d7d3fc60b5400d16fbfae4e", "status": "affected", "version": "3f5a61f6d504f55ed1a36cce044d5123d508721f", "versionType": "git" } ] }, { "defaultStatus": "affected", "product": "Linux", "programFiles": [ "drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "status": "affected", "version": "6.14" }, { "lessThan": "6.14", "status": "unaffected", "version": "0", "versionType": "semver" }, { "lessThanOrEqual": "6.15.*", "status": "unaffected", "version": "6.15.11", "versionType": "semver" }, { "lessThanOrEqual": "6.16.*", "status": "unaffected", "version": "6.16.2", "versionType": "semver" }, { "lessThanOrEqual": "*", "status": "unaffected", "version": "6.17-rc2", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "cpeMatch": [ { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.15.11", "versionStartIncluding": "6.14", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.16.2", "versionStartIncluding": "6.14", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.17-rc2", "versionStartIncluding": "6.14", "vulnerable": true } ], "negate": false, "operator": "OR" } ] } ], "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: hibmcge: fix rtnl deadlock issue\n\nCurrently, the hibmcge netdev acquires the rtnl_lock in\npci_error_handlers.reset_prepare() and releases it in\npci_error_handlers.reset_done().\n\nHowever, in the PCI framework:\npci_reset_bus - __pci_reset_slot - pci_slot_save_and_disable_locked -\n pci_dev_save_and_disable - err_handler-\u003ereset_prepare(dev);\n\nIn pci_slot_save_and_disable_locked():\n\tlist_for_each_entry(dev, \u0026slot-\u003ebus-\u003edevices, bus_list) {\n\t\tif (!dev-\u003eslot || dev-\u003eslot!= slot)\n\t\t\tcontinue;\n\t\tpci_dev_save_and_disable(dev);\n\t\tif (dev-\u003esubordinate)\n\t\t\tpci_bus_save_and_disable_locked(dev-\u003esubordinate);\n\t}\n\nThis will iterate through all devices under the current bus and execute\nerr_handler-\u003ereset_prepare(), causing two devices of the hibmcge driver\nto sequentially request the rtnl_lock, leading to a deadlock.\n\nSince the driver now executes netif_device_detach()\nbefore the reset process, it will not concurrently with\nother netdev APIs, so there is no need to hold the rtnl_lock now.\n\nTherefore, this patch removes the rtnl_lock during the reset process and\nadjusts the position of HBG_NIC_STATE_RESETTING to ensure\nthat multiple resets are not executed concurrently." } ], "providerMetadata": { "dateUpdated": "2025-09-04T15:33:14.057Z", "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux" }, "references": [ { "url": "https://git.kernel.org/stable/c/d85a6346fd6f595c4914205762d0cdf35c004a5e" }, { "url": "https://git.kernel.org/stable/c/1343a8994ca7dba78f5dd818e89d68331c21c35d" }, { "url": "https://git.kernel.org/stable/c/c875503a9b9082928d7d3fc60b5400d16fbfae4e" } ], "title": "net: hibmcge: fix rtnl deadlock issue", "x_generator": { "engine": "bippy-1.2.0" } } }, "cveMetadata": { "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "assignerShortName": "Linux", "cveId": "CVE-2025-38720", "datePublished": "2025-09-04T15:33:14.057Z", "dateReserved": "2025-04-16T04:51:24.033Z", "dateUpdated": "2025-09-04T15:33:14.057Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "vulnerability-lookup:meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2025-38720\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-09-04T16:15:41.710\",\"lastModified\":\"2025-09-05T17:47:24.833\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nnet: hibmcge: fix rtnl deadlock issue\\n\\nCurrently, the hibmcge netdev acquires the rtnl_lock in\\npci_error_handlers.reset_prepare() and releases it in\\npci_error_handlers.reset_done().\\n\\nHowever, in the PCI framework:\\npci_reset_bus - __pci_reset_slot - pci_slot_save_and_disable_locked -\\n pci_dev_save_and_disable - err_handler-\u003ereset_prepare(dev);\\n\\nIn pci_slot_save_and_disable_locked():\\n\\tlist_for_each_entry(dev, \u0026slot-\u003ebus-\u003edevices, bus_list) {\\n\\t\\tif (!dev-\u003eslot || dev-\u003eslot!= slot)\\n\\t\\t\\tcontinue;\\n\\t\\tpci_dev_save_and_disable(dev);\\n\\t\\tif (dev-\u003esubordinate)\\n\\t\\t\\tpci_bus_save_and_disable_locked(dev-\u003esubordinate);\\n\\t}\\n\\nThis will iterate through all devices under the current bus and execute\\nerr_handler-\u003ereset_prepare(), causing two devices of the hibmcge driver\\nto sequentially request the rtnl_lock, leading to a deadlock.\\n\\nSince the driver now executes netif_device_detach()\\nbefore the reset process, it will not concurrently with\\nother netdev APIs, so there is no need to hold the rtnl_lock now.\\n\\nTherefore, this patch removes the rtnl_lock during the reset process and\\nadjusts the position of HBG_NIC_STATE_RESETTING to ensure\\nthat multiple resets are not executed concurrently.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/1343a8994ca7dba78f5dd818e89d68331c21c35d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c875503a9b9082928d7d3fc60b5400d16fbfae4e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d85a6346fd6f595c4914205762d0cdf35c004a5e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}" } }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…