Skip to contentSkip to conversation

CVE-2026-80622: char: tlclk: fix use-after-free in tlclk_cleanup()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 28

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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.

The Linux kernel CVE team has assigned CVE-2026-80622 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.15 with commit 1a80ba88273097933f93b1f40537337416798c70 and fixed in 5.10.261 with commit 09d8d2a46a9ec9ff728f3159a174a2ab25dd0f0a
	Issue introduced in 2.6.15 with commit 1a80ba88273097933f93b1f40537337416798c70 and fixed in 5.15.212 with commit 96902299a22d126ef5eb3f45cd5d8ceea9e6a735
	Issue introduced in 2.6.15 with commit 1a80ba88273097933f93b1f40537337416798c70 and fixed in 6.1.178 with commit 166dd1d5265e067459e674c11688919901813ec2
	Issue introduced in 2.6.15 with commit 1a80ba88273097933f93b1f40537337416798c70 and fixed in 6.6.145 with commit 764723bd67a6c8f53a8d8309211fb039e2ebcf49
	Issue introduced in 2.6.15 with commit 1a80ba88273097933f93b1f40537337416798c70 and fixed in 6.12.97 with commit c3f0cd76561ae611c2d247ee96dfd559e4197cb7
	Issue introduced in 2.6.15 with commit 1a80ba88273097933f93b1f40537337416798c70 and fixed in 6.18.40 with commit 3d5e4cc0d9dce79b0429da3134ac7b072ab9009f
	Issue introduced in 2.6.15 with commit 1a80ba88273097933f93b1f40537337416798c70 and fixed in 7.1.5 with commit 42223445607a9a5df3cb1c4729abfe3a5085e7ce
	Issue introduced in 2.6.15 with commit 1a80ba88273097933f93b1f40537337416798c70 and fixed in 7.2 with commit bbf003b7794d6ad6f939fdd29f1f1bde8ac554c1

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-80622

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/char/tlclk.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/09d8d2a46a9ec9ff728f3159a174a2ab25dd0f0a
	https://git.kernel.org/stable/c/96902299a22d126ef5eb3f45cd5d8ceea9e6a735
	https://git.kernel.org/stable/c/166dd1d5265e067459e674c11688919901813ec2
	https://git.kernel.org/stable/c/764723bd67a6c8f53a8d8309211fb039e2ebcf49
	https://git.kernel.org/stable/c/c3f0cd76561ae611c2d247ee96dfd559e4197cb7
	https://git.kernel.org/stable/c/3d5e4cc0d9dce79b0429da3134ac7b072ab9009f
	https://git.kernel.org/stable/c/42223445607a9a5df3cb1c4729abfe3a5085e7ce
	https://git.kernel.org/stable/c/bbf003b7794d6ad6f939fdd29f1f1bde8ac554c1