
Linux kernel local privilege escalation exploit with automated prerequisite audit for CVE-2026-46300, validating patch status, XFRM ESP-in-TCP configuration, and user namespaces before compiling and running the exploit.
Linux Kernel LPE Audit & Exploit Toolkit Β· Page-Cache / XFRM ESP-in-TCP (espintcp) Regression
Interactive audit β LPE prerequisite detection β Automated exploit execution (after confirmation)
β οΈ Ethical & Legal Warning This tool is intended solely for legitimate and authorized security testing β contracted pentests, lab/CTF environments, or your own assets. Unauthorized use on systems without the owner's permission is a criminal offense (UU ITE, Computer Fraud and Abuse Act, etc.). The user bears full responsibility.
CVE-2026-46300 is a Local Privilege Escalation (LPE) vulnerability in the Linux kernel caused by a regression in skb_try_coalesce() that leads to page-cache corruption, exploited through the XFRM ESP-in-TCP (espintcp) subsystem.
| Item | Detail |
|---|---|
| CVE | CVE-2026-46300 |
| Type | Local Privilege Escalation (LPE) |
| Component | Linux kernel β page-cache + XFRM ESP-in-TCP (espintcp) |
| Root Cause | skb_try_coalesce() regression β memory/page-cache corruption |
| Prerequisites | 3 conditions must be met (see audit table) |
| Impact | Non-privileged user β root |
This repository contains 2 components:
| File | Function |
|---|---|
fragnesia.sh | Audit scanner β checks the 3 prerequisites, then offers exploit execution if the target is vulnerable |
fragnesia.c | LPE exploit β exploit source code compiled & run by the script |
βββββββββββββββββββββββββ
β fragnesia.sh β
β Audit: 3 checks β
ββββββββββββ¬βββββββββββββ
βΌ
CHECKS_TRIGGERED > 0 ?
ββββββββ΄ββββββββ
β Yes β No β Done (target safe)
βΌ β
Is fragnesia.c present?
ββββββββ΄ββββββββ
β Yes β No β instructions, done
βΌ β
User confirmation [y/N]
ββββββββ΄ββββββββ
β Yes β No β aborted, done
βΌ β
gcc -O2 -w fragnesia.c -o exp
β
βΌ
./exp β run exploit
Operator (host where the script is run):
gcc for compiling the exploitTarget (to be potentially vulnerable):
skb_try_coalesce() patch)CONFIG_XFRM_ESPINTCP / CONFIG_INET_ESPINTCP enabled (=y/m)kernel.unprivileged_userns_clone=1)# 1. Clone
git clone https://github.com/Kentox493/CVE-2026-46300_Fragnesia.git
cd CVE-2026-46300_Fragnesia
# 2. Make sure the script is executable
chmod +x fragnesia.sh
# 3. (Optional) Toolchain if not already available
sudo apt update && sudo apt install -y build-essential
# or (RHEL/Fedora)
sudo dnf groupinstall "Development Tools"
./fragnesia.sh
fragnesia.c and fragnesia.sh must be in the same directory, because the script searches for the exploit relatively.
The script runs 3 automated audit checks.
If there is an indication of vulnerability (CHECKS_TRIGGERED > 0), a prompt appears:
[?] Target detected as vulnerable (2/3). Proceed with compilation & exploit execution? [y/N]:
Type y β the script automatically compiles + runs the exploit.
Type anything other than y / press Enter β execution is cancelled, audit ends.
gcc -O2 -w fragnesia.c -o exp
./exp
Verify hostname + running kernel, then check the distro's kernel package changelog (apt-get changelog / rpm -q --changelog) for the presence of the CVE-2026-46300 patch.
| Result | Meaning |
|---|---|
VULN | No patch in the distro changelog |
SAFE | CVE-2026-46300 patch detected |
Check the ESP-in-TCP flag in /boot/config-$(uname -r) or /proc/config.gz. Fallback: detect XFRM/IPsec modules via /lib/modules/ or lsmod.
| Result | Meaning |
|---|---|
VULN | CONFIG_XFRM_ESPINTCP / CONFIG_INET_ESPINTCP enabled (=y/m) |
SAFE | Subsystem disabled / not built |
Check kernel.unprivileged_userns_clone (fallback: /proc/sys/user/max_user_namespaces).
| Result | Meaning |
|---|---|
VULN | Userns enabled β non-privileged user can get CAP_NET_ADMIN |
SAFE | Userns disabled β mitigation active |
UNCERTAIN | Cannot be determined β manual review required |
| Score | Verdict |
|---|---|
| 3/3 VULN | π₯ CRITICAL β full attack chain satisfied |
| 1β2/3 VULN | π¨ MEDIUM / PARTIALLY EXPOSED β partial mitigation |
| 0/3 VULN | π© SECURE β patched / components disabled |
This phase is only active when CHECKS_TRIGGERED > 0. What the script runs:
# 1. Verify that fragnesia.c exists
# 2. User confirmation (default: NO / N)
# 3. Compile the exploit:
gcc -O2 -w fragnesia.c -o exp
# 4. Execute:
./exp
Compilation flag notes:
-O2 β level 2 optimization (crucial for race/timing-based exploits to be stable)-w β suppress warnings (exploit source code is usually full of int-conversion and similar warnings)Script's built-in error handling:
| Condition | Handling |
|---|---|
fragnesia.c missing | Instruction message, no crash |
gcc not installed | Message with toolchain install command |
| Compilation failed | Exploit is not executed, compiler error is displayed |
Exit code of ./exp β 0 | Reported as a failure |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FRAGNESIA (CVE-2026-46300) - HOST VULNERABILITY AUDIT TOOL β
β Linux Kernel Page-Cache / XFRM espintcp Regression Inspector β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββ[STEP 1] Host & Kernel Verification
β [i] INFO β Hostname : webserver-01
β [i] INFO β Active Kernel : 6.8.0-45-generic
β [!] VULNERABLE β Patch Changelog -> No security patch found for CVE-2026-46300
βββ
βββ[STEP 2] Kernel Subsystems Configuration (XFRM / ESP)
β [!] VULNERABLE β ESP-in-TCP Flag -> CONFIG_XFRM_ESPINTCP / CONFIG_INET_ESPINTCP active (=y/m)
βββ
βββ[STEP 3] User Namespace Isolation Prerequisite
β [!] VULNERABLE β User Namespaces -> Enabled (Allows unprivileged user to gain CAP_NET_ADMIN)
βββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β EXECUTIVE AUDIT SUMMARY β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[!] AUDIT RESULT: CRITICAL - TARGET IS HIGHLY VULNERABLE
All attack chain prerequisites (Kernel patch, ESP subsystem, and Userns) are satisfied.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β OPTIONAL: FRAGNESIA EXPLOIT EXECUTION (LPE) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[i] fragnesia.c found (18,432 bytes).
[?] Target detected as vulnerable (3/3). Proceed with compilation & exploit execution? [y/N]: y