CVE-2026-80622: char: tlclk: fix use-after-free in tlclk_cleanup()
In the Linux kernel, the following vulnerability has been resolved:
char: tlclk: fix use-after-free in tlclkcleanup()
This patch improves the module cleanup process in the tlclk driver to prevent potential use-after-free and race conditions.
Currently, the fileoperations structure does not specify the .owner field, which could allow the module to be unloaded while user-space processes are still interacting with the device. Additionally, the tlclkcleanup() function frees the alarmevents memory before ensuring that blocked processes in the waitqueue are fully awakened and that the switchovertimer has completed.
To address these cases, this patch: - Sets '.owner = THISMODULE' in tlclkfops to safely defer module unloading while the device is in use. - Updates tlclkcleanup() to explicitly wake up all blocked readers (wakeupall), properly release hardware I/O regions, and safely delete the timer (timerdeletesync) prior to freeing memory.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Systems using the Linux kernel tlclk driver are exposed when the module is being cleaned up or unloaded while user-space processes are still interacting with its device. Blocked readers and timer activity during cleanup are specifically relevant.
What conditions are required for the race to occur?
The module must be unloadable while its device remains in use, or cleanup must proceed while readers are blocked on the waitqueue or the switchover timer has not completed. These conditions can allow memory associated with alarm events to be freed too early.