Skip to main content
Vulnerability Database/CVE-2026-98645

CVE-2026-98645: Linux Kernel HID Use-After-Free Vulnerability

CVE-2026-98645 is a use-after-free flaw in the Linux kernel HID winwing driver affecting force feedback teardown. This vulnerability can lead to memory corruption and system instability. This article covers technical details, impact analysis, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98645 Overview

CVE-2026-98645 is a use-after-free vulnerability in the Linux kernel's HID winwing driver affecting the force feedback teardown path. The driver's winwing_init_ff() function passes device private data allocated with devm_kzalloc() as the effect context to input_ff_create_memless(). The memoryless force-feedback core assumes ownership and later releases the pointer with kfree() through input_ff_destroy() and ml_ff_destroy(). Freeing a devres-managed allocation with kfree() is invalid, and devres subsequently releases the same object when the HID device is torn down, producing a double free and slab corruption.

Critical Impact

The flaw triggers on device unbind, module removal, hot-unplug, and system suspend, corrupting kernel slab memory and risking crashes or further memory safety issues.

Affected Products

  • Linux kernel versions containing the hid-winwing driver prior to the fix
  • Stable kernel branches referenced in the upstream commits
  • Systems using Winwing HID force-feedback peripherals

Discovery Timeline

  • 2026-10-18 - CVE-2026-98645 published to NVD
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-98645

Vulnerability Analysis

The hid-winwing driver mishandles ownership of its private data structure during force feedback initialization. During winwing_probe(), memory is allocated with devm_kzalloc(), which binds the allocation lifetime to the device via devres. The driver then passes this same pointer as the effect context to input_ff_create_memless(), whose contract requires that the memoryless core free the context with kfree() during input_ff_destroy().

This ownership conflict creates two problems. First, kfree() on a devres-managed region is itself an invalid free. Second, devres later walks its registration list and releases the same memory, resulting in a double free. The private allocation also embeds LED class devices along with their timers and work items, so pending callbacks execute against freed memory. KASAN reports confirm the invalid-free pattern originating from the winwing_probe allocation.

Root Cause

The root cause is incorrect lifetime management between the devres subsystem and the input force-feedback core. Two independent allocators both believe they own the same object. This is a classic Use After Free and Double Free condition.

Attack Vector

Triggering the condition requires an attached Winwing HID device and an event that tears down force feedback: driver unbind, rmmod, hot-unplug, or system suspend where the firmware cache traverses the corrupted devres list. Local users or physical attackers with HID device access can reliably reach the vulnerable path.

The upstream fix passes NULL as the memless context and instead fetches the driver data from the input device inside winwing_play_effect(), since the HID core already stores the hid_device as the input device's drvdata. The force-feedback core then owns nothing it must release. See the kernel fix commit and the follow-up commit for implementation details.

Detection Methods for CVE-2026-98645

Indicators of Compromise

  • KASAN invalid-free or use-after-free reports referencing input_ff_destroy, ml_ff_destroy, or winwing_probe in the allocation stack
  • Kernel oops or slab corruption traces produced during rmmod hid_winwing, device unplug, or system suspend
  • Unexpected panics or warnings tied to LED class device timers or work items on systems with Winwing peripherals

Detection Strategies

  • Enable KASAN on test kernels to surface the invalid free and double free at the moment of teardown
  • Monitor kernel logs with dmesg and journald collectors for stack traces that include hid-winwing symbols
  • Inventory running kernels against the stable branches that received the fix commits to identify unpatched hosts

Monitoring Recommendations

  • Forward kernel ring buffer events to a centralized log pipeline and alert on KASAN or slab corruption signatures
  • Track suspend/resume cycles on workstations with HID flight peripherals, as these events exercise the vulnerable code path
  • Audit module load lists for hid_winwing to scope affected endpoints

How to Mitigate CVE-2026-98645

Immediate Actions Required

  • Apply the upstream patches referenced in the kernel git commits and rebuild or install updated kernel packages from your distribution
  • Where patching is delayed, blacklist the hid_winwing module on systems that do not require Winwing device support
  • Avoid unbind, hot-unplug, and suspend operations on vulnerable hosts with the module loaded until patched

Patch Information

Two upstream commits resolve the issue: the primary fix at git.kernel.org commit 2b25f11e and a related update at git.kernel.org commit a1a5ad37. Both change the ownership model so the force-feedback core does not free devres-managed memory.

Workarounds

  • Prevent automatic loading of the driver by adding blacklist hid_winwing to a file under /etc/modprobe.d/
  • Physically disconnect Winwing HID devices on unpatched systems to avoid probing the vulnerable code path
  • Disable system suspend on affected hosts until updated kernels are deployed
bash
# Configuration example
echo 'blacklist hid_winwing' | sudo tee /etc/modprobe.d/blacklist-hid-winwing.conf
sudo rmmod hid_winwing 2>/dev/null || true
sudo update-initramfs -u

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.