# CVE-2024-35977: platform/chrome: cros\_ec\_uart: properly fix race condition

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.7
- **CVSS:** 4.7 (v3.1, NVD) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.22% (percentile 7, 2026-11-26)
- **CWE:** CWE-362, CWE-476
- **Published:** 2024-05-20T09:42:03.077Z
- **Modified:** 2026-06-17T07:35:51.797Z

## Who should check

- Anyone running Linux \>= 01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9, \< cfd758041d8b79aa8c3f811b6bd6105379f2f702; \>= 01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9, \< 9e9bb74a93b7daa32313ccaefd0edc529d40daf8; \>= 01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9, \< 5e700b384ec13f5bcac9855cb28fcc674f1d3593
- Anyone running Linux 6.3

## 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().

## Affected and fixed versions

- Linux: \>= 01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9, \< cfd758041d8b79aa8c3f811b6bd6105379f2f702; \>= 01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9, \< 9e9bb74a93b7daa32313ccaefd0edc529d40daf8; \>= 01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9, \< 5e700b384ec13f5bcac9855cb28fcc674f1d3593 (cvelist)
- Linux: 6.3 (cvelist)

## Mitigation

- Upgrade Linux to 5e700b384ec13f5bcac9855cb28fcc674f1d3593 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-35977. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-35977.md
Affected: Linux >= 01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9, < cfd758041d8b79aa8c3f811b6bd6105379f2f702; >= 01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9, < 9e9bb74a93b7daa32313ccaefd0edc529d40daf8; >= 01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9, < 5e700b384ec13f5bcac9855cb28fcc674f1d3593; Linux 6.3
Fixed in: Linux 9e9bb74a93b7daa32313ccaefd0edc529d40daf8, Linux 5e700b384ec13f5bcac9855cb28fcc674f1d3593

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-35977 being exploited?

There is no confirmed exploitation: CVE-2024-35977 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.22% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-35977?

Medium: CVSS 4.7 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2024-35977?

Linux \>= 01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9, \< cfd758041d8b79aa8c3f811b6bd6105379f2f702; \>= 01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9, \< 9e9bb74a93b7daa32313ccaefd0edc529d40daf8; \>= 01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9, \< 5e700b384ec13f5bcac9855cb28fcc674f1d3593; Linux 6.3.

### Is there a fix for CVE-2024-35977?

Yes. Fixed in Linux 9e9bb74a93b7daa32313ccaefd0edc529d40daf8, Linux 5e700b384ec13f5bcac9855cb28fcc674f1d3593. Upgrade Linux to 5e700b384ec13f5bcac9855cb28fcc674f1d3593 or later.

### How do I check if I'm affected by CVE-2024-35977?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/cfd758041d8b79aa8c3f811b6bd6105379f2f702>
- patch: <https://git.kernel.org/stable/c/9e9bb74a93b7daa32313ccaefd0edc529d40daf8>
- patch: <https://git.kernel.org/stable/c/5e700b384ec13f5bcac9855cb28fcc674f1d3593>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-35977>

HTML: <https://flawdb.com/CVE-2024-35977> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-35977>
