[LINPEAS] Add privilege escalation check: CVE-2025-38352 – In-the-wild Android Ker... #543
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 Privilege Escalation Check Addition
🤔 Privilege Escalation Reasoning
The blog post analyzes CVE-2025-38352, a Linux kernel race-condition use-after-free in POSIX CPU timers, and provides a working PoC designed for Android/Linux kernels that lack CONFIG_POSIX_CPU_TIMERS_TASK_WORK. This is a generic, upstream Linux kernel bug (not a CTF-only misconfiguration or custom script) that is known to have been exploited in the wild, and the PoC is usable for local kernel privilege escalation on affected systems. Although the post focuses on Android targets, the vulnerable code path and configuration options are in mainline Linux and the author tested on a stock LTS kernel (6.12.33) compiled without CONFIG_POSIX_CPU_TIMERS_TASK_WORK, which is a realistic configuration in some mobile and embedded environments. linpeas already includes checks and references for known kernel LPE CVEs; adding awareness of this CVE and its configuration-related preconditions fits that model. The post describes conditions and configs to check (kernel version ranges, CONFIG_POSIX_CPU_TIMERS_TASK_WORK, presence of the fixing commit f90fff1e152dedf52b932240ebbd670d83330eca), and links a public PoC repository. This is not an abuse of a one-off local binary or bespoke configuration but a widely deployed kernel subsystem bug that can be used for privileged escalation from an unprivileged context to kernel code execution on vulnerable kernels.
🤖 Implementation Details
PEASS linpeas agent completed successfully with 107 items. Agent Comment: Summary:
1_system_information/18_CVE_2025_38352.sh) that reports kernel release, a sanitized comparable version, the discoveredCONFIG_POSIX_CPU_TIMERS_TASK_WORKsetting (pulled from any readable kernel config), and a heuristic patch-status indicator. It highlights high‑risk situations when task_work is disabled and the kernel is still on a <6.12.34 build, and downgrades the warning when the fix is expected or when task_work is enabled.linPEAS/README.mdwith a short “Dec 2025 update” note so users know linpeas now surfaces CVE‑2025‑38352 exposure automatically.Tests:
sh -n linPEAS/builder/linpeas_parts/1_system_information/18_CVE_2025_38352.shThe new check relies on the documented exploit preconditions (task_work disabled and lack of the upstream fix), so it stays fast, generic, and avoids digging through the entire filesystem.
🏗️ Builder Agent Response
LinPEAS build agent completed successfully with 29 items. Agent Comment: ✅ Build fixed and verified
What was done
linPEAS/builder/linpeas_parts/1_system_information/18_CVE_2025_38352.shto declare every$cve38352_*variable that the module creates under “Generated Global Variables.”Tests performed
python3 -m builder.linpeas_builder --all --output /tmp/linpeas_fat.sh(executed from/tmp/hacktricks_update_tv3dmi9b/repo/linPEAS) — ✅ build completed successfully and produced/tmp/linpeas_fat.sh.Everything is now building cleanly with the requested command.
This PR was automatically created by the HackTricks Feed Bot. Please review the implementation carefully and test thoroughly before merging.