CVE-2026-31688

EUVD-2026-25885
In the Linux kernel, the following vulnerability has been resolved:

driver core: enforce device_lock for driver_match_device()

Currently, driver_match_device() is called from three sites. One site
(__device_attach_driver) holds device_lock(dev), but the other two
(bind_store and __driver_attach) do not. This inconsistency means that
bus match() callbacks are not guaranteed to be called with the lock
held.

Fix this by introducing driver_match_device_locked(), which guarantees
holding the device lock using a scoped guard. Replace the unlocked calls
in bind_store() and __driver_attach() with this new helper. Also add a
lock assertion to driver_match_device() to enforce this guarantee.

This consistency also fixes a known race condition. The driver_override
implementation relies on the device_lock, so the missing lock led to the
use-after-free (UAF) reported in Bugzilla for buses using this field.

Stress testing the two newly locked paths for 24 hours with
CONFIG_PROVE_LOCKING and CONFIG_LOCKDEP enabled showed no UAF recurrence
and no lockdep warnings.
ProviderTypeBase ScoreAtk. VectorAtk. ComplexityPriv. RequiredVector
NISTPrimary
7.8 HIGH
LOCAL
LOW
LOW
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Base Score
CVSS 3.x
EPSS Score
Percentile: 4%
Affected Products (NVD)
VendorProductVersion
linuxlinux_kernel
2.6.30 ≤
𝑥
< 7.0
𝑥
= Vulnerable software versions
Debian logo
Debian Releases
Debian Product
Codename
linux
bookworm
vulnerable
bookworm (security)
vulnerable
bullseye
vulnerable
bullseye (security)
vulnerable
forky
7.0.10-1
fixed
sid
7.0.12-1
fixed
trixie
vulnerable
trixie (security)
vulnerable
Amazon Linux logo
Amazon Linux Releases
Amazon Package
Release
bpftool6.12
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
bpftool6.12-debuginfo
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
bpftool6.18
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
bpftool6.18-debuginfo
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
kernel-livepatch-6.12.73-95.123
Amazon Linux 2023
1:1.0-0.amzn2023
fixed
kernel-livepatch-6.18.15-14.217
Amazon Linux 2023
1:1.0-0.amzn2023
fixed
kernel6.12
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
kernel6.12-debuginfo
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
kernel6.12-debuginfo-common-aarch64
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
kernel6.12-debuginfo-common-x86_64
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
kernel6.12-devel
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
kernel6.12-headers
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
kernel6.12-libbpf
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
kernel6.12-libbpf-debuginfo
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
kernel6.12-libbpf-devel
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
kernel6.12-libbpf-static
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
kernel6.12-modules-extra
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
kernel6.12-modules-extra-common
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
kernel6.12-tools
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
kernel6.12-tools-debuginfo
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
kernel6.12-tools-devel
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
kernel6.18
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
kernel6.18-debuginfo
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
kernel6.18-debuginfo-common-aarch64
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
kernel6.18-debuginfo-common-x86_64
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
kernel6.18-devel
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
kernel6.18-headers
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
kernel6.18-libbpf
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
kernel6.18-libbpf-debuginfo
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
kernel6.18-libbpf-devel
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
kernel6.18-libbpf-static
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
kernel6.18-modules-extra
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
kernel6.18-modules-extra-common
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
kernel6.18-tools
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
kernel6.18-tools-debuginfo
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
kernel6.18-tools-devel
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
perf6.12
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
perf6.12-debuginfo
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
perf6.18
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
perf6.18-debuginfo
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
python3-perf6.12
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
python3-perf6.12-debuginfo
Amazon Linux 2023
1:6.12.73-95.123.amzn2023
fixed
python3-perf6.18
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed
python3-perf6.18-debuginfo
Amazon Linux 2023
1:6.18.15-14.217.amzn2023
fixed