CVE-2026-80766: HID: uclogic: fix use-after-free of inrange_timer on remove

Published Sep 4, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

HID: uclogic: fix use-after-free of inrangetimer on remove

uclogicremove() cancels the pen in-range timer and then stops the device:

timerdeletesync(&drvdata->inrangetimer); hidhwstop(hdev);

timerdeletesync() only guarantees the timer is idle at that instant. uclogicraweventpen() keeps delivering pen reports until hidhwstop() stops the transport several lines later, and every report with pen->inrange == UCLOGICPARAMSPENINRANGENONE re-arms the timer:

modtimer(&drvdata->inrangetimer, jiffies + msecstojiffies(100));

A report landing between the timerdeletesync() call and the transport teardown in hidhwstop() re-arms inrangetimer after it was cancelled. uclogicremove() then returns and the devm drvdata is freed, while hidhwstop() has already freed the input device drvdata->peninput points at, so when the timer fires ~100 ms later uclogicinrangetimeout() dereferences freed memory -- a use-after-free in timer-softirq context.

Swapping the two calls is not a fix: stopping the device first frees drvdata->peninput via hidinputdisconnect() while the timer may still be pending, so a timer already armed before removal fires on the freed input device in the window before timerdeletesync() runs.

Use timershutdownsync() before hidhwstop() instead. It cancels the timer, waits for a running callback while peninput is still valid, and prevents any further re-arming -- a later modtimer() from an in-flight report is silently ignored -- so the timer is provably dead before hidhwstop() frees the inputs. This is the ordering the timer core documents for this "timer re-armed from another path" teardown case.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    In the uclogic driver, during device removal, call timer_shutdown_sync() for the inrange timer before calling hid_hw_stop(), to prevent the timer from being re-armed and firing on freed device/input data (fixes use-after-free in inrange_timer on remove).

    Linux kernel (uclogic HID driver) timer teardown ordering = Use timer_shutdown_sync() before hid_hw_stop()

Event History

Sep 4, 2026
CVE Published
via MITRE·03:12 PM
Data Sourced
via MITRE·03:12 PM
Description

Frequently Asked Questions

1

Which systems are exposed to this removal path?

The affected path is in the Linux kernel's uclogic HID driver and involves pen input handling. Systems not using this driver and its pen-report path are not described as exposed by the available information.

2

Can this be fixed by only changing the order of timer cancellation and device shutdown?

No. The available information explicitly states that simply stopping the device before cancelling the timer is also unsafe, because teardown can free the pen input object while the timer remains pending.

3

Which Linux kernel versions include the fix?

No affected or fixed kernel version numbers are provided. The supplied references identify stable-kernel commits, but the available information does not map those commits to released kernel versions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203