char: tlclk: fix use-after-free in tlclk_cleanup()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1a80ba88273097933f93b1f40537337416798c70 · < 3d5e4cc0d9dce79b0429da3134ac7b072ab9009f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
char: tlclk: fix use-after-free in tlclk_cleanup()
This patch improves the module cleanup process in the tlclk driver to prevent potential use-after-free and race conditions.
Currently, the file_operations 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 tlclk_cleanup() function frees the alarm_events memory before ensuring that blocked processes in the waitqueue are fully awakened and that the switchover_timer has completed.
To address these cases, this patch: - Sets '.owner = THIS_MODULE' in tlclk_fops to safely defer module unloading while the device is in use. - Updates tlclk_cleanup() to explicitly wake up all blocked readers (wake_up_all), properly release hardware I/O regions, and safely delete the timer (timer_delete_sync) prior to freeing memory.
From the CVE record · Linux
The Linux kernel's tlclk driver can encounter a use-after-free or race condition during module cleanup. This can occur when the module is unloaded while local user-space processes are interacting with the device or waiting to read from it; the input does not specify whether authentication is required.
Engineers running the Linux kernel with the tlclk driver should check their installations; affected versions are not specified.