SecurityContext

CVE-2024-35977: Linux Kernel - Race Condition

  • Cve: CVE-2024-35977
  • Name: Linux Kernel - Race Condition
  • 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().
  • Impact: Kernel NULL pointer dereference can cause system crashes or instability, potentially leading to denial of service.
  • Remediation: Reorder setup to fully initialize serdev before calling devm_serdev_device_open().
  • Vulnerability type: race_condition
  • Vulnerability impact: denial_of_service
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 4.7
  • Cvss vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
  • Epss score: 0.00174
  • Epss percentile: 0.06861
  • Assignee: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  • Published at: 2024-05-20T10:15:12Z
  • Age in days: 918
  • Modified at: 2026-06-17T07:35:51Z
  • Patch available: yes
  • References total: 3
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-35977
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-362Concurrent Execution using Shared Resource with Improper Synchronization

References

Same in every row:

  • Source: nvd
  • Tags: Patch
Url
https://git.kernel.org/stable/c/5e700b384ec13f5bcac9855cb28fcc674f1d3593
https://git.kernel.org/stable/c/9e9bb74a93b7daa32313ccaefd0edc529d40daf8
https://git.kernel.org/stable/c/cfd758041d8b79aa8c3f811b6bd6105379f2f702

Products

ProductAffectedPlatform boundSourcesUrl
linux:linux_kernel= 6.9 rc1; = 6.9 rc2; = 6.9 rc3; >= 6.7, < 6.8.7; >= 6.3, < 6.6.28nonvd/v1/products/linux/linux_kernel

Projects

RepositoryLink kindsIndexedUrl
torvalds/linuxcna_commit, commityes/v1/repositories/torvalds/linux

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Authentication required: yes
  • Exposed hosts: 10038339
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports