[LINPEAS] Add privilege escalation check: PoC for CVE-2025-38352 Linux POSIX CPU T... #542
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 describes CVE-2025-38352, a local Linux kernel vulnerability in the POSIX CPU timers implementation that enables kernel memory corruption and local privilege escalation to root on affected kernels. This is not a CTF-only misconfiguration or a custom script; it is a real kernel bug already reported as exploited in the wild (Android bulletin) and affects Linux LTS 6.12.33 kernels configured with CONFIG_POSIX_CPU_TIMERS_TASK_WORK=n. That fits linpeas’ scope of detecting kernel-level privilege escalation primitives and risky kernel configurations. The technique is generic for Linux/Android and conceptually applicable to other POSIX-like kernels, but the CVE and PoC are Linux-specific. linpeas can benefit from: (1) detecting vulnerable kernel versions/configurations (presence of the specific LTS 6.12.33 or nearby versions and CONFIG_POSIX_CPU_TIMERS_TASK_WORK disabled), and (2) flagging the host as potentially vulnerable to a known local privesc. It does not require any highly custom userland binaries or odd CTF-like setups; only the kernel build options matter, which is typical for production Android and embedded systems.
🤖 Implementation Details
PEASS linpeas agent completed successfully with 71 items. Agent Comment: Summary:
linPEAS/builder/linpeas_parts/1_system_information/18_CVE_2025_38352.shthat detects the newly disclosed Linux kernel POSIX CPU timers race (CVE-2025-38352). The check inspects the running kernel release (with special emphasis on Linux 6.12.x where the public PoC targets 6.12.33) and walks common kernel-config locations (/proc/config.gz,/boot/config-$(uname -r), module build trees, etc.) to determine whetherCONFIG_POSIX_CPU_TIMERS_TASK_WORKis disabled, which is the prerequisite for the vulnerability.Testing:
bash -n linPEAS/builder/linpeas_parts/1_system_information/18_CVE_2025_38352.sh🏗️ Builder Agent Response
LinPEAS build agent completed successfully with 50 items. Agent Comment: Build fixed ✅
Navigated to
/tmp/hacktricks_update_3hhop4sz/repo/linPEASand ranpython3 -m builder.linpeas_builder --all --output /tmp/linpeas_fat.sh. The first attempt failed because the new modulebuilder/linpeas_parts/1_system_information/18_CVE_2025_38352.shdeclared several undeclared global variables.Updated that module by:
# Generated Global Variablesmetadata.cve38352_prefix (e.g.,$kernel_release→$cve38352_kernel_release) to avoid namespace collisions and satisfy the builder’s metadata checks.Re-ran the build command (timeout 600s). This time it completed successfully, downloading the auxiliary tooling and writing the fat build to
/tmp/linpeas_fat.sh.LinPEAS now builds cleanly with no outstanding errors.
This PR was automatically created by the HackTricks Feed Bot. Please review the implementation carefully and test thoroughly before merging.