PoC for CVE-2025-38352 Linux POSIX CPU Timers Race Condition #1704
+43
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
CVE-2025-38352 is a race-condition vulnerability in the Linux kernel’s POSIX CPU timers implementation. The repository
farazsth98/poc-CVE-2025-38352provides a concrete, buildable proof of concept targeting Linux LTS 6.12.33, primarily for Android kernels where the bug has been reported as “limited, targeted exploitation in the wild” in the September 2025 Android security bulletin.The bug i...
🔧 Technical Details
Abusing race conditions in POSIX CPU timers for kernel memory corruption
CVE-2025-38352 demonstrates that the Linux POSIX CPU timers subsystem can become vulnerable when timer operations are handled synchronously in
handle_posix_cpu_timers()and concurrently modified elsewhere. The general trick is: (1) identify a kernel handler that walks timer/task structures with insufficient synchronization; (2) from userspace, spawn threads or processes that rapidly create, arm, disarm, and destroy POSIX CPU timers; and (3) rely on scheduling to overlap those operations with the handler’s traversal so that a timer or task structure is freed or repurposed while still being referenced. In any kernel with similar lifetime/locking issues, this pattern can yield a use-after-free or stale-pointer dereference, which can then be shaped into arbitrary kernel memory corruption and, ultimately, code execution.Making narrow kernel races reliably expl...
🤖 Agent Actions
Summary:
CONFIG_POSIX_CPU_TIMERS_TASK_WORKvia Kconfig edits, running multi-core QEMU guests, tuning the PoC’swait_time, and compiling/running the static trigger; updated the references with the PoC blog and GitHub repository.Testing:
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.
📚 Repository Maintenance
All .md files have been checked for proper formatting (headers, includes, etc.).