CVE-2022-48813: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: net: dsa: felix: don't use devres for mdiobus As explained in commits: 74b6d7d13307 ("net: dsa: realtek: register the MDIO bus under devres") 5135e96a3dd2 ("net: dsa: don't allocate the slave_mii_bus using devres") mdiobus_free() will panic when called from devm_mdiobus_free() <- devres_release_all() <- __device_release_driver(), and that mdiobus was not previously unregistered. The Felix VSC9959 switch is a PCI device, so the initial set of constraints that I thought would cause this (I2C or SPI buses which call ->remove on ->shutdown) do not apply. But there is one more which applies here. If the DSA master itself is on a bus that calls ->remove from ->shutdown (like dpaa2-eth, which is on the fsl-mc bus), there is a device link between the switch and the DSA master, and device_links_unbind_consumers() will unbind the felix switch driver on shutdown. So the same treatment must be applied to all DSA switch drivers, which is: either use devres for both the mdiobus allocation and registration, or don't use devres at all. The felix driver has the code structure in place for orderly mdiobus removal, so just replace devm_mdiobus_alloc_size() with the non-devres variant, and add manual free where necessary, to ensure that we don't let devres free a still-registered bus.
AI Analysis
Technical Summary
CVE-2022-48813 is a vulnerability in the Linux kernel's Distributed Switch Architecture (DSA) subsystem, specifically affecting the Felix VSC9959 switch driver. The issue arises from improper resource management related to the MDIO bus (mdiobus) allocation and deallocation. The vulnerability is rooted in the use of devres-managed resources for mdiobus allocation and registration. The devres framework in the Linux kernel automates resource management by associating resources with device lifetimes, freeing them automatically on device removal. However, in this case, mdiobus_free() is called from devm_mdiobus_free() during device release, but the mdiobus was not previously unregistered, causing a kernel panic. This improper sequence can lead to system instability or crashes during device shutdown or removal. The root cause is that the Felix VSC9959 switch is a PCI device, and the initial assumptions about bus types that trigger this issue (such as I2C or SPI buses) do not apply. Instead, the problem manifests when the DSA master device is on a bus that calls the ->remove method during shutdown (e.g., dpaa2-eth on the fsl-mc bus). A device link between the switch and the DSA master causes device_links_unbind_consumers() to unbind the Felix switch driver during shutdown, triggering the problematic resource release. The fix involves consistent use of devres for both mdiobus allocation and registration or avoiding devres entirely. The Felix driver was updated to replace devm_mdiobus_alloc_size() with a non-devres variant and to add manual freeing where necessary, ensuring that devres does not free a still-registered bus. This correction prevents the kernel panic by ensuring orderly mdiobus removal and proper resource lifecycle management. No known exploits are reported in the wild, and the vulnerability primarily affects Linux kernel versions containing the affected commit hashes. This is a stability and reliability issue rather than a direct security compromise like privilege escalation or remote code execution.
Potential Impact
For European organizations, the impact of CVE-2022-48813 is primarily on system stability and reliability rather than direct data breach or compromise. Organizations running Linux systems with the affected kernel versions and using the Felix VSC9959 switch or similar DSA switch drivers in their network infrastructure could experience kernel panics or system crashes during device shutdown or removal. This could lead to unexpected downtime, disruption of network services, and potential data loss if systems are abruptly halted. Industries relying on embedded Linux systems, telecommunications equipment, or network devices using the Felix switch or DSA architecture may be particularly affected. Critical infrastructure providers, data centers, and enterprises with complex Linux-based networking hardware could face operational disruptions. While no direct exploitation for privilege escalation or remote attacks is known, the instability could be leveraged by attackers to cause denial-of-service conditions if they can trigger device shutdown sequences. Given the Linux kernel's widespread use in European IT environments, especially in telecommunications, cloud providers, and industrial control systems, ensuring kernel stability is crucial. The vulnerability does not expose confidential data or allow unauthorized access but can degrade service availability and reliability.
Mitigation Recommendations
1. Apply the official Linux kernel patches that address CVE-2022-48813 as soon as they are available and tested. This involves updating to kernel versions where the Felix driver uses consistent resource management for mdiobus allocation and deallocation. 2. For organizations using custom or embedded Linux kernels, backport the fix by replacing devm_mdiobus_alloc_size() with non-devres variants and adding manual mdiobus freeing as per the upstream patch. 3. Monitor system logs for kernel panics or errors related to mdiobus or DSA switch drivers, especially during device shutdown or removal sequences. 4. Implement controlled shutdown procedures for devices using the Felix VSC9959 switch to minimize unexpected device removal events until patches are applied. 5. Engage with hardware vendors and Linux distribution maintainers to confirm the presence of the fix in kernel updates and coordinate timely deployment. 6. Consider isolating critical network devices running affected drivers in maintenance windows to apply updates without impacting production workloads. 7. Maintain robust backup and recovery processes to mitigate potential data loss from unexpected system crashes.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy
CVE-2022-48813: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: net: dsa: felix: don't use devres for mdiobus As explained in commits: 74b6d7d13307 ("net: dsa: realtek: register the MDIO bus under devres") 5135e96a3dd2 ("net: dsa: don't allocate the slave_mii_bus using devres") mdiobus_free() will panic when called from devm_mdiobus_free() <- devres_release_all() <- __device_release_driver(), and that mdiobus was not previously unregistered. The Felix VSC9959 switch is a PCI device, so the initial set of constraints that I thought would cause this (I2C or SPI buses which call ->remove on ->shutdown) do not apply. But there is one more which applies here. If the DSA master itself is on a bus that calls ->remove from ->shutdown (like dpaa2-eth, which is on the fsl-mc bus), there is a device link between the switch and the DSA master, and device_links_unbind_consumers() will unbind the felix switch driver on shutdown. So the same treatment must be applied to all DSA switch drivers, which is: either use devres for both the mdiobus allocation and registration, or don't use devres at all. The felix driver has the code structure in place for orderly mdiobus removal, so just replace devm_mdiobus_alloc_size() with the non-devres variant, and add manual free where necessary, to ensure that we don't let devres free a still-registered bus.
AI-Powered Analysis
Technical Analysis
CVE-2022-48813 is a vulnerability in the Linux kernel's Distributed Switch Architecture (DSA) subsystem, specifically affecting the Felix VSC9959 switch driver. The issue arises from improper resource management related to the MDIO bus (mdiobus) allocation and deallocation. The vulnerability is rooted in the use of devres-managed resources for mdiobus allocation and registration. The devres framework in the Linux kernel automates resource management by associating resources with device lifetimes, freeing them automatically on device removal. However, in this case, mdiobus_free() is called from devm_mdiobus_free() during device release, but the mdiobus was not previously unregistered, causing a kernel panic. This improper sequence can lead to system instability or crashes during device shutdown or removal. The root cause is that the Felix VSC9959 switch is a PCI device, and the initial assumptions about bus types that trigger this issue (such as I2C or SPI buses) do not apply. Instead, the problem manifests when the DSA master device is on a bus that calls the ->remove method during shutdown (e.g., dpaa2-eth on the fsl-mc bus). A device link between the switch and the DSA master causes device_links_unbind_consumers() to unbind the Felix switch driver during shutdown, triggering the problematic resource release. The fix involves consistent use of devres for both mdiobus allocation and registration or avoiding devres entirely. The Felix driver was updated to replace devm_mdiobus_alloc_size() with a non-devres variant and to add manual freeing where necessary, ensuring that devres does not free a still-registered bus. This correction prevents the kernel panic by ensuring orderly mdiobus removal and proper resource lifecycle management. No known exploits are reported in the wild, and the vulnerability primarily affects Linux kernel versions containing the affected commit hashes. This is a stability and reliability issue rather than a direct security compromise like privilege escalation or remote code execution.
Potential Impact
For European organizations, the impact of CVE-2022-48813 is primarily on system stability and reliability rather than direct data breach or compromise. Organizations running Linux systems with the affected kernel versions and using the Felix VSC9959 switch or similar DSA switch drivers in their network infrastructure could experience kernel panics or system crashes during device shutdown or removal. This could lead to unexpected downtime, disruption of network services, and potential data loss if systems are abruptly halted. Industries relying on embedded Linux systems, telecommunications equipment, or network devices using the Felix switch or DSA architecture may be particularly affected. Critical infrastructure providers, data centers, and enterprises with complex Linux-based networking hardware could face operational disruptions. While no direct exploitation for privilege escalation or remote attacks is known, the instability could be leveraged by attackers to cause denial-of-service conditions if they can trigger device shutdown sequences. Given the Linux kernel's widespread use in European IT environments, especially in telecommunications, cloud providers, and industrial control systems, ensuring kernel stability is crucial. The vulnerability does not expose confidential data or allow unauthorized access but can degrade service availability and reliability.
Mitigation Recommendations
1. Apply the official Linux kernel patches that address CVE-2022-48813 as soon as they are available and tested. This involves updating to kernel versions where the Felix driver uses consistent resource management for mdiobus allocation and deallocation. 2. For organizations using custom or embedded Linux kernels, backport the fix by replacing devm_mdiobus_alloc_size() with non-devres variants and adding manual mdiobus freeing as per the upstream patch. 3. Monitor system logs for kernel panics or errors related to mdiobus or DSA switch drivers, especially during device shutdown or removal sequences. 4. Implement controlled shutdown procedures for devices using the Felix VSC9959 switch to minimize unexpected device removal events until patches are applied. 5. Engage with hardware vendors and Linux distribution maintainers to confirm the presence of the fix in kernel updates and coordinate timely deployment. 6. Consider isolating critical network devices running affected drivers in maintenance windows to apply updates without impacting production workloads. 7. Maintain robust backup and recovery processes to mitigate potential data loss from unexpected system crashes.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-07-16T11:38:08.898Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d982ec4522896dcbe6258
Added to database: 5/21/2025, 9:09:02 AM
Last enriched: 6/30/2025, 10:09:37 PM
Last updated: 8/15/2025, 12:21:22 PM
Views: 12
Related Threats
CVE-2025-53948: CWE-415 Double Free in Santesoft Sante PACS Server
HighCVE-2025-52584: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-46269: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-54862: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumCVE-2025-54759: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.