{"id":"CVE-2025-37800","state":"PUBLISHED","title":"driver core: fix potential NULL pointer dereference in dev_uevent()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndriver core: fix potential NULL pointer dereference in dev_uevent()\n\nIf userspace reads \"uevent\" device attribute at the same time as another\nthreads unbinds the device from its driver, change to dev->driver from a\nvalid pointer to NULL may result in crash. Fix this by using READ_ONCE()\nwhen fetching the pointer, and take bus' drivers klist lock to make sure\ndriver instance will not disappear while we access it.\n\nUse WRITE_ONCE() when setting the driver pointer to ensure there is no\ntearing.","publishedAt":"2025-05-08T06:26:01.125Z","updatedAt":"2026-10-15T21:52:00.191Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"16574dccd8f62dc1b585325f8a6a0aab10047ed8","status":"affected","lessThan":"abe56be73eb10a677d16066f65ff9d30251f5eee","versionType":"git"},{"version":"16574dccd8f62dc1b585325f8a6a0aab10047ed8","status":"affected","lessThan":"2b344e779d9afd0fcb5ee4000e4d0fc7d8d867eb","versionType":"git"},{"version":"16574dccd8f62dc1b585325f8a6a0aab10047ed8","status":"affected","lessThan":"3781e4b83e174364998855de777e184cf0b62c40","versionType":"git"},{"version":"16574dccd8f62dc1b585325f8a6a0aab10047ed8","status":"affected","lessThan":"18daa52418e7e4629ed1703b64777294209d2622","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/base/base.h","drivers/base/bus.c","drivers/base/core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.22","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.22","versionType":"semver"},{"version":"6.6.89","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.26","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.5","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/base/base.h","drivers/base/bus.c","drivers/base/core.c"]}],"references":["https://git.kernel.org/stable/c/abe56be73eb10a677d16066f65ff9d30251f5eee","https://git.kernel.org/stable/c/2b344e779d9afd0fcb5ee4000e4d0fc7d8d867eb","https://git.kernel.org/stable/c/3781e4b83e174364998855de777e184cf0b62c40","https://git.kernel.org/stable/c/18daa52418e7e4629ed1703b64777294209d2622"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:03.054Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/37xxx/CVE-2025-37800.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-37800","state":"PUBLISHED","datePublished":"2025-05-08T06:26:01.125Z","dateUpdated":"2026-10-15T21:52:00.191Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:23.941Z"},"containers":{"cna":{"title":"driver core: fix potential NULL pointer dereference in dev_uevent()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndriver core: fix potential NULL pointer dereference in dev_uevent()\n\nIf userspace reads \"uevent\" device attribute at the same time as another\nthreads unbinds the device from its driver, change to dev->driver from a\nvalid pointer to NULL may result in crash. Fix this by using READ_ONCE()\nwhen fetching the pointer, and take bus' drivers klist lock to make sure\ndriver instance will not disappear while we access it.\n\nUse WRITE_ONCE() when setting the driver pointer to ensure there is no\ntearing."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"16574dccd8f62dc1b585325f8a6a0aab10047ed8","status":"affected","lessThan":"abe56be73eb10a677d16066f65ff9d30251f5eee","versionType":"git"},{"version":"16574dccd8f62dc1b585325f8a6a0aab10047ed8","status":"affected","lessThan":"2b344e779d9afd0fcb5ee4000e4d0fc7d8d867eb","versionType":"git"},{"version":"16574dccd8f62dc1b585325f8a6a0aab10047ed8","status":"affected","lessThan":"3781e4b83e174364998855de777e184cf0b62c40","versionType":"git"},{"version":"16574dccd8f62dc1b585325f8a6a0aab10047ed8","status":"affected","lessThan":"18daa52418e7e4629ed1703b64777294209d2622","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/base/base.h","drivers/base/bus.c","drivers/base/core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.22","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.22","versionType":"semver"},{"version":"6.6.89","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.26","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.5","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/base/base.h","drivers/base/bus.c","drivers/base/core.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/abe56be73eb10a677d16066f65ff9d30251f5eee"},{"url":"https://git.kernel.org/stable/c/2b344e779d9afd0fcb5ee4000e4d0fc7d8d867eb"},{"url":"https://git.kernel.org/stable/c/3781e4b83e174364998855de777e184cf0b62c40"},{"url":"https://git.kernel.org/stable/c/18daa52418e7e4629ed1703b64777294209d2622"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - 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()`.\nAC:L - 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.\nPR:L - `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.\nUI:N - 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.\nS:U - The fault and its consequences are confined to the kernel of the same host; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - 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.\nI:N - 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.\nA:H - 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."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:57:39.250Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.22","versionEndExcluding":"6.6.89"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.22","versionEndExcluding":"6.12.26"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.22","versionEndExcluding":"6.14.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.22","versionEndExcluding":"6.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-37800","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2026-10-15T21:45:16.837997Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:52:00.191Z"}}]}}}