CVE-2022-50624
Description
In the Linux kernel, the following vulnerability has been resolved:
net: netsec: fix error handling in netsec_register_mdio()
If phy_device_register() fails, phy_device_free() need be called to put refcount, so memory of phy device and device name can be freed in callback function.
If get_phy_device() fails, mdiobus_unregister() need be called, or it will cause warning in mdiobus_free() and kobject is leaked.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Improper error handling in Linux kernel's netsec driver can cause memory leaks when MDIO registration fails.
Vulnerability
In the Linux kernel's netsec driver, the netsec_register_mdio() function lacks proper cleanup on error paths. If phy_device_register() fails, phy_device_free() is not called, resulting in a memory leak of the PHY device and its name. Similarly, if get_phy_device() fails, mdiobus_unregister() is omitted, leading to a warning in mdiobus_free() and a kobject leak [1][2][3].
Exploitation
This issue is triggerable during driver initialization when MDIO bus registration encounters errors. An attacker with local access could potentially induce such failures by manipulating system resources or hardware state, causing repeated driver probing to exhaust kernel memory. No special privileges beyond local access are required.
Impact
A local attacker could exploit this to cause denial of service by leaking kernel memory and kobjects, potentially leading to system instability or crash.
Mitigation
Patches have been applied to the Linux kernel stable tree. The fix ensures that phy_device_free() is called after phy_device_register() failure and mdiobus_unregister() is called after get_phy_device() failure. Users should update to a patched kernel version.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
662f0a08e82a6728884b22d83fda2d07234a21e0bee973ef6846e677daf51944235896891Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- git.kernel.org/stable/c/1e0bee973ef6fc3c1e3acb014515eaea37c8fa17nvd
- git.kernel.org/stable/c/62f0a08e82a6312efd7df7f595c0b11d4ffde610nvd
- git.kernel.org/stable/c/728884b22d83148a330b23f9472f1e118b589211nvd
- git.kernel.org/stable/c/846e677daf51220d7975c61a20e440a88473951envd
- git.kernel.org/stable/c/94423589689124e8cd145b38a1034be7f25835b2nvd
- git.kernel.org/stable/c/fda2d07234a21be4d71ebfe97a45f499726902d6nvd
News mentions
0No linked articles in our index yet.