A newly disclosed Linux-kernel vulnerability in the Steam HID driver (tracked as CVE‑2025‑21923) can cause a use‑after‑free during device detachment — a memory‑safety bug that has been fixed upstream but still demands immediate attention from operators who run kernels in the affected release windows. (nvd.nist.gov)
The Linux HID stack exposes game controllers, keyboards, mice and a broad class of human‑interface devices to user space. The hid‑steam driver was introduced and iteratively extended to support the Steam Controller and the Steam Deck’s controller interface; it provides kernel‑level handling and a hidraw interception path so user‑space clients (e.g., the Steam client) can interact with devices without interfering with kernel input behaviour.
hid‑steam is shipped as a kernel module (built as
Multiple downstream vendor trackers and vulnerability databases reflect the same high‑impact rating and register vendor advisories and package updates for affected distributions. Examples include Ubuntu’s advisory entries and vendor trackers listing the CVE and associated kernel package updates.
Practical signals from vendor trackers:
Because the vulnerability occurs on device detach, scenarios to consider in threat modelling include:
(Pragmatic reminder: many distributions backport security fixes into their own kernel ABI; an upgrade to a vendor‑released patched kernel package is normally preferable to compiling a custom mainline kernel in production.)
The vulnerability illustrates two repeat lessons: kernel drivers handling asynchronous device lifecycles must be extremely careful with workqueue cancellation and object lifetime, and even seemingly narrow drivers (game controller support) can create systemic risk when memory corruption reaches kernel context. Inventory, patching and conservative device control are the practical, effective defenses — treat this CVE as a priority for affected Linux deployments. (nvd.nist.gov)
Source: MSRC Security Update Guide - Microsoft Security Response Center
Background
The Linux HID stack exposes game controllers, keyboards, mice and a broad class of human‑interface devices to user space. The hid‑steam driver was introduced and iteratively extended to support the Steam Controller and the Steam Deck’s controller interface; it provides kernel‑level handling and a hidraw interception path so user‑space clients (e.g., the Steam client) can interact with devices without interfering with kernel input behaviour.hid‑steam is shipped as a kernel module (built as
hid‑steam when enabled), and it participates in the kernel’s device lifecycle: when a device is plugged in the driver binds and creates input nodes, and when the device is removed the driver is expected to clean up any resources and cancel any scheduled background tasks tied to that device.What the bug is (short technical summary)
- At device removal, hid‑steam uses a per‑device helper (referred to in kernel discussion as client_hdev) to manage intercepted hidraw access for user‑space clients.
- The driver also uses deferred work (a scheduled work item) to handle reattaching or recreating the input device when appropriate.
- The flaw arises from the ordering of cleanup steps: the driver cancelled the deferred work but did so before freeing or tearing down the client_hdev itself, which allowed the deferred work to be rescheduled and later run against already‑freed memory — a classic use‑after‑free condition. The upstream patch fixes the ordering so cancellation happens at the safe point and the client object is not freed while work could still run. (nvd.nist.gov)
Affected kernels and severity
The National Vulnerability Database (NVD) records the affected kernel ranges and the severity metrics associated with CVE‑2025‑21923. The CVSS v3.1 base score is listed as 7.8 (High) with the vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, and NVD maps the vulnerable CPE ranges to specific kernel series: versions from 6.12.16 up to (but excluding) 6.12.19; 6.13.4 up to (excluding) 6.13.7; and 6.6.79 up to (excluding) 6.6.83. Those precise ranges come from the kernel‑release mappings used during NVD enrichment. (nvd.nist.gov)Multiple downstream vendor trackers and vulnerability databases reflect the same high‑impact rating and register vendor advisories and package updates for affected distributions. Examples include Ubuntu’s advisory entries and vendor trackers listing the CVE and associated kernel package updates.
Why this matters in practice
A kernel use‑after‑free is dangerous for three reasons:- Kernel code runs with elevated privileges and has direct access to sensitive resources; memory corruption at this level can be leveraged into arbitrary code execution or privilege escalation. Several analyst writeups and vulnerability databases flag disclosure of kernel UAF bugs as potentially leading to confidentiality, integrity and availability impacts.
- The bug is triggered by device detach/cleanup logic. An attacker with local access who can connect or emulate an HID device (or convince a target to plug in such a device) might trigger the condition repeatedly. The required attacker privileges are low‑level local privileges, but the consequence can be severe if exploited. (nvd.nist.gov)
- Even where an exploit path to full root is non‑trivial, use‑after‑free conditions can reliably cause kernel panics or persistent service instability — a direct availability impact for endpoints, kiosks, game consoles, shared workstations or embedded appliances that use the Steam HID driver.
What vendors have done (patches and advisories)
Upstream kernel maintainers issued patches in the stable trees to fix the ordering and ensure that deferred work is properly cancelled before client structures are destroyed; NVD, OSV and many vendor advisories reference those stable patches. Distribution vendors (Ubuntu, SUSE, Amazon Linux and others) incorporated the upstream fixes into their kernel packages and published security notices listing the fixed kernel package versions or recommending kernel upgrades. (nvd.nist.gov)Practical signals from vendor trackers:
- Ubuntu published security notices tied to the kernel package updates that include CVE‑2025‑21923 and list the affected images and the patched kernel package names for each supported release.
- SUSE and Amazon’s advisories list the CVSS, describe the bug, and mark the issue as resolved in specific kernel package updates.
- Third‑party vulnerability databases (Rapid7, OSV, Wiz, Recorded Future) consolidated the picture and flagged the CVE as high priority for owners of affected kernels.
Immediate actions for administrators and operators
If you run Linux systems that might include the hid‑steam driver (for example, hosts used for gaming/entertainment, Steam Deck images, developer workstations, kiosks, or embedded devices that include Steam HID support), treat this as a priority patching item.- Inventory your exposure (quick checks)
- Check your kernel version with: uname -r — if the kernel release falls within the NVD‑listed ranges (for example, 6.12.16 ≤ version < 6.12.19, 6.13.4 ≤ version < 6.13.7, 6.6.79 ≤ version < 6.6.83), flag the host for immediate remediation. (nvd.nist.gov)
- Identify whether
hid‑steamis present or enabled on the host:lsmod | grep steamormodinfo hid-steam(the kernel module is commonly namedhid‑steamwhen the config optionCONFIG_HID_STEAMis enabled). If your kernel was built without Steam support, the driver won’t be present. - Apply vendor kernel updates
- The reliable, long‑term fix is to install the vendor’s patched kernel packages or upgrade to a kernel which incorporates the upstream fix, and then reboot per the vendor’s guidance. Ubuntu, SUSE and other vendors have published patched packages; apply the appropriate package for your distribution and confirm the package contains the CVE fix.
- Short‑term mitigations (when immediate kernel upgrades are impractical)
- Temporary module unload: If the host has
hid‑steamloaded and the device functionality is not needed, consider unloading the module until you can apply an official kernel update. Example remedial commands: sudo modprobe -r hid-steamorsudo rmmod hid-steam— this will remove Steam controller/Deck support but prevents the driver code path from executing on detach. Note this is disruptive: any connected Steam/HID devices relying on this driver will stop working. Confirm module name on your distribution (modinfo hid-steam).- Blacklisting: To prevent the module from loading across reboots, add the module name to your distro’s blacklist mechanism (for example, a modprobe configuration), but beware this risks breaking legitimate devices that rely on the driver.
- Device policies: Where practical, deny untrusted users physical access to HID device ports (USB, Bluetooth pairing) and enforce endpoint controls that restrict who can plug in or pair devices — physical control reduces the local attack surface.
- Detection and monitoring
- Watch kernel logs (dmesg / journalctl -k) for OOPS, KASAN, or workqueue warnings that reference hid‑steam, use‑after‑free, or deferred work requeueing. Kernel panics, repeated oopses or crashes after device detach events should be investigated urgently.
- Add host‑level detection rules to SIEM/EDR for unusual kernel crashes correlated to local user sessions or device plug/unplug events. Collect and preserve crash dumps for forensic analysis if you suspect malicious activity.
- Patch verification
- After applying a vendor kernel update, validate that the running kernel version is the updated package and that
hid‑steamis either absent or the module code contains the fix (vendor package changelogs/security notes typically document which stable commit or kernel patch was applied). Use distribution package tools to confirm the installed kernel package version and its changelog.
Detection, exploitability and the public evidence picture
At time of writing, vulnerability feeds and trackers indicate there was no publicly disclosed proof‑of‑concept exploit widely available; tracked feeds report EPSS/weaponization signals remain low for this CVE. However, the underlying bug class (kernel UAF) is high‑value to attackers and can be weaponized privately. The absence of public PoCs does not eliminate urgency for high‑risk environments.Because the vulnerability occurs on device detach, scenarios to consider in threat modelling include:
- Malicious peripheral devices physically introduced into a target machine.
- Malicious Bluetooth pairing or supply‑chain peripherals attached during maintenance windows.
- Local attackers who already have limited shell access and can cause repeated attach/detach sequences as part of an escalation chain.
Root cause analysis (why this keeps happening in device drivers)
Device drivers must juggle asynchronous events (plug, unplug, user open/close, deferred work) and typically rely on reference counting or explicit cancellation of background work to prevent race conditions. The hid‑steam issue is an example of how a subtle inversion in the cleanup order — cancelling a scheduled work item at the wrong time relative to freeing the object it references — produces a rescheduling window where freed memory is later accessed by workqueue code. These ordering bugs are common in kernel drivers that manage deferred work and object lifetimes, and they are notoriously difficult to spot without careful review or runtime sanitizers (KASAN, KCSAN) running during development and fuzzing. (nvd.nist.gov)Enterprise risk assessment and recommended posture
- High‑value endpoints (workstations used for development, gaming rigs in shared labs, kiosk appliances, Steam Deck images used in fleet testing) should be prioritized for remediation because a kernel compromise on those hosts allows deep lateral movement if credentials or secrets are present.
- For managed fleets, schedule kernel updates via normal patch cycles but accelerate rollout to hosts with the
hid‑steammodule present or to machines that accept untrusted USB/Bluetooth devices. - Where reboot windows are constrained, evaluate whether vendor livepatch services (where available) can be used as a temporary mitigation; in many cases livepatch tooling does not cover all classes of kernel fixes, so confirm coverage before relying on it.
- Maintain device control policies and restrict who can plug in devices. Physical security and USB port policies remain effective mitigations for HID‑targeted attack vectors.
Developer and maintainer note (why the upstream fix matters)
The upstream patches referenced by NVD and distribution trackers reorder the cleanup sequence and ensure the lifecycle management ofclient_hdev and the associated deferred work are atomic and race‑free. Upstream patch references are recorded in the NVD entry and stable kernel trees; operators relying on vendor kernels will typically apply the vendor’s backported corrections rather than pulling mainline trees themselves. (nvd.nist.gov)(Pragmatic reminder: many distributions backport security fixes into their own kernel ABI; an upgrade to a vendor‑released patched kernel package is normally preferable to compiling a custom mainline kernel in production.)
Practical checklist (copy‑ready)
- Inventory:
- Run uname -r and identify running kernel versions. Compare to the NVD affected ranges. (nvd.nist.gov)
- Check for loaded module:
lsmod | grep hid-steamandmodinfo hid-steamto confirm presence. - Patch:
- Review your distro’s security advisory for CVE‑2025‑21923 and identify the patch package.
- Schedule and apply the kernel package update per vendor instructions.
- Reboot hosts into the patched kernel and verify
uname -r. - Temporary mitigation (if immediate patching not possible):
sudo modprobe -r hid-steam(and add a blacklist entry if necessary). Note: this disrupts Steam Controller / Deck support.- Monitor:
- Add rules to log and alert on kernel OOPS/KASAN entries referencing
hidorsteam. - Correlate device plug/unplug events and kernel exceptions.
- Confirm:
- Verify the installed kernel package changelog mentions the upstream CVE patch commit(s) or that vendor advisory status shows “Fixed”.
Final analysis — strengths and residual risks
Strengths- The bug is small and surgical in scope: it is a single‑driver logic ordering fix rather than a sweeping architecture change, which reduced the risk of regression and allowed rapid upstream fixes. The kernel development community and major vendors quickly mapped the problem and produced patches and distribution updates. (nvd.nist.gov)
- Public tracking (NVD, OSV, vendor advisories) provides enough metadata (CPE ranges, CVSS, patch references) for operations teams to triage and remediate precisely. (nvd.nist.gov)
- Local attack vector: the attack requires local interaction with device attach/detach flows or local account access. But local access is a common post‑compromise vector, and combined with commodity device emulation hardware, the threat is practical for targeted intrusions.
- No public PoC ≠ no exploitation: the lack of an openly shared PoC is reassuring but not proof that exploitation hasn't occurred in targeted campaigns. Organizations should assume risk until their fleets are patched.
- Embedded and appliance fleets are harder to patch. Devices that seldom receive kernel updates or are managed via frozen images (appliances, embedded consoles) may remain vulnerable unless vendors supply updated images.
Conclusion
CVE‑2025‑21923 is a high‑impact, kernel‑level use‑after‑free in the hid‑steam driver that was fixed upstream by reordering resource cleanup to prevent deferred work from running against freed structures. The fix is available in upstream stable kernel trees and in vendor kernel updates; operators who run affected kernels should prioritize patching or, if necessary, apply short‑term mitigations such as unloading thehid‑steam module while scheduling planned kernel upgrades.The vulnerability illustrates two repeat lessons: kernel drivers handling asynchronous device lifecycles must be extremely careful with workqueue cancellation and object lifetime, and even seemingly narrow drivers (game controller support) can create systemic risk when memory corruption reaches kernel context. Inventory, patching and conservative device control are the practical, effective defenses — treat this CVE as a priority for affected Linux deployments. (nvd.nist.gov)
Source: MSRC Security Update Guide - Microsoft Security Response Center