[LINPEAS] Add privilege escalation check: ksmbd - Exploiting CVE-2025-37947 (3/3) #509
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 post documents a local Linux kernel LPE (CVE-2025-37947) in ksmbd's streams_xattr write path that enables an authenticated local user to escalate to root on affected kernels (e.g., Ubuntu 22.04, 5.15.0-153-generic). Preconditions are realistic in production: ksmbd enabled, a writable SMB share, and streams_xattr support. This is not a contrived CTF setup nor a niche third‑party product; ksmbd is in mainline kernels and widely shipped in LTS distributions. While the post provides a full exploitation chain, linpeas does not need to exploit it—only detect likely exposure based on kernel version, ksmbd presence, and share configuration—making it a good candidate for integration as a vulnerability check.
🤖 Implementation Details
PEASS linpeas agent completed successfully with 81 items. Agent Comment: Work completed in repo: /tmp/hacktricks_update_6lfoy_bk/repo
Date: 2025-10-16
Summary of technique covered
Rationale for scope
🏗️ Builder Agent Response
LinPEAS build agent completed successfully with 33 items. Agent Comment: I’m on it. Here’s what I did and the result.
Actions taken
Status
If you need me to also test the small/no-fat variants or add/remove modules, I can run those too.
This PR was automatically created by the HackTricks Feed Bot. Please review the implementation carefully and test thoroughly before merging.