CVE-2025-38352 – In-the-wild Android Kernel Vulnerability An... #1706
+125
−4
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
This post is a detailed, exploit-focused analysis of CVE-2025-38352, a race-condition use-after-free (UAF) in the Linux kernel’s POSIX CPU timers. It explains how the subsystem works, how the race arises between CPU timer handling and timer deletion on an exiting task, and builds a working PoC that reliably triggers the bug, primarily for research against Android kernels lacking
CONFIG_POSIX_CPU_TIMERS_TASK_WORK.Execution context and vulnerable path...
🔧 Technical Details
Race-condition UAF using POSIX CPU timers on zombie tasks
The core trick is to create a race between the kernel’s POSIX CPU timer handling and userland timer deletion on a thread that has already become a zombie. When a per-CPU tick triggers
run_posix_cpu_timers(), the kernel callshandle_posix_cpu_timers(), which lockstsk->sighand->siglock, moves ready CPU timers from task structures into a localfiringlist, then drops the lock and later iteratesfiring. If the task is inEXIT_ZOMBIE, an attacker can exploit the window afterunlock_task_sighand()but beforelist_for_each_entry_safe()to reap the zombie (viawaitpid()so thatrelease_task()setstsk->sighand = NULL) and then calltimer_delete()on the same CPU timer. Becauseposix_cpu_timer_del()returns 0 even whenlock_task_sighand()🤖 Agent ActionsUpdatedsrc/linux-hardening/privilege-escalation/linux-kernel-exploitation/posix-cpu-timers-toctou-cve-2025-38352.mdwith deeper technical coverage of CVE-2025-38352:release_task()+timer_delete()free firing timers, including kernel code snippets and explanation of the RCU-based UAF window.CLOCK_THREAD_CPUTIME_IDtimers (with collapsible code sample), race timeline, and optional kernel instrumentation tips.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.).