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-98766 Overview
CVE-2026-98766 is a use-after-free vulnerability in the Linux kernel's aspeed-vhub USB gadget driver. The flaw lives in the remote-wakeup path, where wake_work is armed from the gadget .wakeup callback but never cancelled in ast_vhub_remove(). A work item queued before or during device removal can execute after devm has freed the vhub structure and its ports, resulting in memory corruption. The issue was identified by an in-house static analysis tool and resolved through multiple stable kernel commits.
Critical Impact
A race between USB gadget remote-wakeup requests and device removal can trigger a use-after-free in kernel memory, enabling potential denial of service or memory corruption on affected Aspeed BMC-based systems.
Affected Products
- Linux kernel drivers/usb/gadget/udc/aspeed-vhub subsystem
- Systems using Aspeed virtual hub (vHub) USB gadget controllers, commonly found in Baseboard Management Controllers (BMCs)
- Multiple stable Linux kernel branches referenced by the backport commits
Discovery Timeline
- 2026-10-18 - CVE-2026-98766 published to NVD
- 2026-10-21 - Last updated in NVD database
Technical Details for CVE-2026-98766
Vulnerability Analysis
The aspeed-vhub driver schedules wake_work from the gadget .wakeup callback to resume suspended downstream USB ports. The removal path ast_vhub_remove() never cancels this work item, so a scheduled callback can run after devm-managed allocations for vhub and its ports are freed. Any dereference inside the executing work item then touches freed memory [CWE-416].
Simply calling cancel_work_sync() is insufficient. The function usb_gadget_wakeup() takes no lock, and the unbind path never clears wakeup_en. A remote-wakeup request in flight on another CPU can re-arm the work after the cancel completes but before vhub is freed, reintroducing the race.
Root Cause
The root cause is missing synchronization between gadget wakeup requests and driver teardown. ast_vhub_del_dev() clears d->registered under vhub->lock before unregistering the gadget, but ast_vhub_udc_wakeup() never consulted this flag. Wakeup requests continued to schedule work during and after unbind, violating the lifetime assumptions of the devm-allocated vhub object.
Attack Vector
Triggering the race requires the ability to initiate USB gadget remote-wakeup requests concurrently with driver removal. On BMC platforms exposing aspeed-vhub to host or management interfaces, a local actor with sufficient privilege to unbind or rebind the driver, or to drive gadget operations, can provoke the use-after-free. Successful exploitation can cause kernel memory corruption or a system crash.
No verified public proof-of-concept code is available for this issue. See the upstream fix in Kernel Commit 0d39ac4f for the authoritative patch details.
Detection Methods for CVE-2026-98766
Indicators of Compromise
- Kernel oops or panic messages referencing ast_vhub, wake_work, or usb_gadget_wakeup in dmesg or system logs
- KASAN (Kernel Address Sanitizer) reports of use-after-free in the aspeed-vhub driver during module unload or device unbind
- Unexpected BMC reboots coinciding with USB gadget reconfiguration events
Detection Strategies
- Audit running kernel versions against the fix commits (0d39ac4f, 20388c8d, 474e9e18, c81504df, f343bfa3) to confirm the backport is present
- Enable CONFIG_KASAN on test or staging BMC images to catch latent use-after-free conditions during QA
- Monitor for repeated unbind/rebind operations on aspeed-vhub devices, which raise the probability of triggering the race
Monitoring Recommendations
- Centralize BMC kernel logs and alert on BUG:, KASAN:, or general protection fault entries referencing USB gadget symbols
- Track module load and unload events for aspeed_vhub through auditd or equivalent kernel audit facilities
- Correlate host crash telemetry with recent firmware or BMC package updates that touched the USB gadget stack
How to Mitigate CVE-2026-98766
Immediate Actions Required
- Apply the vendor kernel update that includes commits 0d39ac4f, 20388c8d, 474e9e18, c81504df, or f343bfa3 for your stable branch
- Restrict privileged local access to BMCs and systems exposing aspeed-vhub to reduce the pool of actors able to trigger driver unbind
- Avoid runtime unbinding or rebinding of the aspeed-vhub driver on production systems until the patch is deployed
Patch Information
The fix refuses the wakeup inside ast_vhub_udc_wakeup() once d->registered is clear. Because ast_vhub_del_dev() clears this flag under vhub->lock before unregistering the gadget, the check and the schedule_work() become atomic against unbind. Any wakeup that passed before the flag was cleared is drained by cancel_work_sync() after the del_dev loop, and later wakeups return without arming the work. INIT_WORK() was also moved to the top of ast_vhub_probe() so the probe error path, which reuses ast_vhub_remove(), does not cancel an uninitialized work item. See Kernel Commit 0d39ac4f and the additional backports 20388c8d, 474e9e18, c81504df, and f343bfa3.
Workarounds
- Blacklist the aspeed_vhub module on systems that do not require USB gadget functionality on the BMC
- Disable remote-wakeup support on downstream USB gadget devices where operationally acceptable to reduce the frequency of wake_work scheduling
- Limit shell and management-plane access on BMCs to administrators required to manage USB gadget functionality
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

