[LINPEAS] Add privilege escalation check: From Chrome Renderer Code Execution to L... #541
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 describes a local Linux kernel vulnerability (CVE‑2025‑38236) in AF_UNIX MSG_OOB handling that leads to a reliable privilege escalation path from an unprivileged sandboxed renderer to kernel code execution. This is a generic kernel bug, not a CTF‑style custom misconfiguration or a niche userspace package issue. The technique hinges on:
Kernel‑level LPE primitive: A reachable and fully weaponized UAF in the Linux kernel for versions >= 6.9 where CONFIG_AF_UNIX_OOB is enabled (which is the default when AF_UNIX is enabled prior to the later config prompt). The exploitation relies on only standard syscalls (socketpair, send, recv, clone, pipe, etc.) and default AF_UNIX behaviour, so it is representative of real environments.
Reachability from common sandboxes: The post explicitly shows that the bug is reachable from Chrome’s Linux Desktop renderer sandbox via stream AF_UNIX sockets and unfiltered send/recv flags. That means in practice it is a realistic route from low‑privileged code to root/kernel, not a lab‑only configuration.
Generalizable exploitation pattern: Beyond this specific CVE, the writeup documents reusable, environment‑agnostic exploitation patterns:
All of these are building blocks of a practical local privilege escalation exploit chain on a vanilla modern Linux distribution with a vulnerable kernel. They are not dependent on custom daemons, odd init scripts, or non‑standard third‑party software versions. As such, the core detection opportunity that is suitable for linpeas is the presence of the vulnerable kernel feature / version combination and configuration.
The exact exploit techniques (forging SKBs, vmemmap introspection, pipe/stack recycling) are too low‑level and exploit‑specific to codify directly into an automated enumeration script like linpeas. However, for linpeas' purpose (enumeration and vulnerability hinting), it is both feasible and valuable to:
This is aligned with how linpeas already checks for known, high‑impact, broadly relevant local kernel LPE CVEs (e.g., Dirty Pipe, Dirty COW, overlayfs bugs), and this AF_UNIX MSG_OOB bug fits that same class: a widespread mainline kernel LPE condition, reachable from unprivileged code through standard interfaces on desktop/server Linux.
🤖 Implementation Details
PEASS linpeas agent completed successfully with 140 items. Agent Comment: Summary:
linPEAS/builder/linpeas_parts/1_system_information/18_CVE_2025_38236.sh) that highlights vulnerable Linux kernels (≥6.9) where AF_UNIX MSG_OOB is enabled, aligning with the Project Zero exploitation chain.uname -r, compares versions, inspects kernel configs (CONFIG_AF_UNIX_OOB/CONFIG_UNIX) across common paths (including/proc/config.gz), and reports mitigations or confirms when MSG_OOB is disabled.Testing:
sh -n linPEAS/builder/linpeas_parts/1_system_information/18_CVE_2025_38236.sh🏗️ Builder Agent Response
LinPEAS build agent completed successfully with 83 items. Agent Comment: ✅ LinPEAS build fixed and verified
What I did
/tmp/hacktricks_update_1961lfng/repo/linPEASand reproduced the failure. The builder complained that several variables inlinpeas_parts/1_system_information/18_CVE_2025_38236.shwere missing from the “Generated Global Variables” metadata.$cve38236_kernel_release,$cve38236_conf_file, etc.) to the Generated Global Variables metadata block so the builder knows they’re intentional._cve38236_cat_config_fileand_cve38236_read_config_lineto CVE‑specific names for uniqueness/clarity, and rewriting_cve38236_read_config_lineto use the new names consistently.python3 -m builder.linpeas_builder --all --output /tmp/linpeas_fat.shwith a 600‑second timeout. This time the build completed successfully and produced/tmp/linpeas_fat.sh.Result
/tmp/linpeas_fat.shLet me know if you’d like me to run additional checks or commits.
This PR was automatically created by the HackTricks Feed Bot. Please review the implementation carefully and test thoroughly before merging.