Skip to main content

CVE-2022-49504: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2022-49504cvecve-2022-49504
Published: Wed Feb 26 2025 (02/26/2025, 02:13:36 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: scsi: lpfc: Inhibit aborts if external loopback plug is inserted After running a short external loopback test, when the external loopback is removed and a normal cable inserted that is directly connected to a target device, the system oops in the llpfc_set_rrq_active() routine. When the loopback was inserted an FLOGI was transmit. As we're looped back, we receive the FLOGI request. The FLOGI is ABTS'd as we recognize the same wppn thus understand it's a loopback. However, as the ABTS sends address information the port is not set to (fffffe), the ABTS is dropped on the wire. A short 1 frame loopback test is run and completes before the ABTS times out. The looback is unplugged and the new cable plugged in, and the an FLOGI to the new device occurs and completes. Due to a mixup in ref counting the completion of the new FLOGI releases the fabric ndlp. Then the original ABTS completes and references the released ndlp generating the oops. Correct by no-op'ing the ABTS when in loopback mode (it will be dropped anyway). Added a flag to track the mode to recognize when it should be no-op'd.

AI-Powered Analysis

AILast updated: 06/30/2025, 16:57:43 UTC

Technical Analysis

CVE-2022-49504 is a vulnerability identified in the Linux kernel's SCSI subsystem, specifically within the lpfc (LightPulse Fibre Channel) driver. The issue arises during the handling of external loopback tests on Fibre Channel ports. When an external loopback plug is inserted, the system transmits a Fabric Login (FLOGI) request that is looped back and recognized as a loopback due to matching World Wide Port Names (WWPNs). The FLOGI is aborted (ABTS) because it is identified as a loopback, but the abort sequence is improperly handled because the port address is not set correctly (not set to fffffe), causing the ABTS to be dropped on the wire. After a short loopback test completes, the loopback plug is removed and replaced with a normal cable connected to a target device. A new FLOGI is sent and completes successfully. However, due to incorrect reference counting in the driver, the completion of the new FLOGI releases the fabric node (ndlp) prematurely. When the original ABTS completes afterward, it references the already released ndlp, leading to a kernel oops (crash) in the llpfc_set_rrq_active() routine. This vulnerability can cause system instability and crashes when performing loopback tests followed by normal device connections. The fix involves no-op'ing the ABTS during loopback mode and adding a flag to track loopback state to prevent improper handling of ABTS frames. This correction prevents the kernel oops by ensuring that aborted sequences during loopback are safely ignored, maintaining proper reference counts and fabric node states.

Potential Impact

For European organizations running Linux servers or systems with Fibre Channel storage connectivity using the lpfc driver, this vulnerability could lead to unexpected kernel crashes and system instability during maintenance or diagnostic operations involving external loopback tests. Such crashes could disrupt critical storage access, potentially causing downtime or data unavailability. Organizations relying on Fibre Channel SANs for high-availability storage, such as financial institutions, healthcare providers, and large enterprises, may experience operational interruptions. Although this vulnerability does not appear to allow remote code execution or privilege escalation, the denial of service caused by kernel oops can impact service continuity and data integrity indirectly. The lack of known exploits in the wild reduces immediate risk, but the vulnerability could be triggered inadvertently during routine hardware diagnostics or cable replacements, making it a reliability concern for production environments.

Mitigation Recommendations

European organizations should ensure that their Linux kernel versions are updated to include the patch that addresses CVE-2022-49504. Since no patch links are provided in the description, organizations should monitor official Linux kernel repositories and vendor advisories for the relevant fix. Specifically, updating the lpfc driver to the fixed version that no-ops ABTS frames during loopback mode and tracks loopback state is essential. Additionally, organizations should implement operational controls to avoid performing external loopback tests on production systems without proper safeguards or during critical operational periods. Testing loopback procedures in isolated environments before applying them in production can reduce the risk of triggering the vulnerability. Monitoring kernel logs for oops events related to lpfc can help detect attempts to exploit or inadvertently trigger the issue. Finally, coordinating with hardware vendors for firmware updates or configuration guidance on Fibre Channel adapters may provide additional stability.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d982ec4522896dcbe5c54

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

Last enriched: 6/30/2025, 4:57:43 PM

Last updated: 7/26/2025, 5:27:36 AM

Views: 12

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