
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.
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 |
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:
┌──────────────────────────────────────────────────────────────────┐
│ 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
┌──[STEP 4] Compilation & Exploit Execution (fragnesia.c)
│ [i] INFO : Toolchain: gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
│ $ gcc -O2 -w fragnesia.c -o exp
│ [✓] Compilation succeeded -> ./exp
│ $ ./exp
│ [*] Fragnesia exploit running...
│ [*] Overwriting page cache...
│ [*] Got root! uid=0(root) gid=0(root)
└──
skb_try_coalesce() fix from your distro vendor.sudo sysctl -w kernel.unprivileged_userns_clone=0
/etc/sysctl.conf.echo 'install esp4_offload /bin/true' | sudo tee /etc/modprobe.d/disable-esp.conf
sudo update-initramfs -u
exp / suspicious processes in /tmpCAP_NET_ADMIN on containers & user namespacesCVE-2026-46300_Fragnesia/
├── fragnesia.sh # Audit scanner + exploit execution trigger (bash)
├── fragnesia.c # LPE exploit source (C)
└── README.md # This documentation
For authorized use only. This tool is intended for:
You must have written permission from the system owner before running this tool on any infrastructure.
The repository is provided "as-is" without any warranty. Contributors are not responsible for misuse.
License: MIT
skb_try_coalesce() — networking stack documentation| 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 |
| 1–2/3 VULN | 🟨 MEDIUM / PARTIALLY EXPOSED — partial mitigation |
| 0/3 VULN | 🟩 SECURE — patched / components disabled |
| 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 |