Skip to main content

CVE-2024-42287: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-42287cvecve-2024-42287
Published: Sat Aug 17 2024 (08/17/2024, 09:08:52 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: scsi: qla2xxx: Complete command early within lock A crash was observed while performing NPIV and FW reset, BUG: kernel NULL pointer dereference, address: 000000000000001c #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 1 PREEMPT_RT SMP NOPTI RIP: 0010:dma_direct_unmap_sg+0x51/0x1e0 RSP: 0018:ffffc90026f47b88 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000021 RCX: 0000000000000002 RDX: 0000000000000021 RSI: 0000000000000000 RDI: ffff8881041130d0 RBP: ffff8881041130d0 R08: 0000000000000000 R09: 0000000000000034 R10: ffffc90026f47c48 R11: 0000000000000031 R12: 0000000000000000 R13: 0000000000000000 R14: ffff8881565e4a20 R15: 0000000000000000 FS: 00007f4c69ed3d00(0000) GS:ffff889faac80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000001c CR3: 0000000288a50002 CR4: 00000000007706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: <TASK> ? __die_body+0x1a/0x60 ? page_fault_oops+0x16f/0x4a0 ? do_user_addr_fault+0x174/0x7f0 ? exc_page_fault+0x69/0x1a0 ? asm_exc_page_fault+0x22/0x30 ? dma_direct_unmap_sg+0x51/0x1e0 ? preempt_count_sub+0x96/0xe0 qla2xxx_qpair_sp_free_dma+0x29f/0x3b0 [qla2xxx] qla2xxx_qpair_sp_compl+0x60/0x80 [qla2xxx] __qla2x00_abort_all_cmds+0xa2/0x450 [qla2xxx] The command completion was done early while aborting the commands in driver unload path but outside lock to avoid the WARN_ON condition of performing dma_free_attr within the lock. However this caused race condition while command completion via multiple paths causing system crash. Hence complete the command early in unload path but within the lock to avoid race condition.

AI-Powered Analysis

AILast updated: 06/27/2025, 20:55:36 UTC

Technical Analysis

CVE-2024-42287 is a vulnerability identified in the Linux kernel specifically affecting the qla2xxx SCSI driver, which is used for QLogic Fibre Channel Host Bus Adapters (HBAs). The vulnerability arises from a race condition during command completion in the driver unload path. The root cause is that the driver completes commands early outside of a lock to avoid a WARN_ON condition related to performing dma_free_attr within the lock. However, this early completion outside the lock leads to a race condition when commands are completed via multiple paths simultaneously. This race condition can cause a NULL pointer dereference in kernel space, resulting in a kernel crash (kernel oops). The crash is triggered during operations involving NPIV (N_Port ID Virtualization) and firmware reset, which are common in virtualized storage environments. The kernel oops log shows a page fault due to supervisor read access of a non-present page, with the fault occurring in the dma_direct_unmap_sg function. The call trace indicates the fault happens during the freeing of DMA resources in the qla2xxx driver. The fix involves completing the command early but ensuring it is done within the lock to prevent the race condition. This vulnerability affects multiple Linux kernel versions as indicated by the affected commit hashes. While no known exploits are reported in the wild, the vulnerability can cause denial of service by crashing the kernel, impacting system availability. The vulnerability is particularly relevant for systems using QLogic HBAs in storage networks, especially in environments leveraging NPIV for virtualization.

Potential Impact

For European organizations, the impact of CVE-2024-42287 can be significant in sectors relying heavily on enterprise storage solutions using QLogic Fibre Channel HBAs, such as financial institutions, cloud service providers, telecommunications, and large data centers. A kernel crash caused by this vulnerability leads to system downtime, potentially disrupting critical business operations and services. In virtualized environments where NPIV is used to multiplex physical HBAs among multiple virtual machines, the risk of triggering this vulnerability increases, potentially affecting multiple tenants or services simultaneously. The denial of service could lead to loss of availability of storage resources, impacting data access and application performance. Additionally, repeated crashes may increase operational costs due to emergency patching and system recovery efforts. Although no direct data breach or privilege escalation is indicated, the availability impact alone can have cascading effects on business continuity and compliance with European regulations such as GDPR, which require maintaining service availability and data integrity.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernel to versions that include the patch for CVE-2024-42287 as soon as it becomes available. Since the vulnerability is in the qla2xxx driver, organizations using QLogic HBAs should verify the kernel version and driver updates from their Linux distribution vendors or directly from the Linux kernel mainline. In environments using NPIV, administrators should monitor for unusual kernel oops or crashes related to the qla2xxx driver and consider temporarily disabling NPIV or firmware reset operations if feasible until patched. Implementing robust monitoring and alerting for kernel panics and storage subsystem errors will aid in early detection. Additionally, organizations should review their backup and disaster recovery plans to minimize downtime impact. For critical systems, testing kernel updates in staging environments before production deployment is recommended to ensure stability. Collaboration with hardware vendors for firmware updates and driver support can further reduce risk. Finally, restricting administrative access and ensuring only trusted users can perform firmware resets or driver unloads will reduce accidental triggering of the vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-07-30T07:40:12.262Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9820c4522896dcbdccf2

Added to database: 5/21/2025, 9:08:48 AM

Last enriched: 6/27/2025, 8:55:36 PM

Last updated: 8/14/2025, 7:46:43 PM

Views: 11

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