Skip to main content

CVE-2022-49701: Vulnerability in Linux Linux

High
VulnerabilityCVE-2022-49701cvecve-2022-49701
Published: Wed Feb 26 2025 (02/26/2025, 02:24:21 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: scsi: ibmvfc: Allocate/free queue resource only during probe/remove Currently, the sub-queues and event pool resources are allocated/freed for every CRQ connection event such as reset and LPM. This exposes the driver to a couple issues. First the inefficiency of freeing and reallocating memory that can simply be resued after being sanitized. Further, a system under memory pressue runs the risk of allocation failures that could result in a crippled driver. Finally, there is a race window where command submission/compeletion can try to pull/return elements from/to an event pool that is being deleted or already has been deleted due to the lack of host state around freeing/allocating resources. The following is an example of list corruption following a live partition migration (LPM): Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Modules linked in: vfat fat isofs cdrom ext4 mbcache jbd2 nft_counter nft_compat nf_tables nfnetlink rpadlpar_io rpaphp xsk_diag nfsv3 nfs_acl nfs lockd grace fscache netfs rfkill bonding tls sunrpc pseries_rng drm drm_panel_orientation_quirks xfs libcrc32c dm_service_time sd_mod t10_pi sg ibmvfc scsi_transport_fc ibmveth vmx_crypto dm_multipath dm_mirror dm_region_hash dm_log dm_mod ipmi_devintf ipmi_msghandler fuse CPU: 0 PID: 2108 Comm: ibmvfc_0 Kdump: loaded Not tainted 5.14.0-70.9.1.el9_0.ppc64le #1 NIP: c0000000007c4bb0 LR: c0000000007c4bac CTR: 00000000005b9a10 REGS: c00000025c10b760 TRAP: 0700 Not tainted (5.14.0-70.9.1.el9_0.ppc64le) MSR: 800000000282b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 2800028f XER: 0000000f CFAR: c0000000001f55bc IRQMASK: 0 GPR00: c0000000007c4bac c00000025c10ba00 c000000002a47c00 000000000000004e GPR04: c0000031e3006f88 c0000031e308bd00 c00000025c10b768 0000000000000027 GPR08: 0000000000000000 c0000031e3009dc0 00000031e0eb0000 0000000000000000 GPR12: c0000031e2ffffa8 c000000002dd0000 c000000000187108 c00000020fcee2c0 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000000000000 0000000000000000 0000000000000000 c008000002f81300 GPR24: 5deadbeef0000100 5deadbeef0000122 c000000263ba6910 c00000024cc88000 GPR28: 000000000000003c c0000002430a0000 c0000002430ac300 000000000000c300 NIP [c0000000007c4bb0] __list_del_entry_valid+0x90/0x100 LR [c0000000007c4bac] __list_del_entry_valid+0x8c/0x100 Call Trace: [c00000025c10ba00] [c0000000007c4bac] __list_del_entry_valid+0x8c/0x100 (unreliable) [c00000025c10ba60] [c008000002f42284] ibmvfc_free_queue+0xec/0x210 [ibmvfc] [c00000025c10bb10] [c008000002f4246c] ibmvfc_deregister_scsi_channel+0xc4/0x160 [ibmvfc] [c00000025c10bba0] [c008000002f42580] ibmvfc_release_sub_crqs+0x78/0x130 [ibmvfc] [c00000025c10bc20] [c008000002f4f6cc] ibmvfc_do_work+0x5c4/0xc70 [ibmvfc] [c00000025c10bce0] [c008000002f4fdec] ibmvfc_work+0x74/0x1e8 [ibmvfc] [c00000025c10bda0] [c0000000001872b8] kthread+0x1b8/0x1c0 [c00000025c10be10] [c00000000000cd64] ret_from_kernel_thread+0x5c/0x64 Instruction dump: 40820034 38600001 38210060 4e800020 7c0802a6 7c641b78 3c62fe7a 7d254b78 3863b590 f8010070 4ba309cd 60000000 <0fe00000> 7c0802a6 3c62fe7a 3863b640 ---[ end trace 11a2b65a92f8b66c ]--- ibmvfc 30000003: Send warning. Receive queue closed, will retry. Add registration/deregistration helpers that are called instead during connection resets to sanitize and reconfigure the queues.

AI-Powered Analysis

AILast updated: 06/30/2025, 00:25:06 UTC

Technical Analysis

CVE-2022-49701 is a vulnerability identified in the Linux kernel's ibmvfc driver, which is responsible for handling SCSI over Fibre Channel on IBM Power Systems. The root cause of the vulnerability lies in the improper allocation and deallocation of queue resources during connection events such as resets and Live Partition Migrations (LPM). Specifically, the driver currently allocates and frees sub-queues and event pool resources for every CRQ (Command/Response Queue) connection event instead of only during probe and remove phases. This approach leads to inefficiencies and introduces a race condition. Under memory pressure, allocation failures can occur, potentially crippling the driver. More critically, there is a race window where command submission or completion operations may attempt to access event pool elements that are being deleted or have already been deleted due to the lack of proper host state management around resource freeing and allocation. This can cause list corruption and kernel panics, as demonstrated by the kernel oops trace provided, which shows an exception in kernel mode triggered by invalid list operations during LPM. The vulnerability can lead to system instability or denial of service (DoS) due to kernel crashes. The fix involves adding registration and deregistration helpers that sanitize and reconfigure queues only during connection resets, thereby preventing unsafe memory operations and race conditions.

Potential Impact

For European organizations, especially those operating IBM Power Systems running Linux with the ibmvfc driver, this vulnerability poses a significant risk to system stability and availability. The vulnerability can cause kernel panics and system crashes during routine operations such as Live Partition Migration, which is a common feature in enterprise virtualization environments. This can lead to unexpected downtime, impacting critical business applications and services. Organizations relying on these systems for data center operations, cloud services, or critical infrastructure may face operational disruptions. Additionally, the memory corruption and race conditions could potentially be leveraged by attackers to escalate privileges or execute arbitrary code, although no known exploits are reported at this time. The lack of authentication or user interaction requirements means that if an attacker has access to the affected system, they could trigger the vulnerability remotely or locally, increasing the attack surface. Given the importance of Linux in enterprise environments across Europe, the impact extends to sectors such as finance, manufacturing, telecommunications, and government services that utilize IBM Power Systems or similar configurations.

Mitigation Recommendations

European organizations should prioritize applying the patch or kernel update that addresses CVE-2022-49701 as soon as it becomes available from their Linux distribution vendors. Until patched, organizations should: 1) Limit access to systems running the ibmvfc driver to trusted administrators and restrict network access to reduce the risk of exploitation. 2) Monitor system logs for kernel oops or ibmvfc-related errors that may indicate attempts to trigger the vulnerability. 3) Avoid performing Live Partition Migrations or other CRQ connection events during periods of high memory pressure to reduce the likelihood of allocation failures. 4) Implement robust memory and resource monitoring to detect abnormal resource allocation patterns. 5) Engage with IBM and Linux vendor support channels to obtain backported fixes if using older kernel versions. 6) Test patches in staging environments to ensure compatibility and stability before production deployment. 7) Consider deploying additional kernel hardening and runtime protection mechanisms to mitigate potential exploitation of race conditions and memory corruption.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-02-26T02:21:30.443Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d982cc4522896dcbe48ae

Added to database: 5/21/2025, 9:09:00 AM

Last enriched: 6/30/2025, 12:25:06 AM

Last updated: 8/15/2025, 12:03:00 AM

Views: 14

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats