Bug 2348905 (CVE-2025-21802) - CVE-2025-21802 kernel: net: hns3: fix oops when unload drivers paralleling
Summary: CVE-2025-21802 kernel: net: hns3: fix oops when unload drivers paralleling
Keywords:
Status: NEW
Alias: CVE-2025-21802
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-27 21:02 UTC by OSIDB Bzimport
Modified: 2025-03-11 10:33 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-02-27 21:02:42 UTC
In the Linux kernel, the following vulnerability has been resolved:

net: hns3: fix oops when unload drivers paralleling

When unload hclge driver, it tries to disable sriov first for each
ae_dev node from hnae3_ae_dev_list. If user unloads hns3 driver at
the time, because it removes all the ae_dev nodes, and it may cause
oops.

But we can't simply use hnae3_common_lock for this. Because in the
process flow of pci_disable_sriov(), it will trigger the remove flow
of VF, which will also take hnae3_common_lock.

To fixes it, introduce a new mutex to protect the unload process.

Comment 1 Avinash Hanwate 2025-02-28 07:24:13 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022752-CVE-2025-21802-0cc5@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.