Skip to main content

CVE-2024-57914: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-57914cvecve-2024-57914
Published: Sun Jan 19 2025 (01/19/2025, 11:52:35 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: usb: typec: tcpci: fix NULL pointer issue on shared irq case The tcpci_irq() may meet below NULL pointer dereference issue: [ 2.641851] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010 [ 2.641951] status 0x1, 0x37f [ 2.650659] Mem abort info: [ 2.656490] ESR = 0x0000000096000004 [ 2.660230] EC = 0x25: DABT (current EL), IL = 32 bits [ 2.665532] SET = 0, FnV = 0 [ 2.668579] EA = 0, S1PTW = 0 [ 2.671715] FSC = 0x04: level 0 translation fault [ 2.676584] Data abort info: [ 2.679459] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 [ 2.684936] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 2.689980] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 2.695284] [0000000000000010] user address but active_mm is swapper [ 2.701632] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP [ 2.707883] Modules linked in: [ 2.710936] CPU: 1 UID: 0 PID: 87 Comm: irq/111-2-0051 Not tainted 6.12.0-rc6-06316-g7f63786ad3d1-dirty #4 [ 2.720570] Hardware name: NXP i.MX93 11X11 EVK board (DT) [ 2.726040] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 2.732989] pc : tcpci_irq+0x38/0x318 [ 2.736647] lr : _tcpci_irq+0x14/0x20 [ 2.740295] sp : ffff80008324bd30 [ 2.743597] x29: ffff80008324bd70 x28: ffff800080107894 x27: ffff800082198f70 [ 2.750721] x26: ffff0000050e6680 x25: ffff000004d172ac x24: ffff0000050f0000 [ 2.757845] x23: ffff000004d17200 x22: 0000000000000001 x21: ffff0000050f0000 [ 2.764969] x20: ffff000004d17200 x19: 0000000000000000 x18: 0000000000000001 [ 2.772093] x17: 0000000000000000 x16: ffff80008183d8a0 x15: ffff00007fbab040 [ 2.779217] x14: ffff00007fb918c0 x13: 0000000000000000 x12: 000000000000017a [ 2.786341] x11: 0000000000000001 x10: 0000000000000a90 x9 : ffff80008324bd00 [ 2.793465] x8 : ffff0000050f0af0 x7 : ffff00007fbaa840 x6 : 0000000000000031 [ 2.800589] x5 : 000000000000017a x4 : 0000000000000002 x3 : 0000000000000002 [ 2.807713] x2 : ffff80008324bd3a x1 : 0000000000000010 x0 : 0000000000000000 [ 2.814838] Call trace: [ 2.817273] tcpci_irq+0x38/0x318 [ 2.820583] _tcpci_irq+0x14/0x20 [ 2.823885] irq_thread_fn+0x2c/0xa8 [ 2.827456] irq_thread+0x16c/0x2f4 [ 2.830940] kthread+0x110/0x114 [ 2.834164] ret_from_fork+0x10/0x20 [ 2.837738] Code: f9426420 f9001fe0 d2800000 52800201 (f9400a60) This may happen on shared irq case. Such as two Type-C ports share one irq. After the first port finished tcpci_register_port(), it may trigger interrupt. However, if the interrupt comes by chance the 2nd port finishes devm_request_threaded_irq(), the 2nd port interrupt handler will run at first. Then the above issue happens due to tcpci is still a NULL pointer in tcpci_irq() when dereference to regmap. devm_request_threaded_irq() <-- port1 irq comes disable_irq(client->irq); tcpci_register_port() This will restore the logic to the state before commit (77e85107a771 "usb: typec: tcpci: support edge irq"). However, moving tcpci_register_port() earlier creates a problem when use edge irq because tcpci_init() will be called before devm_request_threaded_irq(). The tcpci_init() writes the ALERT_MASK to the hardware to tell it to start generating interrupts but we're not ready to deal with them yet, then the ALERT events may be missed and ALERT line will not recover to high level forever. To avoid the issue, this will also set ALERT_MASK register after devm_request_threaded_irq() return.

AI-Powered Analysis

AILast updated: 06/28/2025, 08:55:51 UTC

Technical Analysis

CVE-2024-57914 is a vulnerability identified in the Linux kernel's USB Type-C Port Controller Interface (TCPCI) driver, specifically in the interrupt handling logic for shared IRQ (interrupt request) scenarios. The vulnerability arises due to a NULL pointer dereference in the tcpci_irq() function when two Type-C ports share a single IRQ line. The root cause is a race condition between the registration of the second port's interrupt handler and the arrival of interrupts. If an interrupt for the second port occurs before its tcpci structure is fully initialized (tcpci_register_port() has completed), the interrupt handler attempts to dereference a NULL pointer, leading to a kernel NULL pointer dereference and consequent kernel panic or system crash. This is evidenced by kernel oops messages and memory abort information indicating an invalid memory access at address 0x10. The issue stems from the order of operations in the driver: tcpci_register_port() is called after devm_request_threaded_irq(), which can cause the interrupt handler to run before the tcpci pointer is set. The fix involves restoring the logic to call tcpci_register_port() earlier but also adjusting the ALERT_MASK register setting to occur after devm_request_threaded_irq() returns, ensuring the hardware interrupt alerts are correctly managed and no interrupts are missed. This vulnerability affects Linux kernel versions containing the commit 77e85107a7717ecb755cf77a2752a2aadd28c4e3 and likely other versions with similar driver code. It is a stability and availability issue rather than a direct confidentiality or integrity compromise, as it causes kernel crashes via NULL pointer dereference. No known exploits are reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, this vulnerability primarily impacts the availability and stability of Linux-based systems that utilize USB Type-C ports managed by the TCPCI driver, especially those where multiple Type-C ports share a single IRQ line. This includes embedded devices, industrial control systems, IoT devices, and general-purpose servers or workstations running affected Linux kernels. A successful exploitation leads to kernel crashes, causing system reboots or downtime, which can disrupt business operations, critical infrastructure, or service availability. While it does not directly expose data confidentiality or integrity, repeated crashes could lead to denial of service conditions. Organizations relying on Linux for critical infrastructure, manufacturing, or telecommunications could face operational interruptions. The impact is more pronounced in environments with high USB Type-C device usage or custom hardware configurations employing shared IRQs. Since the vulnerability is in the kernel, it affects all users of the vulnerable kernel versions, including cloud providers and enterprises using Linux distributions based on affected kernels. The lack of known exploits suggests limited immediate threat, but the potential for denial of service warrants timely remediation.

Mitigation Recommendations

European organizations should promptly update their Linux kernels to versions that include the fix for CVE-2024-57914. Kernel updates should be sourced from trusted Linux distribution vendors or directly from the Linux kernel mainline if using custom builds. For embedded or IoT devices, firmware updates incorporating the patched kernel must be deployed. In environments where immediate patching is not feasible, organizations should monitor kernel logs for signs of NULL pointer dereference or kernel oops related to tcpci_irq and consider isolating affected hardware or disabling shared IRQ configurations if possible. Testing kernel updates in staging environments is recommended to ensure compatibility. Additionally, organizations should review their USB Type-C hardware configurations to avoid shared IRQ lines where feasible, reducing the attack surface. Implementing robust system monitoring and automated reboot mechanisms can help mitigate downtime caused by unexpected kernel crashes. Finally, maintaining an inventory of devices running vulnerable kernel versions will aid in prioritizing patch deployment.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-01-19T11:50:08.374Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9823c4522896dcbdea23

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

Last enriched: 6/28/2025, 8:55:51 AM

Last updated: 8/15/2025, 11:14:10 PM

Views: 18

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