CVE-2025-21802: net: hns3: fix oops when unload drivers paralleling
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 aedev node from hnae3aedevlist. If user unloads hns3 driver at the time, because it removes all the aedev nodes, and it may cause oops.
But we can't simply use hnae3commonlock for this. Because in the process flow of pcidisablesriov(), it will trigger the remove flow of VF, which will also take hnae3commonlock.
To fixes it, introduce a new mutex to protect the unload process.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-21802?
CVE-2025-21802 is classified as a moderate severity vulnerability in the Linux kernel.
How do I fix CVE-2025-21802?
To fix CVE-2025-21802, update your Linux kernel to the latest version that addresses this vulnerability.
What causes CVE-2025-21802?
CVE-2025-21802 is caused by a race condition when unloading the hclge driver while the hns3 driver is active.
Which versions of the Linux kernel are affected by CVE-2025-21802?
CVE-2025-21802 affects specific versions of the Linux kernel that include the vulnerable hns3 and hclge drivers.
Is CVE-2025-21802 exploitable in production environments?
CVE-2025-21802 can potentially be exploited in production environments, particularly during driver unloading procedures.