etc.git


etc

~ scripts and random things
git clone https://github.com/djnnvx/etc.git
log | files | refs | archive

README.md (3449B)

      1 # PPPoEject (CVE-2026-68121)
      2 
      3 [Writeup](https://heyitsas.im/posts/lpe-quartet/)
      4 
      5 > [!WARNING]
      6 > The PoC is provided solely to help defenders, maintainers, and authorized
      7 > security teams validate patches, mitigations, detections, and exposure on
      8 > systems they own or are explicitly authorized to test.
      9 >
     10 > You are solely responsible for ensuring that your use of this material is
     11 > lawful, authorized, controlled, and conducted in an isolated test environment.
     12 
     13 
     14 > [!WARNING]
     15 > **This PoC is destructive.** It deliberately corrupts live kernel memory.
     16 > A misplaced overwrite can corrupt unrelated kernel memory and hang/crash the machine.
     17 >
     18 > Run only in a disposable VM/throwaway host.
     19 
     20 The PoC:
     21 
     22 1. Compiles embedded helpers and locates the randomized kernel text base with an
     23 x86-64 prefetch/RDTSCP timing side channel
     24 2. builds an AF_PACKET TX-ring carrier containing fake `struct file` objects and
     25 grooms a populated fdtable into the target allocation
     26 3. stalls a PPPoE payload copy on an attacker-owned FUSE page, then adds IP6GRE
     27 to an empty team device on Fedora or through a bonding chain on Ubuntu
     28 4. makes `dev_hard_header()` reallocate the skb head, then uses the stale PPPoE
     29 header pointer to redirect an fdtable entry to the fake file, and
     30 5. closes the redirected descriptor, executes the controlled callback, installs
     31 root credentials, and opens `/bin/sh -p`.
     32 
     33 The PoC assumes and targets x86-64 to keep things simple. In theory, the bug
     34 should not be arch-specific, but you'd need to port a lot (from leaking the
     35 kernel base to the rest of the chain).
     36 
     37 ## Requirements
     38 
     39 Enumerating exhaustively for completeness:
     40 
     41 - At least 4 available CPUs (important for the PPPoE sender, fdtable
     42   reclaimer/carrier, FUSE blocker, and trigger/release orchestrator workers to
     43   perform timing-critical work with less scheduler interference)
     44 - Fedora 44 with `6.19.10-300.fc44.x86_64`, or Ubuntu 24.04 with
     45   `6.8.0-124-generic` or `6.8.0-136-generic` (you can try removing these
     46   checks, but other distros/kernel versions may require per-target
     47   customization/grooming)
     48 - An ordinary non-root account with a `passwd` entry and a home directory it
     49   owns
     50 - An Intel or AMD x86-64 CPU with RDTSCP, KPTI/PTI inactive, and at least four
     51   logical CPUs in the process affinity mask
     52 - Unprivileged user/network namespace creation with `CAP_NET_ADMIN` and
     53   `CAP_NET_RAW` inside that namespace
     54 - Read/write access to `/dev/fuse`, plus FUSE, PPPoE, IP6GRE, AF_PACKET/TX-ring,
     55   and team support on Fedora or bonding support on Ubuntu
     56 - Private expedited `membarrier` for selected low-order layouts
     57 - Dummy and 802.1Q VLAN devices for selected high-order layouts
     58 - An `RLIMIT_NOFILE` hard limit large enough for the selected carrier geometry,
     59   checked at runtime and potentially requiring up to 8,192 descriptors
     60 - Misc. userspace things (which the tested distros in scope should mostly have
     61   by default): Python 3.10+, `gcc` with libc and Linux UAPI development
     62   headers, `taskset`, `unshare`, `ip`, `true`, and `/bin/sh`, plus `aa-exec`
     63   and the loaded `trinity` profile on Ubuntu if direct `unshare -Urn` is
     64   denied
     65 
     66 Tested only with 4GB RAM and a variety of 4+ CPU counts. Other CPU/memory combos
     67 may need more grooming and/or may redirect the write into unrelated memory.
     68 
     69 Run it as an unprivileged user with a `passwd` entry. The Ubuntu conversion can
     70 take a while (e.g., 300+ attempts).
     71 
     72 ## Usage
     73 
     74 ```sh
     75 python3 pppoeject_root_repro.py
     76 ```