Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-57979 Overview
CVE-2024-57979 is a use-after-free vulnerability in the Linux kernel's Pulse Per Second (PPS) subsystem. The flaw occurs because pps_device_destruct() frees the pps_device structure with its embedded character device (cdev) immediately after calling cdev_del(). File operations on previously opened character devices remain callable after cdev_del() returns, creating a window where userspace processes can access freed kernel memory. The vulnerability was observed consistently on systems running ntpd and gpsd during reboot operations. Successful exploitation can lead to kernel memory corruption, denial of service through kernel panic, or local privilege escalation on affected systems.
Critical Impact
Local attackers with low-privilege access can trigger kernel memory corruption through the PPS character device interface, potentially achieving privilege escalation or system crash.
Affected Products
- Linux Kernel (multiple versions prior to patched commits)
- Debian Linux (addressed via Debian LTS advisories)
- Siemens industrial products embedding affected kernel versions
Discovery Timeline
- 2025-02-27 - CVE-2024-57979 published to the National Vulnerability Database
- 2026-10-15 - Last updated in NVD database
Technical Details for CVE-2024-57979
Vulnerability Analysis
The vulnerability resides in the PPS (Pulse Per Second) subsystem used for high-precision time synchronization with hardware signal sources such as GPS receivers. The core issue is a lifecycle mismatch between kernel character device registration and the backing pps_device structure. When a PPS source unregisters, pps_device_destruct() releases the structure immediately after cdev_del(), but concurrent userspace handles can still invoke file operations on the embedded cdev. This leads to dereferencing freed kernel memory through paths such as cdev_put() and __fput(), as shown in the reported kernel oops.
Subsequent corruption indicators include refcount_t: underflow; use-after-free warnings and kernel panics triggered by list corruption in lib/list_debug.c. The classification is use-after-free [CWE-416].
Root Cause
The root cause is the embedded cdev structure inside pps_device, which is freed while file descriptors referencing it may still exist in userspace. The kernel documentation for cdev_del() explicitly warns that previously opened file operations remain callable after return. The fix replaces the embedded cdev approach with __register_chrdev() and makes pps_idr the authoritative source linking minor numbers to devices, with pps_idr now holding a reference to pps->dev to prevent premature deallocation.
Attack Vector
Exploitation requires local access with the ability to open the PPS character device (/dev/pps*). A local user runs a process that holds an open file descriptor to a PPS device while another privileged action (such as device removal during reboot or module unload) triggers pps_device_destruct(). When the user process exits or closes the descriptor, kernel code dereferences the freed kobject, leading to memory corruption. The vulnerability requires low privileges and no user interaction. Technical details are available in the Linux Kernel Commit 1a7735ab and related patches.
Detection Methods for CVE-2024-57979
Indicators of Compromise
- Kernel log messages containing kobject: '(null)' ... is not initialized, yet kobject_put() is being called
- Warnings reporting refcount_t: underflow; use-after-free originating from the PPS subsystem
- Kernel BUG messages at lib/list_debug.c:62 following PPS device removal events
- Call traces including cdev_put, __fput, and pps_core: unregistering sequences
Detection Strategies
- Monitor /var/log/kern.log and dmesg output for PPS-related oops messages and kernel warnings during device teardown
- Deploy kernel address sanitizer (KASAN) in test environments to catch use-after-free conditions in the PPS code path
- Audit running kernel versions across the fleet and correlate with patched commit hashes from kernel.org stable trees
- Alert on unexpected process termination of gpsd, ntpd, or other PPS consumers paired with kernel exception traces
Monitoring Recommendations
- Centralize kernel log collection for systems using PPS hardware, especially industrial controllers and timing-sensitive infrastructure
- Track process access to /dev/pps* device nodes using Linux audit framework (auditctl -w /dev/pps0 -p rwa)
- Establish baselines for PPS subsystem events and investigate anomalies in device registration or removal frequency
How to Mitigate CVE-2024-57979
Immediate Actions Required
- Apply the upstream Linux kernel patches referenced in the official stable commits listed by kernel.org
- Install distribution-provided kernel updates, including those from Debian LTS Announcement #00028 and Debian LTS Announcement #00030
- Review Siemens advisories including Siemens Security Advisory SSA-019113 and Siemens Security Advisory SSA-784472 for industrial deployments
- Restrict access to PPS device nodes to trusted users and services only
Patch Information
The fix removes the embedded cdev from pps_device and switches to __register_chrdev(), making pps_idr the source of truth for minor-to-device mapping. The idr_remove() call moves to pps_unregister_cdev(), and pps_idr now holds a reference to pps->dev to prevent userspace from obtaining a reference to a device being torn down. Patches are available at Linux Kernel Commit 785c78ed, Linux Kernel Commit 7e5ee328, and Linux Kernel Commit c4041b6b.
Workarounds
- Unload the pps_core kernel module on systems that do not require PPS functionality using modprobe -r pps_core
- Blacklist PPS-related modules via /etc/modprobe.d/ configuration on hosts without GPS or precision timing hardware
- Set restrictive permissions on /dev/pps* device nodes to limit which users can open them
- Avoid unregistering PPS sources while consumer processes hold open file descriptors to the device
# Configuration example
# Verify current kernel version and PPS module status
uname -r
lsmod | grep pps
# Blacklist PPS modules if not required
echo "blacklist pps_core" | sudo tee /etc/modprobe.d/blacklist-pps.conf
echo "blacklist pps_ldisc" | sudo tee -a /etc/modprobe.d/blacklist-pps.conf
# Restrict device node permissions where PPS is required
sudo chmod 600 /dev/pps*
sudo chown root:root /dev/pps*
# Audit access to PPS devices
sudo auditctl -w /dev/pps0 -p rwa -k pps_access
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

