CVE-2024-57979
High · 7.8CVSS
7.8
EPSS
0.3%
Published
Feb 27, 2025
CISA due date
—
Cloudanix analysis
A bug in how Linux handles certain timing devices can crash the whole system or let a logged-in attacker take control when the computer shuts down.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Full Compromise
- Component
- OS kernel
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free in PPS subsystem: pps_device_destruct frees the embedded cdev immediately after cdev_del, but fops remain callable on open file descriptors, leading to kobject_put and refcount underflow on process exit.
Why it matters to the business
Kernel crashes, panics, or local privilege escalation on systems using PPS timing hardware (GPS, NTP); affects stability of Linux servers and embedded devices, requiring urgent patching on affected kernels.
How an attack unfolds
Local attacker opens a file descriptor to a PPS device, triggers device removal via unregistration, then exits the process so that fput invokes operations on the already-freed cdev structure, causing memory corruption or escalation.
How to fix it
Apply the fix from commit 28a33cbc24e4256c143dce96c7d93bf423229f92 which removes the embedded cdev, uses __register_chrdev with pps_idr for reference counting, and moves idr_remove to pps_unregister_cdev; rebuild and reboot to the patched kernel.
How to confirm the fix worked
Verify kernel git commit or version contains 28a33cbc24e4256c143dce96c7d93bf423229f92; reproduce with gpsd/ntpd and reboot to confirm absence of kobject_put warnings, refcount underflows, or list_debug BUGs.
Typical attack path
- Obtain local access on a Linux system exposing PPS devices
- Open a file descriptor to /dev/ppsX
- Trigger PPS source removal or reboot
- Exit the holding process to invoke ____fput on freed object
- Leverage UAF for corruption or code execution
How to detect it
Search dmesg, syslog, and kernel logs for strings indicating PPS removal followed by kobject warnings, refcount underflow, or list_debug BUGs during process exit or reboot; correlate with gpsd or ntpd activity.
- kobject: '(null)' .* is not initialized, yet kobject_put()
- refcount_t: underflow; use-after-free.
- pps pps.*: removed
- pps_core: unregistering pps
- WARNING: CPU:.*at lib/kobject.c:.*kobject_put
- Kernel panic - not syncing: Oops - BUG: Fatal exception
What your security team should do
- Immediately update all Linux kernels to the commit 28a33cbc24e4256c143dce96c7d93bf423229f92 or later on systems with PPS hardware
- Restrict local unprivileged access until patched
- Monitor kernel logs for pps-related oops during shutdown
- Test reboot sequences with timing daemons after update
The record
In the Linux kernel, the following vulnerability has been resolved: pps: Fix a use-after-free On a board running ntpd and gpsd, I'm seeing a consistent use-after-free in sys_exit() from gpsd when rebooting: pps pps1: removed ------------[ cut here ]------------ kobject: '(null)' (00000000db4bec24): is not initialized, yet kobject_put() is being called. WARNING: CPU: 2 PID: 440 at lib/kobject.c:734 kobject_put+0x120/0x150 CPU: 2 UID: 299 PID: 440 Comm: gpsd Not tainted 6.11.0-rc6-00308-gb31c44928842 #1 Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT) pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : kobject_put+0x120/0x150 lr : kobject_put+0x120/0x150 sp : ffffffc0803d3ae0 x29: ffffffc0803d3ae0 x28: ffffff8042dc9738 x27: 0000000000000001 x26: 0000000000000000 x25: ffffff8042dc9040 x24: ffffff8042dc9440 x23: ffffff80402a4620 x22: ffffff8042ef4bd0 x21: ffffff80405cb600 x20: 000000000008001b x19: ffffff8040b3b6e0 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 696e6920746f6e20 x14: 7369203a29343263 x13: 205d303434542020 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000 x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000 x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000 x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000 Call trace: kobject_put+0x120/0x150 cdev_put+0x20/0x3c __fput+0x2c4/0x2d8 ____fput+0x1c/0x38 task_work_run+0x70/0xfc do_exit+0x2a0/0x924 do_group_exit+0x34/0x90 get_signal+0x7fc/0x8c0 do_signal+0x128/0x13b4 do_notify_resume+0xdc/0x160 el0_svc+0xd4/0xf8 el0t_64_sync_handler+0x140/0x14c el0t_64_sync+0x190/0x194 ---[ end trace 0000000000000000 ]--- ...followed by more symptoms of corruption, with similar stacks: refcount_t: underflow; use-after-free. kernel BUG at lib/list_debug.c:62! Kernel panic - not syncing: Oops - BUG: Fatal exception This happens because pps_device_destruct() frees the pps_device with the embedded cdev immediately after calling cdev_del(), but, as the comment above cdev_del() notes, fops for previously opened cdevs are still callable even after cdev_del() returns. I think this bug has always been there: I can't explain why it suddenly started happening every time I reboot this particular board. In commit d953e0e837e6 ("pps: Fix a use-after free bug when unregistering a source."), George Spelvin suggested removing the embedded cdev. That seems like the simplest way to fix this, so I've implemented his suggestion, using __register_chrdev() with pps_idr becoming the source of truth for which minor corresponds to which device. But now that pps_idr defines userspace visibility instead of cdev_add(), we need to be sure the pps->dev refcount can't reach zero while userspace can still find it again. So, the idr_remove() call moves to pps_unregister_cdev(), and pps_idr now holds a reference to pps->dev. pps_core: source serial1 got cdev (251:1) <...> pps pps1: removed pps_core: unregistering pps1 pps_core: deallocating pps1
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | bpftool | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-abi-stablelists | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-core | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-cross-headers | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-debug | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-debug-core | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-debug-devel | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-debug-modules | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-debug-modules-extra | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-devel | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-doc | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-headers | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-modules | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-modules-extra | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-rt | 0 | 4.18.0-553.44.1.rt7.385.el8_10 |
| AlmaLinux:8 | kernel-rt-core | 0 | 4.18.0-553.44.1.rt7.385.el8_10 |
| AlmaLinux:8 | kernel-rt-debug | 0 | 4.18.0-553.44.1.rt7.385.el8_10 |
| AlmaLinux:8 | kernel-rt-debug-core | 0 | 4.18.0-553.44.1.rt7.385.el8_10 |
| AlmaLinux:8 | kernel-rt-debug-devel | 0 | 4.18.0-553.44.1.rt7.385.el8_10 |
| AlmaLinux:8 | kernel-rt-debug-modules | 0 | 4.18.0-553.44.1.rt7.385.el8_10 |
| AlmaLinux:8 | kernel-rt-debug-modules-extra | 0 | 4.18.0-553.44.1.rt7.385.el8_10 |
| AlmaLinux:8 | kernel-rt-devel | 0 | 4.18.0-553.44.1.rt7.385.el8_10 |
| AlmaLinux:8 | kernel-rt-modules | 0 | 4.18.0-553.44.1.rt7.385.el8_10 |
| AlmaLinux:8 | kernel-rt-modules-extra | 0 | 4.18.0-553.44.1.rt7.385.el8_10 |
| AlmaLinux:8 | kernel-tools | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-tools-libs | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-tools-libs-devel | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-zfcpdump | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-zfcpdump-core | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-zfcpdump-devel | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-zfcpdump-modules | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | kernel-zfcpdump-modules-extra | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | perf | 0 | 4.18.0-553.44.1.el8_10 |
| AlmaLinux:8 | python3-perf | 0 | 4.18.0-553.44.1.el8_10 |
| Debian:11 | linux | 0 | No fix |
| Debian:11 | linux-6.1 | 0 | 6.1.129-1~deb11u1 |
| Debian:12 | linux | 0 | No fix |
| Debian:13 | linux | 0 | No fix |
| Debian:13 | linux | 0 | 6.12.13-1 |
| Linux | Kernel | 3.9.0 | 5.4.291 |
| SUSE:Linux Enterprise High Availability Extension 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.47.2 |
| SUSE:Linux Enterprise Live Patching 12 SP5 | kernel-default | 0 | 4.12.14-122.255.1 |
| SUSE:Linux Enterprise Live Patching 12 SP5 | kgraft-patch-SLE12-SP5_Update_67 | 0 | 1-8.5.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.47.2 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_10 | 0 | 1-150600.1.5.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_10 | 0 | 1-150600.13.5.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-64kb | 0 | 6.4.0-150600.23.47.2 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.47.2 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-default-base | 0 | 6.4.0-150600.23.47.2.150600.12.20.2 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-source | 0 | 6.4.0-150600.23.47.2 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-zfcpdump | 0 | 6.4.0-150600.23.47.2 |
| SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 | kernel-coco | 0 | 6.4.0-15061.21.coco15sp6.1 |
| SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 | kernel-coco_debug | 0 | 6.4.0-15061.21.coco15sp6.1 |
| SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 | kernel-source-coco | 0 | 6.4.0-15061.21.coco15sp6.1 |
| SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 | kernel-syms-coco | 0 | 6.4.0-15061.21.coco15sp6.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-docs | 0 | 6.4.0-150600.23.47.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-obs-build | 0 | 6.4.0-150600.23.47.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-source | 0 | 6.4.0-150600.23.47.2 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-syms | 0 | 6.4.0-150600.23.47.1 |
| SUSE:Linux Enterprise Module for Legacy 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.47.2 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-azure | 0 | 6.4.0-150600.8.31.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-source-azure | 0 | 6.4.0-150600.8.31.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-syms-azure | 0 | 6.4.0-150600.8.31.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | kernel-default | 0 | 4.12.14-122.255.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | kernel-source | 0 | 4.12.14-122.255.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | kernel-syms | 0 | 4.12.14-122.255.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | kernel-default | 0 | 4.12.14-122.255.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | kernel-source | 0 | 4.12.14-122.255.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | kernel-syms | 0 | 4.12.14-122.255.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.47.2 |
| SUSE:Real Time Module 15 SP6 | kernel-rt | 0 | 6.4.0-150600.10.34.1 |
| SUSE:Real Time Module 15 SP6 | kernel-rt_debug | 0 | 6.4.0-150600.10.34.1 |
| SUSE:Real Time Module 15 SP6 | kernel-source-rt | 0 | 6.4.0-150600.10.34.1 |
| SUSE:Real Time Module 15 SP6 | kernel-syms-rt | 0 | 6.4.0-150600.10.34.1 |
| Ubuntu:24.10 | linux-aws | 0 | 6.11.0-1014.15 |
| openSUSE:Leap 15.6 | dtb-aarch64 | 0 | 6.4.0-150600.23.47.1 |
| openSUSE:Leap 15.6 | kernel-64kb | 0 | 6.4.0-150600.23.47.2 |
| openSUSE:Leap 15.6 | kernel-azure | 0 | 6.4.0-150600.8.31.1 |
| openSUSE:Leap 15.6 | kernel-debug | 0 | 6.4.0-150600.23.47.2 |
| openSUSE:Leap 15.6 | kernel-default | 0 | 6.4.0-150600.23.47.2 |
| openSUSE:Leap 15.6 | kernel-default-base | 0 | 6.4.0-150600.23.47.2.150600.12.20.2 |
| openSUSE:Leap 15.6 | kernel-docs | 0 | 6.4.0-150600.23.47.1 |
| openSUSE:Leap 15.6 | kernel-kvmsmall | 0 | 6.4.0-150600.23.47.2 |
| openSUSE:Leap 15.6 | kernel-obs-build | 0 | 6.4.0-150600.23.47.1 |
| openSUSE:Leap 15.6 | kernel-obs-qa | 0 | 6.4.0-150600.23.47.1 |
| openSUSE:Leap 15.6 | kernel-rt | 0 | 6.4.0-150600.10.34.1 |
| openSUSE:Leap 15.6 | kernel-rt_debug | 0 | 6.4.0-150600.10.34.1 |
| openSUSE:Leap 15.6 | kernel-source | 0 | 6.4.0-150600.23.47.2 |
| openSUSE:Leap 15.6 | kernel-source-azure | 0 | 6.4.0-150600.8.31.1 |
| openSUSE:Leap 15.6 | kernel-source-rt | 0 | 6.4.0-150600.10.34.1 |
| openSUSE:Leap 15.6 | kernel-syms | 0 | 6.4.0-150600.23.47.1 |
| openSUSE:Leap 15.6 | kernel-syms-azure | 0 | 6.4.0-150600.8.31.1 |
| openSUSE:Leap 15.6 | kernel-syms-rt | 0 | 6.4.0-150600.10.34.1 |
| openSUSE:Leap 15.6 | kernel-zfcpdump | 0 | 6.4.0-150600.23.47.2 |
Related vulnerabilities
- CVE-2025-68301 In the Linux kernel, the following vulnerability has been resolved: net: atlantic: fix… Also affects bpftool
- CVE-2025-68285 In the Linux kernel, the following vulnerability has been resolved: libceph: fix… Also affects bpftool
- CVE-2025-40277 In the Linux kernel, the following vulnerability has been resolved: drm/vmwgfx: Validate… Also affects bpftool
- CVE-2025-40248 In the Linux kernel, the following vulnerability has been resolved: vsock: Ignore… Also affects bpftool
- CVE-2025-40240 In the Linux kernel, the following vulnerability has been resolved: sctp: avoid NULL… Also affects bpftool
- CVE-2025-40154 In the Linux kernel, the following vulnerability has been resolved: ASoC: Intel… Also affects bpftool
- CVE-2025-40096 In the Linux kernel, the following vulnerability has been resolved: drm/sched: Fix… Also affects bpftool
- CVE-2025-39993 In the Linux kernel, the following vulnerability has been resolved: media: rc: fix races… Also affects bpftool