Skip to main content

CVE-2024-50224: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-50224cvecve-2024-50224
Published: Sat Nov 09 2024 (11/09/2024, 10:14:35 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: spi: spi-fsl-dspi: Fix crash when not using GPIO chip select Add check for the return value of spi_get_csgpiod() to avoid passing a NULL pointer to gpiod_direction_output(), preventing a crash when GPIO chip select is not used. Fix below crash: [ 4.251960] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 4.260762] Mem abort info: [ 4.263556] ESR = 0x0000000096000004 [ 4.267308] EC = 0x25: DABT (current EL), IL = 32 bits [ 4.272624] SET = 0, FnV = 0 [ 4.275681] EA = 0, S1PTW = 0 [ 4.278822] FSC = 0x04: level 0 translation fault [ 4.283704] Data abort info: [ 4.286583] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 [ 4.292074] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 4.297130] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 4.302445] [0000000000000000] user address but active_mm is swapper [ 4.308805] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP [ 4.315072] Modules linked in: [ 4.318124] CPU: 2 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.0-rc4-next-20241023-00008-ga20ec42c5fc1 #359 [ 4.328130] Hardware name: LS1046A QDS Board (DT) [ 4.332832] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 4.339794] pc : gpiod_direction_output+0x34/0x5c [ 4.344505] lr : gpiod_direction_output+0x18/0x5c [ 4.349208] sp : ffff80008003b8f0 [ 4.352517] x29: ffff80008003b8f0 x28: 0000000000000000 x27: ffffc96bcc7e9068 [ 4.359659] x26: ffffc96bcc6e00b0 x25: ffffc96bcc598398 x24: ffff447400132810 [ 4.366800] x23: 0000000000000000 x22: 0000000011e1a300 x21: 0000000000020002 [ 4.373940] x20: 0000000000000000 x19: 0000000000000000 x18: ffffffffffffffff [ 4.381081] x17: ffff44740016e600 x16: 0000000500000003 x15: 0000000000000007 [ 4.388221] x14: 0000000000989680 x13: 0000000000020000 x12: 000000000000001e [ 4.395362] x11: 0044b82fa09b5a53 x10: 0000000000000019 x9 : 0000000000000008 [ 4.402502] x8 : 0000000000000002 x7 : 0000000000000007 x6 : 0000000000000000 [ 4.409641] x5 : 0000000000000200 x4 : 0000000002000000 x3 : 0000000000000000 [ 4.416781] x2 : 0000000000022202 x1 : 0000000000000000 x0 : 0000000000000000 [ 4.423921] Call trace: [ 4.426362] gpiod_direction_output+0x34/0x5c (P) [ 4.431067] gpiod_direction_output+0x18/0x5c (L) [ 4.435771] dspi_setup+0x220/0x334

AI-Powered Analysis

AILast updated: 06/28/2025, 13:11:03 UTC

Technical Analysis

CVE-2024-50224 is a vulnerability identified in the Linux kernel specifically affecting the spi-fsl-dspi driver, which is part of the SPI (Serial Peripheral Interface) subsystem. The root cause of the vulnerability is the lack of a proper null pointer check after calling spi_get_csgpiod(), a function that retrieves the GPIO chip select line. When the GPIO chip select is not used, spi_get_csgpiod() can return a NULL pointer. The vulnerable code then passes this NULL pointer to gpiod_direction_output(), which expects a valid GPIO descriptor. This leads to a NULL pointer dereference and causes a kernel crash (kernel oops) due to an invalid memory access at address 0x0. The crash occurs early in the boot process, as indicated by the kernel logs, and results in a denial of service (DoS) condition where the system becomes unstable or unresponsive. The vulnerability is triggered when the spi-fsl-dspi driver attempts to set the GPIO direction output without verifying the validity of the GPIO descriptor. The fix involves adding a check for the return value of spi_get_csgpiod() to ensure it is not NULL before calling gpiod_direction_output(), thereby preventing the crash. This vulnerability affects Linux kernel versions that include the faulty spi-fsl-dspi driver implementation prior to the patch. It is important to note that this issue is not known to be exploited in the wild at this time and does not involve privilege escalation or code execution, but it can cause system instability and denial of service on affected devices. The vulnerability is particularly relevant for embedded systems and hardware platforms using the Freescale/NXP LS1046A QDS Board or similar hardware that relies on this SPI driver. The technical details and kernel logs confirm the crash is due to a NULL pointer dereference in kernel space, which is a critical stability issue for any Linux-based system using this driver.

Potential Impact

For European organizations, the impact of CVE-2024-50224 primarily concerns operational stability and availability of Linux-based systems that utilize the spi-fsl-dspi driver, especially in embedded or industrial environments. Organizations relying on Linux kernels with this vulnerable driver on hardware platforms similar to the LS1046A QDS Board may experience unexpected system crashes leading to downtime. This can affect critical infrastructure, manufacturing systems, telecommunications equipment, and IoT devices that use SPI communication with Freescale/NXP hardware components. The denial of service caused by kernel crashes can disrupt business operations, cause data loss if systems are abruptly halted, and increase maintenance costs due to unplanned outages. While this vulnerability does not directly expose confidentiality or integrity risks, the availability impact can be significant in environments requiring high reliability and uptime. European sectors such as automotive manufacturing, industrial automation, and telecommunications, which often deploy embedded Linux systems, could be particularly vulnerable. Additionally, organizations involved in research or development using affected hardware platforms may face development delays or testing disruptions. Since no known exploits are reported, the immediate risk is moderate, but unpatched systems remain susceptible to accidental or targeted triggering of the crash, especially in environments where SPI devices are configured without GPIO chip selects.

Mitigation Recommendations

To mitigate CVE-2024-50224, European organizations should: 1) Apply the official Linux kernel patches that include the fix for spi-fsl-dspi driver to ensure the null pointer check is implemented. This requires updating to a kernel version released after the patch date (post-2024-11-09). 2) For embedded systems where kernel updates are challenging, consider recompiling the kernel with the patch or disabling the spi-fsl-dspi driver if it is not required. 3) Audit device configurations to verify whether GPIO chip selects are used in SPI setups; avoid configurations that omit GPIO chip selects if possible until patched. 4) Implement robust monitoring for kernel oops and system crashes to detect early signs of this vulnerability being triggered. 5) In development and testing environments, simulate scenarios without GPIO chip selects to validate system stability post-patch. 6) Coordinate with hardware vendors and Linux distribution maintainers to ensure timely delivery of patched kernel versions. 7) For critical infrastructure, establish fallback and recovery procedures to minimize downtime caused by potential crashes. These steps go beyond generic advice by focusing on configuration auditing, targeted patching, and operational monitoring specific to the affected SPI driver and hardware platforms.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-10-21T19:36:19.973Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9824c4522896dcbdf5a6

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

Last enriched: 6/28/2025, 1:11:03 PM

Last updated: 7/31/2025, 4:18:24 PM

Views: 10

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