CVE-2022-49626: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: sfc: fix use after free when disabling sriov Use after free is detected by kfence when disabling sriov. What was read after being freed was vf->pci_dev: it was freed from pci_disable_sriov and later read in efx_ef10_sriov_free_vf_vports, called from efx_ef10_sriov_free_vf_vswitching. Set the pointer to NULL at release time to not trying to read it later. Reproducer and dmesg log (note that kfence doesn't detect it every time): $ echo 1 > /sys/class/net/enp65s0f0np0/device/sriov_numvfs $ echo 0 > /sys/class/net/enp65s0f0np0/device/sriov_numvfs BUG: KFENCE: use-after-free read in efx_ef10_sriov_free_vf_vswitching+0x82/0x170 [sfc] Use-after-free read at 0x00000000ff3c1ba5 (in kfence-#224): efx_ef10_sriov_free_vf_vswitching+0x82/0x170 [sfc] efx_ef10_pci_sriov_disable+0x38/0x70 [sfc] efx_pci_sriov_configure+0x24/0x40 [sfc] sriov_numvfs_store+0xfe/0x140 kernfs_fop_write_iter+0x11c/0x1b0 new_sync_write+0x11f/0x1b0 vfs_write+0x1eb/0x280 ksys_write+0x5f/0xe0 do_syscall_64+0x5c/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae kfence-#224: 0x00000000edb8ef95-0x00000000671f5ce1, size=2792, cache=kmalloc-4k allocated by task 6771 on cpu 10 at 3137.860196s: pci_alloc_dev+0x21/0x60 pci_iov_add_virtfn+0x2a2/0x320 sriov_enable+0x212/0x3e0 efx_ef10_sriov_configure+0x67/0x80 [sfc] efx_pci_sriov_configure+0x24/0x40 [sfc] sriov_numvfs_store+0xba/0x140 kernfs_fop_write_iter+0x11c/0x1b0 new_sync_write+0x11f/0x1b0 vfs_write+0x1eb/0x280 ksys_write+0x5f/0xe0 do_syscall_64+0x5c/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae freed by task 6771 on cpu 12 at 3170.991309s: device_release+0x34/0x90 kobject_cleanup+0x3a/0x130 pci_iov_remove_virtfn+0xd9/0x120 sriov_disable+0x30/0xe0 efx_ef10_pci_sriov_disable+0x57/0x70 [sfc] efx_pci_sriov_configure+0x24/0x40 [sfc] sriov_numvfs_store+0xfe/0x140 kernfs_fop_write_iter+0x11c/0x1b0 new_sync_write+0x11f/0x1b0 vfs_write+0x1eb/0x280 ksys_write+0x5f/0xe0 do_syscall_64+0x5c/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae
AI Analysis
Technical Summary
CVE-2022-49626 is a high-severity use-after-free vulnerability in the Linux kernel's sfc driver, specifically related to the handling of Single Root I/O Virtualization (SR-IOV) functionality. SR-IOV allows a physical PCIe device, such as a network interface card (NIC), to present itself as multiple virtual devices (Virtual Functions or VFs) to the operating system, enabling efficient sharing of hardware resources in virtualized environments. The vulnerability arises when disabling SR-IOV on a device. During this process, the kernel frees the PCI device structure associated with a virtual function (vf->pci_dev) but does not immediately nullify the pointer. Subsequent code attempts to read from this freed pointer in the function efx_ef10_sriov_free_vf_vswitching, leading to a use-after-free condition. This flaw was detected by the Kernel Electric Fence (kfence) memory debugging tool, which identified that after pci_disable_sriov frees the PCI device, later code still accesses the freed memory. The root cause is a missing nullification of the pointer after freeing, allowing stale references to be dereferenced. Exploiting this vulnerability could allow a local attacker with privileges to write to the sysfs interface controlling SR-IOV (e.g., writing to /sys/class/net/<device>/device/sriov_numvfs) to trigger a kernel crash or potentially execute arbitrary code with kernel privileges. The vulnerability affects Linux kernel versions containing the sfc driver with the identified commit hashes. The CVSS v3.1 score is 7.8 (high), reflecting local attack vector with low complexity, requiring privileges but no user interaction, and impacting confidentiality, integrity, and availability. No known exploits are reported in the wild yet. The fix involves setting the pointer to NULL immediately after freeing to prevent later use. This vulnerability is categorized under CWE-416 (Use After Free).
Potential Impact
For European organizations, especially those operating data centers, cloud infrastructure, or virtualized environments using Linux servers with SR-IOV capable NICs (notably Solarflare/ Xilinx NICs using the sfc driver), this vulnerability poses a significant risk. Exploitation could lead to kernel crashes causing denial of service, or potentially privilege escalation allowing attackers to gain kernel-level control. This could compromise confidentiality and integrity of sensitive data and disrupt critical services. Industries relying on high-performance networking such as telecommunications, finance, and cloud service providers in Europe are particularly at risk. The requirement for local privileges limits remote exploitation but insider threats or compromised accounts could leverage this vulnerability. The absence of known exploits reduces immediate risk but patching is critical to prevent future attacks. The vulnerability could also impact embedded systems or network appliances running affected Linux kernels, which are common in European industrial and governmental networks.
Mitigation Recommendations
1. Immediate application of Linux kernel patches that address CVE-2022-49626 is essential. Monitor vendor advisories and update kernels to versions including the fix. 2. Restrict write access to the sysfs interface controlling sriov_numvfs to trusted administrators only, minimizing the risk of unprivileged or unauthorized users triggering the vulnerability. 3. Employ kernel memory debugging tools like kfence in testing environments to detect similar use-after-free issues proactively. 4. Implement strict access controls and monitoring on systems with SR-IOV enabled NICs to detect anomalous attempts to modify SR-IOV settings. 5. For virtualized environments, consider disabling SR-IOV temporarily if patching is delayed, balancing performance needs against security risks. 6. Maintain up-to-date inventory of hardware using the sfc driver and assess exposure. 7. Incorporate this vulnerability into incident response plans to quickly address potential exploitation attempts.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Norway, Denmark
CVE-2022-49626: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: sfc: fix use after free when disabling sriov Use after free is detected by kfence when disabling sriov. What was read after being freed was vf->pci_dev: it was freed from pci_disable_sriov and later read in efx_ef10_sriov_free_vf_vports, called from efx_ef10_sriov_free_vf_vswitching. Set the pointer to NULL at release time to not trying to read it later. Reproducer and dmesg log (note that kfence doesn't detect it every time): $ echo 1 > /sys/class/net/enp65s0f0np0/device/sriov_numvfs $ echo 0 > /sys/class/net/enp65s0f0np0/device/sriov_numvfs BUG: KFENCE: use-after-free read in efx_ef10_sriov_free_vf_vswitching+0x82/0x170 [sfc] Use-after-free read at 0x00000000ff3c1ba5 (in kfence-#224): efx_ef10_sriov_free_vf_vswitching+0x82/0x170 [sfc] efx_ef10_pci_sriov_disable+0x38/0x70 [sfc] efx_pci_sriov_configure+0x24/0x40 [sfc] sriov_numvfs_store+0xfe/0x140 kernfs_fop_write_iter+0x11c/0x1b0 new_sync_write+0x11f/0x1b0 vfs_write+0x1eb/0x280 ksys_write+0x5f/0xe0 do_syscall_64+0x5c/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae kfence-#224: 0x00000000edb8ef95-0x00000000671f5ce1, size=2792, cache=kmalloc-4k allocated by task 6771 on cpu 10 at 3137.860196s: pci_alloc_dev+0x21/0x60 pci_iov_add_virtfn+0x2a2/0x320 sriov_enable+0x212/0x3e0 efx_ef10_sriov_configure+0x67/0x80 [sfc] efx_pci_sriov_configure+0x24/0x40 [sfc] sriov_numvfs_store+0xba/0x140 kernfs_fop_write_iter+0x11c/0x1b0 new_sync_write+0x11f/0x1b0 vfs_write+0x1eb/0x280 ksys_write+0x5f/0xe0 do_syscall_64+0x5c/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae freed by task 6771 on cpu 12 at 3170.991309s: device_release+0x34/0x90 kobject_cleanup+0x3a/0x130 pci_iov_remove_virtfn+0xd9/0x120 sriov_disable+0x30/0xe0 efx_ef10_pci_sriov_disable+0x57/0x70 [sfc] efx_pci_sriov_configure+0x24/0x40 [sfc] sriov_numvfs_store+0xfe/0x140 kernfs_fop_write_iter+0x11c/0x1b0 new_sync_write+0x11f/0x1b0 vfs_write+0x1eb/0x280 ksys_write+0x5f/0xe0 do_syscall_64+0x5c/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae
AI-Powered Analysis
Technical Analysis
CVE-2022-49626 is a high-severity use-after-free vulnerability in the Linux kernel's sfc driver, specifically related to the handling of Single Root I/O Virtualization (SR-IOV) functionality. SR-IOV allows a physical PCIe device, such as a network interface card (NIC), to present itself as multiple virtual devices (Virtual Functions or VFs) to the operating system, enabling efficient sharing of hardware resources in virtualized environments. The vulnerability arises when disabling SR-IOV on a device. During this process, the kernel frees the PCI device structure associated with a virtual function (vf->pci_dev) but does not immediately nullify the pointer. Subsequent code attempts to read from this freed pointer in the function efx_ef10_sriov_free_vf_vswitching, leading to a use-after-free condition. This flaw was detected by the Kernel Electric Fence (kfence) memory debugging tool, which identified that after pci_disable_sriov frees the PCI device, later code still accesses the freed memory. The root cause is a missing nullification of the pointer after freeing, allowing stale references to be dereferenced. Exploiting this vulnerability could allow a local attacker with privileges to write to the sysfs interface controlling SR-IOV (e.g., writing to /sys/class/net/<device>/device/sriov_numvfs) to trigger a kernel crash or potentially execute arbitrary code with kernel privileges. The vulnerability affects Linux kernel versions containing the sfc driver with the identified commit hashes. The CVSS v3.1 score is 7.8 (high), reflecting local attack vector with low complexity, requiring privileges but no user interaction, and impacting confidentiality, integrity, and availability. No known exploits are reported in the wild yet. The fix involves setting the pointer to NULL immediately after freeing to prevent later use. This vulnerability is categorized under CWE-416 (Use After Free).
Potential Impact
For European organizations, especially those operating data centers, cloud infrastructure, or virtualized environments using Linux servers with SR-IOV capable NICs (notably Solarflare/ Xilinx NICs using the sfc driver), this vulnerability poses a significant risk. Exploitation could lead to kernel crashes causing denial of service, or potentially privilege escalation allowing attackers to gain kernel-level control. This could compromise confidentiality and integrity of sensitive data and disrupt critical services. Industries relying on high-performance networking such as telecommunications, finance, and cloud service providers in Europe are particularly at risk. The requirement for local privileges limits remote exploitation but insider threats or compromised accounts could leverage this vulnerability. The absence of known exploits reduces immediate risk but patching is critical to prevent future attacks. The vulnerability could also impact embedded systems or network appliances running affected Linux kernels, which are common in European industrial and governmental networks.
Mitigation Recommendations
1. Immediate application of Linux kernel patches that address CVE-2022-49626 is essential. Monitor vendor advisories and update kernels to versions including the fix. 2. Restrict write access to the sysfs interface controlling sriov_numvfs to trusted administrators only, minimizing the risk of unprivileged or unauthorized users triggering the vulnerability. 3. Employ kernel memory debugging tools like kfence in testing environments to detect similar use-after-free issues proactively. 4. Implement strict access controls and monitoring on systems with SR-IOV enabled NICs to detect anomalous attempts to modify SR-IOV settings. 5. For virtualized environments, consider disabling SR-IOV temporarily if patching is delayed, balancing performance needs against security risks. 6. Maintain up-to-date inventory of hardware using the sfc driver and assess exposure. 7. Incorporate this vulnerability into incident response plans to quickly address potential exploitation attempts.
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
- 2025-02-26T02:21:30.421Z
- Cisa Enriched
- true
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 682d982cc4522896dcbe4671
Added to database: 5/21/2025, 9:09:00 AM
Last enriched: 7/3/2025, 2:09:53 AM
Last updated: 8/17/2025, 1:12:27 PM
Views: 11
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.