[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025090400-CVE-2025-38720-a45e@gregkh>
Date: Thu, 4 Sep 2025 17:33:25 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2025-38720: net: hibmcge: fix rtnl deadlock issue
From: Greg Kroah-Hartman <gregkh@...nel.org>
Description
===========
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.
The Linux kernel CVE team has assigned CVE-2025-38720 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.14 with commit 3f5a61f6d504f55ed1a36cce044d5123d508721f and fixed in 6.15.11 with commit d85a6346fd6f595c4914205762d0cdf35c004a5e
Issue introduced in 6.14 with commit 3f5a61f6d504f55ed1a36cce044d5123d508721f and fixed in 6.16.2 with commit 1343a8994ca7dba78f5dd818e89d68331c21c35d
Issue introduced in 6.14 with commit 3f5a61f6d504f55ed1a36cce044d5123d508721f and fixed in 6.17-rc2 with commit c875503a9b9082928d7d3fc60b5400d16fbfae4e
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-38720
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/d85a6346fd6f595c4914205762d0cdf35c004a5e
https://git.kernel.org/stable/c/1343a8994ca7dba78f5dd818e89d68331c21c35d
https://git.kernel.org/stable/c/c875503a9b9082928d7d3fc60b5400d16fbfae4e
Powered by blists - more mailing lists