Skip to main content

CVE-2024-35977: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-35977cvecve-2024-35977
Published: Mon May 20 2024 (05/20/2024, 09:42:03 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: platform/chrome: cros_ec_uart: properly fix race condition The cros_ec_uart_probe() function calls devm_serdev_device_open() before it calls serdev_device_set_client_ops(). This can trigger a NULL pointer dereference: BUG: kernel NULL pointer dereference, address: 0000000000000000 ... Call Trace: <TASK> ... ? ttyport_receive_buf A simplified version of crashing code is as follows: static inline size_t serdev_controller_receive_buf(struct serdev_controller *ctrl, const u8 *data, size_t count) { struct serdev_device *serdev = ctrl->serdev; if (!serdev || !serdev->ops->receive_buf) // CRASH! return 0; return serdev->ops->receive_buf(serdev, data, count); } It assumes that if SERPORT_ACTIVE is set and serdev exists, serdev->ops will also exist. This conflicts with the existing cros_ec_uart_probe() logic, as it first calls devm_serdev_device_open() (which sets SERPORT_ACTIVE), and only later sets serdev->ops via serdev_device_set_client_ops(). Commit 01f95d42b8f4 ("platform/chrome: cros_ec_uart: fix race condition") attempted to fix a similar race condition, but while doing so, made the window of error for this race condition to happen much wider. Attempt to fix the race condition again, making sure we fully setup before calling devm_serdev_device_open().

AI-Powered Analysis

AILast updated: 06/29/2025, 08:54:54 UTC

Technical Analysis

CVE-2024-35977 is a vulnerability identified in the Linux kernel specifically affecting the Chrome OS embedded controller UART driver (cros_ec_uart). The root cause is a race condition in the cros_ec_uart_probe() function where the sequence of operations leads to a NULL pointer dereference. The function devm_serdev_device_open() is called before serdev_device_set_client_ops(), which means the serdev_device's ops pointer is not yet initialized when the system assumes it is valid. This results in a kernel crash due to dereferencing a NULL pointer in serdev_controller_receive_buf(), which expects serdev->ops->receive_buf to be valid if the SERPORT_ACTIVE flag is set. An earlier attempt to fix a similar race condition (commit 01f95d42b8f4) inadvertently widened the window for this race condition to occur. The current fix ensures that the device client operations are fully set up before calling devm_serdev_device_open(), thus preventing the race condition and the resulting kernel NULL pointer dereference. This vulnerability can cause system instability or denial of service (DoS) by crashing the kernel when the race condition is triggered. It affects Linux kernel versions containing the faulty commit and is particularly relevant to Chrome OS devices using this embedded controller UART driver. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, this vulnerability primarily poses a risk of denial of service through kernel crashes on affected Linux systems, especially those running Chrome OS or Linux distributions that include the vulnerable cros_ec_uart driver. Organizations relying on Chrome OS devices for endpoint computing or embedded Linux systems with this driver could experience unexpected system reboots or downtime, impacting productivity and operational continuity. While this vulnerability does not appear to allow privilege escalation or remote code execution directly, the resulting kernel panic could be exploited in targeted denial-of-service attacks, potentially disrupting critical services or user environments. Given the widespread use of Linux in enterprise servers, embedded devices, and IoT systems, the impact could extend to infrastructure stability if affected devices are deployed in critical roles. However, the scope is somewhat limited to systems using this specific driver and kernel version. The absence of known exploits reduces immediate risk but does not eliminate the need for timely patching to prevent future exploitation attempts.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernel to versions where this race condition is fixed, ensuring that the cros_ec_uart_probe() function fully initializes client operations before opening the serdev device. Specifically, they should track and apply kernel patches that address commit 01f95d42b8f4 and subsequent fixes related to this issue. For Chrome OS deployments, administrators should apply official Chrome OS updates that include this fix. Additionally, organizations should audit their device inventory to identify systems running affected kernel versions with the cros_ec_uart driver enabled. Where immediate patching is not feasible, mitigating controls include limiting access to vulnerable devices, monitoring kernel logs for signs of NULL pointer dereferences or crashes related to serdev devices, and implementing robust system restart and recovery procedures to minimize downtime. Testing updates in controlled environments before wide deployment is recommended to avoid regressions. Finally, maintain vigilance for any emerging exploit reports or security advisories related to this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-17T13:50:33.143Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9828c4522896dcbe2360

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

Last enriched: 6/29/2025, 8:54:54 AM

Last updated: 7/31/2025, 4:20:33 AM

Views: 13

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