| From bippy-1.2.0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@kernel.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2025-37800: driver core: fix potential NULL pointer dereference in dev_uevent() |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| driver core: fix potential NULL pointer dereference in dev_uevent() |
| |
| 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. |
| |
| The Linux kernel CVE team has assigned CVE-2025-37800 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Fixed in 6.6.89 with commit abe56be73eb10a677d16066f65ff9d30251f5eee |
| Fixed in 6.12.26 with commit 2b344e779d9afd0fcb5ee4000e4d0fc7d8d867eb |
| Fixed in 6.14.5 with commit 3781e4b83e174364998855de777e184cf0b62c40 |
| Fixed in 6.15 with commit 18daa52418e7e4629ed1703b64777294209d2622 |
| |
| Please see https://www.kernel.org for a full list of currently supported |
| kernel versions by the kernel community. |
| |
| Unaffected versions might change over time as fixes are backported to |
| older supported kernel versions. The official CVE entry at |
| https://cve.org/CVERecord/?id=CVE-2025-37800 |
| will be updated if fixes are backported, please check that for the most |
| up to date information about this issue. |
| |
| |
| Affected files |
| ============== |
| |
| The file(s) affected by this issue are: |
| drivers/base/base.h |
| drivers/base/bus.c |
| drivers/base/core.c |
| |
| |
| Mitigation |
| ========== |
| |
| The Linux kernel CVE team recommends that you update to the latest |
| stable kernel version for this, and many other bugfixes. Individual |
| changes are never tested alone, but rather are part of a larger kernel |
| release. Cherry-picking individual commits is not recommended or |
| supported by the Linux kernel community at all. If however, updating to |
| the latest release is impossible, the individual changes to resolve this |
| issue can be found at these commits: |
| 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 |