# Environment manifest for DirtyClone (CVE-2026-43503).
# Consumed by tools/exploit-env.sh.

name: dirtyclone
description: DirtyClone page-cache write via TEE-cloned ESP-in-UDP (CVE-2026-43503).

distro: ubuntu-24.04
vm: expl-dirtyclone

# DirtyClone only matters where the DirtyFrag splice fix (f4c50a4034e6) is
# present but the clone fix (48f6a5356a33, first in v7.1-rc5) is not: the TEE
# clone path is what strips SKBFL_SHARED_FRAG. Pin the vulnerable window to a
# mainline tag in v7.1-rc1..rc4 (kernel-team mainline PPA), with rc5 as the
# patched negative control.
kernel: ubuntu-mainline:7.1-rc4
patched_kernel: ubuntu-mainline:7.1-rc5

components:
  - bashrc

packages:
  - gcc
  - iproute2
  - iptables

# ESP receive path needs esp4/esp6; the TEE clone path needs xt_TEE (pulls in
# x_tables and nf_dup_ipv4). Force-load so the bug is exposed even where the
# distro blacklists module autoload.
unblacklist:
  - esp4
  - esp6
modules:
  - esp4
  - esp6
  - xt_TEE

sysctls:
  kernel.apparmor_restrict_unprivileged_userns: "0"

observations: |
  The corruption primitive is identical to DirtyFrag's ESP variant (in-place
  cbc(aes) decrypt over a spliced page-cache page, payload word carried in the
  SA seq_hi field). The only new element is the mangle/OUTPUT TEE rule, which
  duplicates the ESP-in-UDP packet so the clone — with SKBFL_SHARED_FRAG
  dropped by __pskb_copy_fclone() — reaches esp_input() and is decrypted in
  place. On a kernel without the splice fix the direct DirtyFrag path also
  works; the TEE clone is what keeps it working once the splice fix lands.

build: gcc -O0 -w -o dirtyclone dirtyclone.c

# Corrupt /usr/bin/su's page cache with setuid(0)+execve("/bin/sh") shellcode,
# then invoke su to prove root non-interactively.
run: timeout 25 ./dirtyclone -v </dev/null >/dev/null 2>&1 || true; echo id | /usr/bin/su
expect: "uid=0"

notes: |
  Exact routing/selector tuning for the TEE clone to re-enter the ESP-in-UDP
  receive path is the live iteration target on the vulnerable kernel; the
  manifest mirrors the JFrog recipe (TEE on udp/4500 -> gateway on lo). If the
  mainline PPA has no v7.1-rc4 build, pin the nearest built tag inside the
  f4c50a4034e6..48f6a5356a33 window; the primitive itself also reproduces on
  the DirtyFrag 6.8 family for fast detection-signal validation.
