CVE-2024-42287: scsi: qla2xxx: Complete command early within lock

Published Aug 17, 2024
·
Updated

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: errorcode(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 1 PREEMPTRT SMP NOPTI RIP: 0010:dmadirectunmapsg+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> ? diebody+0x1a/0x60 ? pagefaultoops+0x16f/0x4a0 ? douseraddrfault+0x174/0x7f0 ? excpagefault+0x69/0x1a0 ? asmexcpagefault+0x22/0x30 ? dmadirectunmapsg+0x51/0x1e0 ? preemptcountsub+0x96/0xe0 qla2xxxqpairspfreedma+0x29f/0x3b0 [qla2xxx] qla2xxxqpairspcompl+0x60/0x80 [qla2xxx] qla2x00abortallcmds+0xa2/0x450 [qla2xxx]

The command completion was done early while aborting the commands in driver unload path but outside lock to avoid the WARNON condition of performing dmafreeattr 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.

Affected Software

12 affected componentsFixes available
Linux Linux kernel>=5.4.240<5.4.282
Linux Linux kernel>=5.10.177<5.10.224
Linux Linux kernel>=5.15.105<5.15.165
Linux Linux kernel>=6.1.22<6.1.103
Linux Linux kernel>=6.2.9<6.3
Linux Linux kernel>=6.3<6.6.44
Linux Linux kernel>=6.7<6.10.3
debian/linux<=5.10.223-1
5.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1
debian/linux-6.1
6.1.129-1~deb11u1
Microsoft cbl2 kernel 5.15.164.1-1
Microsoft cbl2 kernel 5.15.167.1-1
Microsoft cbl2 kernel 5.15.164.1-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1
  2. Upgrade

    Upgrade debian/linux-6.1 to a version that resolves this vulnerability.

    Fixed in 6.1.129-1~deb11u1
  3. Upgrade

    Upgrade Linux kernel (scsi/qla2xxx) to a version that resolves this vulnerability.

    Patch scsi: qla2xxx: Complete command early within lock
  4. Configuration

    In the qla2xxx unload/abort completion flow, ensure command completion is performed early within the relevant lock (not outside the lock) to address the race condition and the NULL pointer dereference crash observed in dma_direct_unmap_sg+0x51/0x1e0.

    qla2xxx SCSI driver command completion timing = Complete the command early within the lock (and avoid completing it outside the lock) to prevent the WARN_ON path involving dma_free_attr within the lock while also avoiding the earlier NULL dereference/race described.

Event History

Aug 17, 2024
CVE Published
via MITRE·09:08 AM
Data Sourced
via MITRE·09:08 AM
DescriptionSeverity
Data Sourced
via NVD·09:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Oct 12, 2024
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
SeverityAffected Software
Updated
via Microsoft·07:00 AM
Description
Apr 27, 2025
Data Sourced
via Ubuntu·12:33 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-42287?

CVE-2024-42287 has not been assigned a specific CVSS score, but it addresses a critical kernel bug that could lead to crashes.

2

How do I fix CVE-2024-42287?

To fix CVE-2024-42287, you should upgrade to the latest patched version of the Linux kernel specified in your distribution's advisory.

3

What systems are affected by CVE-2024-42287?

CVE-2024-42287 affects various versions of the Linux kernel, particularly those prior to 5.10.224 and multiple versions between significant ranges.

4

What exploit does CVE-2024-42287 address?

CVE-2024-42287 addresses a vulnerability that allowed a kernel NULL pointer dereference during NPIV and firmware resets.

5

Can CVE-2024-42287 lead to unauthorized access?

CVE-2024-42287 does not directly lead to unauthorized access but may cause system crashes that could be exploited in certain environments.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203