CVE-2026-80766

Source
https://cve.org/CVERecord?id=CVE-2026-80766
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-80766.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-80766
Downstream
Published
2026-09-04T15:12:38.520Z
Modified
2026-09-06T03:46:58.162789202Z
Summary
HID: uclogic: fix use-after-free of inrange_timer on remove
Details

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

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

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

timer_delete_sync(&drvdata->inrange_timer);
hid_hw_stop(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 == UCLOGICPARAMSPENINRANGE_NONE re-arms the timer:

mod_timer(&drvdata->inrange_timer, jiffies + msecs_to_jiffies(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 uclogicinrange_timeout() 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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/80xxx/CVE-2026-80766.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
01309e29eb95c16bd48984f2589fad0cbf5e27d1
Fixed
f40243358b407aec362fe305fabfcdc94a3abd89
Fixed
dc5108f18f58870a8dd4203a02a47e571a2be7f0
Fixed
9d77ac82e57ead056cf3f71d347083ed9244ad90
Fixed
e750cdb6de009aace3c77f37fe2173f96175e8e4
Fixed
849e537160bbb77fe419ecc3944bfe125dcd441b
Fixed
f1b3ca06380531f49f988f4721d3ed30b0d7a5d2
Fixed
f13d0a00204b05e62336da0ab72ea0d87b56690c
Fixed
506fd50a9027340f0e9dcc587d10ccb03312dba6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-80766.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.1.0
Fixed
5.15.220
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.187
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.156
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.108
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.47
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.1.11
Type
ECOSYSTEM
Events
Introduced
7.2.0
Fixed
7.2.1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-80766.json"