CVE-2026-99520 in Linuxinfo

Summary

by MITRE • 11/19/2026

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

pps: generators: fix use-after-free when closing a removed device

The cdev of a PPS generator is embedded in struct pps_gen_device, but nothing ties the lifetime of that structure to the cdev: pps_gen is freed by the release function of its device, and an open file holds a device reference only until pps_gen_cdev_release() drops it.

When the generator is unregistered while /dev/pps-genN is open, that put_device() drops the last reference and frees pps_gen, and __fput() then calls cdev_put() on the freed cdev:

BUG: KASAN: slab-use-after-free in cdev_put+0x53/0x60 Read of size 8 at addr ffff88801383e138 by task ppsgen64/149 Call Trace: cdev_put+0x53/0x60 __fput+0x745/0xad0 fput_close_sync+0xd9/0x1b0 __x64_sys_close+0x86/0xf0 ... Freed by task 149: kfree+0x25a/0x6d0 device_release+0xca/0x3c0 kobject_put+0x169/0x320 pps_gen_cdev_release+0x51/0x80 __fput+0x36a/0xad0

pps.c had the same bug, fixed in commit c79a39dc8d06 ("pps: Fix a use-after-free").

Fix it the usual way: embed the struct device in pps_gen_device and register both with cdev_device_add(). This makes the device the parent of the cdev, so the cdev holds a device reference until the last file is closed.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 11/21/2026

The Linux kernel contains a critical use-after-free vulnerability within the Pulse Per Second (PPS) generator subsystem that arises from improper lifetime management between character devices and their underlying data structures. The core issue stems from the architectural design where the cdev structure, which represents the character device interface to user space, is embedded directly within the pps_gen_device struct without establishing a formal reference count dependency. In this configuration, the lifecycle of the pps_gen_device object is tied to the release function of its associated device object rather than being anchored by the open file descriptors held in user space. Consequently, when an application opens the /dev/pps-genN interface, it acquires a reference to the underlying device structure only until the cdev's own release callback executes. This creates a window where the structural integrity is not guaranteed for the duration of the active session.

The vulnerability manifests specifically during the race condition between device unregistration and file descriptor closure. When a PPS generator device is removed or unregistered from the system while an application still holds an open file handle to /dev/pps-genN, the kernel proceeds with cleanup operations that do not account for the lingering user-space reference. The release function triggers kfree on the pps_gen_device structure because it believes no references remain. However, subsequent execution of __fput during normal file descriptor closure attempts to call cdev_put() on the now-freed memory region. This results in a slab-use-after-free error as detected by Kernel Address Sanitizer (KASAN), where the kernel reads from an address that has already been returned to the allocator for reuse.

From a security and stability perspective, this flaw allows for potential denial of service through kernel panic or crash due to invalid memory access. In more sophisticated attack scenarios, if an attacker can control the contents written into the freed slab region before it is reallocated, they might achieve arbitrary code execution by exploiting the subsequent use of the corrupted pointer. This vulnerability aligns with CWE-416, Use After Free, a common class of software defects where memory is accessed after it has been freed, leading to undefined behavior and potential exploitation vectors. The operational impact includes system instability for any process interacting with PPS generators during device hot-unplug or driver removal events.

The resolution involves restructuring the object hierarchy to enforce correct reference counting semantics by embedding struct device directly within pps_gen_device and utilizing cdev_device_add() for registration. This architectural change establishes a parent-child relationship where the character device holds a strong reference to its underlying device structure. As a result, the kernel will not free the pps_gen_device until all file descriptors referencing it are closed, ensuring that __fput operates on valid memory. This fix mirrors similar corrections applied previously in pps.c and ensures robust lifecycle management across the subsystem. Mitigation strategies for systems unable to immediately patch include avoiding unregistration of PPS generator devices while any user-space applications maintain open handles to them, though applying the kernel update remains the definitive remediation path aligned with industry best practices for memory safety.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/19/2026

Moderation

accepted

CPE

ready

EPSS

0.00166

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!