Look up another CVE · open CVE-2025-37800 in the interactive tracker
CVE-2025-37800
driver core: fix potential NULL pointer dereference in dev_uevent()
Published 2025-05-08 (17 months ago) by the Linux kernel CNA. Subsystem drivers/base. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2025-37800 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | fixed | 6.12.27-1 | Update the kernel and reboot. Fixed in 6.12.27-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.12.27-1 | Update the kernel and reboot. Fixed in 6.12.27-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.12.27-1 | Update the kernel and reboot. Fixed in 6.12.27-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
If userspace reads "uevent" device attribute at the same time as another threads unbinds the device from its driver, change to dev->driver from a valid pointer to NULL may result in crash. Fix this by using READ_ONCE() when fetching the pointer, and take bus' drivers klist lock to make sure driver instance will not disappear while we access it. Use WRITE_ONCE() when setting the driver pointer to ensure there is no tearing.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
drivers/base/base.h
drivers/base/bus.c
drivers/base/core.c
- What this is
- DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFSMAINTAINERS section matched on drivers/base/ · driver-core@lists.linux.dev · Supported
Show whether Debian builds this, per release
Debian builds this code. Every release below compiles the affected file into the kernels it ships.
- bookworm, trixie, forky, sidy
- y
- built into the kernel image on every flavour - only a patch removes it
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS Debian linux-config packages
Signals
- Published
- 2025-05-08 (17 months ago)source
- CVSS
- 7.1 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.21%, higher than 10.1% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- drivers/base
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 2.6.22 | 6.6.89 | abe56be73eb1 |
| 2.6.22 | 6.12.26 | 2b344e779d9a |
| 2.6.22 | 6.14.5 | 3781e4b83e17 |
| 2.6.22 | 6.15 | 18daa52418e7 |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- The vulnerable code is reached by read(2) on a sysfs file (`/sys/devices/**/uevent`) and the racing unbind via ioctl on `/dev/bus/usb/*`, both requiring a local account on the system. There is no network-facing path into `dev_uevent()`.
- AC:LAttack complexity, low
- The attacker controls both sides of the race: an unprivileged thread spins reading the world-readable `uevent` attribute while another thread toggles `USBDEVFS_DISCONNECT`/`USBDEVFS_CONNECT` (or CLAIM/RELEASE_INTERFACE) on the same USB interface, driving `dev->driver` between a valid pointer and NULL at will. No condition depends on state outside the attacker's influence, and the window can be retried indefinitely at high rate.
- PR:LPrivileges required, low
- `dev_attr_uevent` is DEVICE_ATTR_RW (0644), so any unprivileged local user can read it, and the usbfs disconnect/connect ioctls have no `capable()` check — only rw access to a `/dev/bus/usb` node, which udev `uaccess` rules routinely grant to the logged-in seat user. No root or capability is required.
- UI:NUser interaction, none
- The attacker performs both the sysfs read and the driver unbind from their own processes; no victim action is needed. On kiosk-style systems the routine hotplug churn that also triggers it happens without any deliberate user step.
- S:UScope, unchanged
- The fault and its consequences are confined to the kernel of the same host; no VM, IOMMU, or sandbox boundary is crossed.
- C:HConfidentiality impact, high
- If the driver is unregistered and its module unloaded after the pointer is loaded, `drv->name` is read from freed memory and the resulting dangling `char *` is expanded by `add_uevent_var(env, "DRIVER=%s", ...)` into the env buffer that `uevent_show()` copies back to the unprivileged reader — a use-after-free read that leaks arbitrary kernel memory contents to userspace. The fix's klist_drivers lock exists specifically to stop the driver structure disappearing mid-read.
- I:NIntegrity impact, none
- The racy path only loads `dev->driver` and formats `drv->name` into a bounded, kernel-allocated uevent buffer; it performs no attacker-influenced write to kernel memory and yields no control-flow hijack primitive.
- A:HAvailability impact, high
- Reloading `dev->driver` as NULL makes `dev->driver->name` a NULL-page dereference, and the freed-module variant faults on unmapped vmalloc memory — either way an oops in the driver-core read path, repeatable at will for a reliable local denial of service.