KernelScan.io

HIGH Introduced in 4.18

aspeed-vhub WakeWork UAF

CVE-2026-98766

CVSS 7.1 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

01

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: aspeed-vhub: cancel wake work on device removal wake_work is armed from the gadget .wakeup callback to resume suspended downstream ports, and it is never cancelled in ast_vhub_remove(), so a work item queued before or during removal can run after devm has freed vhub and its ports, a use-after-free. Cancelling the work alone is not sufficient: usb_gadget_wakeup() takes no lock and the unbind path never clears wakeup_en, so a remote-wakeup request in flight on another CPU can re-arm the work after the cancel and before vhub is freed. ast_vhub_del_dev() already clears d->registered under vhub->lock before unregistering the gadget. Refuse the wakeup in ast_vhub_udc_wakeup() once d->registered is clear: the check and the schedule_work() are then atomic against the unbind, so a wakeup that passed before the flag was cleared is drained by the cancel_work_sync() after the del_dev loop, and one that arrives later returns without arming. Also move INIT_WORK() to the top of ast_vhub_probe(), since the probe error path reuses ast_vhub_remove() and would otherwise cancel a never-initialized work item. This issue was found by an in-house static analysis tool.

02

Engine v0.9.0

Risk summary

A use-after-free in the Aspeed virtual hub USB gadget driver allows a local attacker on the Aspeed SoC (BMC) to execute arbitrary code or crash the kernel by racing a gadget wakeup request with device removal. The vulnerability is reachable when a gadget function bound to the virtual hub initiates a remote wakeup while the driver is being unbound, such as during module unload or system shutdown.

Affecteddrivers/usb/gadget/udc/aspeed-vhub/core.c (usb: gadget: aspeed-vhub)

Vulnerability analysis

The Aspeed virtual hub driver uses a background work task to resume suspended downstream ports when a gadget function requests a remote wakeup. During device removal, this work task was never cancelled, so a wakeup request queued before or during removal could execute after the driver's memory had been freed. Additionally, because the wakeup callback uses no lock and the unbind path did not clear the wakeup-enable flag, a concurrent wakeup on another CPU could re-arm the work after cancellation but before the memory was released. The fix adds a synchronized work cancellation after all ports are unregistered, checks a registration flag under the driver lock to atomically reject new wakeups once teardown begins, and initializes the work task earlier during probe so the error path can safely cancel it.

03

BranchIntroducedFixed inPatch commit
5.104.185.10.27389b3fef8809e
5.154.185.15.2243aed0c86afa7
6.14.186.1.191552f580a1878
6.124.186.12.113f343bfa3fc9f
6.184.186.18.56474e9e1852fb
6.64.186.6.1600d39ac4f65f9
7.24.187.2.10c81504dfd2d9
mainline4.187.320388c8d1d74
cip/6.124.186.12.114-cip34f343bfa3fc9f

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.114-cip34
cip/6.1Affected — no CIP fix yet (latest 6.1.190-cip62)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.272-cip79)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.272-cip79-rt35)
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip136)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip136-rt50)