[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-108490":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":18,"hasPages":18,"topics":20,"createdAt":9,"pushedAt":9,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":14,"starSnapshotCount":14,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},108490,"o3root","zsw125\u002Fo3root","zsw125","Shizuku-driven CVE-2026-98260 root + KernelSU runtime LKM loader for Xiaomi yingtian \u002F lhasa (kernel 6.18.21)",null,"C",96,21,1,0,16,45.63,"MIT License",false,"main",[21,22,23,24,25,26,27,28],"android","cve-2026-98260","kernel","kernelsu","root","security-research","shizuku","xiaomi","2026-11-24 04:01:26","# O3 Root\n\n[![verify](https:\u002F\u002Fgithub.com\u002Fzsw125\u002Fo3root\u002Factions\u002Fworkflows\u002Fverify.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fzsw125\u002Fo3root\u002Factions\u002Fworkflows\u002Fverify.yml)\n[![release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fzsw125\u002Fo3root?display_name=tag)](https:\u002F\u002Fgithub.com\u002Fzsw125\u002Fo3root\u002Freleases)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fzsw125\u002Fo3root?v=20261101)](LICENSE)\n[![platform](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAndroid%2017-kernel%206.18.21-3DDC84)](docs\u002FARCHITECTURE.md)\n[![devices](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdevices-yingtian%20%7C%20lhasa-3DDC84)](docs\u002FARCHITECTURE.md)\n\n> Chinese translation: [`README.zh-CN.md`](README.zh-CN.md) — a translation of this file; if the two disagree, this English file is authoritative.\n\nLocal privilege escalation + KernelSU for the Xiaomi **yingtian** (Pad 9 Pro\nMax) and **lhasa** (Xiaomi 18 Fold) family on HyperOS 4 (Android 17, kernel\n`6.18.21`). The whole chain is delivered as a normal Android app that drives\n[Shizuku](https:\u002F\u002Fgithub.com\u002FRikkaApps\u002FShizuku) in shell mode, exploits\n**CVE-2026-98260**, and loads the KernelSU-family LKM that matches the installed manager\n(KernelSU \u002F KernelSU-Next \u002F SukiSU) — no PC, no unlocked bootloader, no\npartition changes.\n\n> Research \u002F education \u002F device-repair project. Boot-only (a reboot removes\n> it). Only run on devices you own. Read [`docs\u002FSECURITY.md`](docs\u002FSECURITY.md)\n> before using it.\n\n**Agents \u002F automated contributors:** start with [`AGENTS.md`](AGENTS.md) (entry\npoint: invariants, build\u002Ftest recipes, traps, hygiene), then\n[`docs\u002FAGENT_HANDOFF.md`](docs\u002FAGENT_HANDOFF.md) (verified state, failed\nexperiments, open work). Run `bash scripts\u002Fverify.sh` before committing; it also\nrebuilds the payload\u002FAPK when the toolchain environment is set.\n\n中文版： [`AGENTS.zh-CN.md`](AGENTS.zh-CN.md) \u002F\n[`docs\u002FAGENT_HANDOFF.zh-CN.md`](docs\u002FAGENT_HANDOFF.zh-CN.md)\n\n## Status\n\n| | |\n|---|---|\n| release | **v3.3** (`release\u002Fo3root2-v3.3.apk`, 14,243,344 B, sha256 `c98a9ced…`) |\n| O1 test build | **v3.3.4-o1-test** (`release\u002Ftest\u002Fo3root2-v3.3.4-o1-test.apk`, 14,247,440 B, sha256 `1a298929…`): v3.3 plus the hidden root console (stable v3.3 already includes the **experimental O1 (XRING) profile** for `dijun` \u002F `jinghu` \u002F `violin`). Accepts any OS4.0.0.x build on the `6.18.21-android17…-4k` kernel series: the analysed build is the verified path, other builds run in relaxed mode with a warning; for testers only, never hardware-validated |\n| previous test build | **v3.2.1-console** (`release\u002Fbeta\u002Fo3root2-v3.2.1-console.apk`, 14,243,344 B, sha256 `9cba365a…`): stable v3.2 plus a hidden root console (long-press the version row; three confirmations) |\n| O1 devices | Xiaomi O1 SoC `dijun` \u002F `jinghu` \u002F `violin` on OS4.0.0.x: all three ship the **same** 6.18.21 kernel (`sha256 0d9917ca…`, `g1d099fcb35e0`); static analysis says the chain applies, no device test yet |\n| custom LKM | optional user-supplied KernelSU-family .ko (basic compatibility check; falls back to the built-in adaptive module; the choice is saved and restored on launch — long-press the row to clear) |\n| chain | Shizuku shell → CVE-2026-98260 → `uid=0` + full caps → matching KernelSU LKM (KernelSU \u002F KernelSU-Next \u002F SukiSU) → rootd |\n| persistence | none (current boot only) |\n| tested device | Xiaomi Pad 9 Pro Max `yingtian`, HyperOS `OS4.0.16.0.XBMCNXM` |\n| second device | `lhasa` (Xiaomi 18 Fold, `OS4.0.26.0.XPNCNXM`): the boot kernel is **bit-identical** to yingtian's (`sha256 cde87cd7…`), so the same payload applies; not device-tested |\n\n## How it works (short version)\n\n1. The app spawns `\u002Fsystem\u002Fbin\u002Fsh -c …` through Shizuku's `newProcess`, so the\n   payload runs in `u:r:shell:s0` (`uid=2000`).\n2. The payload triggers the `CLOCK_THREAD_CPUTIME_ID` + `execve`\u002F`de_thread`\n   race (CVE-2026-98260), reclaims the freed `posix_timers_cache` order-1 slab\n   page with a sprayed `kmalloc-8k` buffer containing a forged RB-tree node, and\n   uses the second `timerqueue_del → rb_erase` to write one 8-byte value to an\n   arbitrary kernel address.\n3. Stage 0 clears `enforcing` with an 8-byte unaligned write at\n   `selinux_state-7` (this also clears the adjacent `notif_lock` pending\u002Ftail\n   bytes; `initialized`\u002F`policycap` stay intact); stage 1 writes\n   `task_struct.cred` to a fake cred page (uid 0, full caps).\n4. The payload loads the embedded KernelSU LKM: undefined symbols are resolved\n   at runtime through `\u002Fproc\u002Fkallsyms` (fallback: 248-symbol union relink + the\n   current KASLR slide), with **no init patch** — because `policycap` stayed\n   clean, KernelSU's own `setenforce(1)` is harmless and the device ends in\n   Enforcing. Then it is `insmod`ed and a `rootd` daemon is left behind\n   (abstract socket `@o3p_rootd`, peer-uid 0\u002F2000). Upstream KernelSU,\n   KernelSU-Next and SukiSU LKMs all work (legacy: `O3P_CODEPATCH=1` patches the\n   `setenforce` immediate). Since v3.1 the app can instead load a `.ko` you pick\n   (basic ELF\u002F.modinfo compatibility check, automatic fallback to the built-in\n   LKM when it is rejected or fails to load). Since v3.1.1 that selection is\n   persisted (`files\u002Fcustom-ko.ko` + `custom-ko.meta`) and restored on launch;\n   a stale file that no longer validates is dropped, and a long press on the\n   module row clears it. Since v3.2 the log box is selectable and has a\n   **复制** action that copies the whole log; it only auto-scrolls while you\n   are already near the bottom. On a recognised O1 device the test build\n   asks for a two-step risk confirmation before the payload starts. The test\n   build additionally hides a root console behind a long press of the\n   version row: three non-skippable confirmations, then commands run as root\n   through the `rootd` socket (requires one payload run in the current boot).\n   The stable build does not contain the console classes.\n\nSee [`docs\u002FARCHITECTURE.md`](docs\u002FARCHITECTURE.md) for offsets, the write\nprimitive, the KernelSU patch and the porting guide.\n\n## Quick start\n\n1. On the device: enable Developer options → Wireless debugging (or ADB).\n   Install **Shizuku** \u002F ShizukuX and start it in **shell mode**:\n   `shizuku_plus_server` must run as `uid=2000`, `u:r:shell:s0`.\n2. Install `release\u002Fo3root2-v3.3.apk` (MIUI may need \"Install via USB\" allowed).\n3. Open **O3 Root**, grant the Shizuku permission, press\n   **Continue to UID 0**. The log shows `★ UIDNOW uid=0`,\n   `★ KSU_MODULE LIVE`, and the KernelSU manager opens automatically.\n\nTesting on an O1 device (`dijun` \u002F `jinghu` \u002F `violin`)? Install\n[`release\u002Ftest\u002Fo3root2-v3.3.4-o1-test.apk`](release\u002Ftest\u002Fo3root2-v3.3.4-o1-test.apk)\ninstead and follow [docs\u002FTESTING_O1.md](docs\u002FTESTING_O1.md). The gate accepts\nthe three codenames on any `6.18.21-android17…-4k` kernel (OS4.0.0.x); the\nanalysed build `g1d099fcb35e0` gets the verified path, other builds log\n`固件门禁通过（O1 宽松模式：…）` and reuse the O1 address with a warning. The\npayload logs `SELINUX_PROFILE kernel=… base=… src=env|uname`, so the report\nonly needs the exported log.\n\nNo manager installed? The button turns into **Install KernelSU manager** and\ninstalls the bundled APK (accept the system prompts).\n\n## Repository layout\n\n```\nAGENTS.md   entry point for automated contributors (invariants, traps, checks)\napp\u002F        Android app sources (Java), manifest, res, build.sh\npayload\u002F    o3p.c (exploit payload + runtime KernelSU loader), 248-symbol\n            fallback table \u002F relinker, mk_payload.py, build-payload.sh,\n            legacy\u002F (earlier revisions)\ntools\u002F      OTA\u002Fkernel extraction + verification scripts\ndocs\u002F       architecture, security, build, OTA analysis, feasibility report,\n            evidence screenshots\nscripts\u002F    toolchain fetcher, env template, build-all\nrelease\u002F    prebuilt APK + checksums\nthird_party\u002F notices for bundled third-party components\n```\n\n## Build\n\n```bash\nbash scripts\u002Ffetch-toolchain.sh\ncp scripts\u002Fenv.example.sh env.sh && . .\u002Fenv.sh   # edit paths\nbash payload\u002Fbuild-payload.sh                    # -> payload\u002Fbuild\u002Flibo3p.so\nbash app\u002Fbuild.sh                                # -> app\u002Fbuild\u002Fo3root2.apk\n```\n\nFull prerequisites and troubleshooting: [`docs\u002FBUILD.md`](docs\u002FBUILD.md).\n\n## Limitations\n\n- **Boot-only**: reboot removes root and KernelSU. Persistence would require\n  patching `boot`\u002F`init_boot` (blocked by the locked bootloader) and is out of\n  scope.\n- **Probabilistic**: the UAF race needs 1–6 attempts (occasionally more). The\n  app retries; a reboot usually helps.\n- **SELinux posture**: v3 ends in **Enforcing** with a clean `selinux_state`\n  (`policycap` untouched), so MAC stays on. Only the legacy `O3P_SELDIRTY=1`\n  path ends Permissive (MAC off system-wide); see the security notes.\n- **Legacy policycap side effect**: only with `O3P_SELDIRTY=1`. That path\n  still writes the old dirty value, so any `setenforce 1` stalls Wi-Fi TX until\n  `setenforce 0` or reboot. The v3 default avoids it and ships no recovery UI\n  (v1.8–v2.1 had a guard and a recovery button).\n- **KernelSU LKM ABI**: upstream built the module for `6.18.32-4k`; it is\n  relinked for this `6.18.21` kernel and therefore taints the kernel. Do not\n  treat it as a production root solution.\n- **Profile-bound**: offsets\u002Faddresses are compiled for this exact kernel. A\n  different build needs a new profile (see the porting section in\n  `docs\u002FARCHITECTURE.md`). The O1 test build is the one guarded exception: it\n  accepts any OS4.0.0.x build in the `6.18.21-android17…-4k` series, reuses the\n  analysed O1 `selinux_state` address, and warns that other statics were not\n  compared.\n\n## Evidence\n\n`docs\u002Fevidence\u002F` contains device screenshots: the v3 app success log\n(`v3_app_log.png`) and KernelSU running in Enforcing (`v3_ksu.png`); the older\nv1.8 guard\u002Frecovery screenshots (`v18risk.png`, `v18rec.png`) are kept as\nhistory. Detailed logs and the write-up live in\n[`docs\u002FAPP_O3_ROOT.md`](docs\u002FAPP_O3_ROOT.md).\n\n## Docs\n\n| file | content |\n|---|---|\n| `docs\u002FAGENT_HANDOFF.md` | handoff for automated contributors: verified state, failed experiments, open work, repro workflow |\n| `docs\u002FAGENT_HANDOFF.zh-CN.md` | 交接说明（中文版） |\n| `docs\u002FARCHITECTURE.md` | exploit chain, write primitive, KernelSU loading (runtime kallsyms, no init patch), constants, porting |\n| `docs\u002FARCHITECTURE.zh-CN.md` | 架构说明（中文版） |\n| `docs\u002FSECURITY.md` | threat model, side effects, recovery\u002Fcleanup |\n| `docs\u002FSECURITY.zh-CN.md` | 安全说明（中文版） |\n| `docs\u002FBUILD.md` | build + install + verification |\n| `docs\u002FBUILD.zh-CN.md` | 构建说明（中文版） |\n| `docs\u002FAPP_O3_ROOT.md` | full development log \u002F validation report |\n| `docs\u002FV3-DESIGN.md` | v3 design analysis; why the single-reap variant was abandoned |\n| `docs\u002FPRIOR-ART.md` | prior art, credits, adoption matrix (sources + commits) |\n| `docs\u002FPRIOR-ART.zh-CN.md` | 先前工作与致谢（中文版） |\n| `docs\u002Fhistory\u002FREADME.md` | index of superseded reports (dates + why they are historical) |\n| `docs\u002Fhistory\u002FOTA_4.0.16_kernel_report.md` | OTA extraction, kernel analysis, KASLR constants |\n| `docs\u002Fhistory\u002FCVE-2026-98260_FEASIBILITY.md` | vulnerability analysis and upstream fix references |\n| `docs\u002Fhistory\u002FCVE-2026-98260_FEASIBILITY.zh-CN.md` | 可行性报告（中文版） |\n| `docs\u002Fhistory\u002FROOT_ACHIEVED_OS4.0.16.md` | first end-to-end run notes |\n| `docs\u002Fhistory\u002FALTERNATIVE_ROOT_DIRECTIONS.md` | directions considered before this chain |\n| `AGENTS.zh-CN.md` | 自动化贡献者入口（中文版） |\n| `README.zh-CN.md` | 本 README 的中文版 |\n| `payload\u002FREADME.md` \u002F `payload\u002FREADME.zh-CN.md` | payload internals (EN \u002F 中文) |\n| `tools\u002FREADME.md` \u002F `tools\u002FREADME.zh-CN.md` | OTA\u002Fkernel tooling (EN \u002F 中文) |\n| `NOTICE.zh-CN.md` | 第三方组件说明（中文版） |\n| `third_party\u002FNOTICE.zh-CN.md` | 第三方组件明细（中文版） |\n\n## Disclaimer\n\nThis project is published for **security research and education** only.\n\n- Use it **only on devices you own** and can afford to lose or reset. Do not use it on shared, corporate, or third-party devices.\n- Running it can **crash, reboot, or soft-brick** the device, cause **data loss**, and **void warranties**. It modifies kernel memory and loads an unsigned kernel module; until the next reboot the device is in a non-standard, tainted state.\n- It may be **illegal or contractually prohibited** in your jurisdiction or under your device\u002Fcarrier terms. You are responsible for compliance.\n- The software is provided **as is, without warranty of any kind**, express or implied, including merchantability, fitness for a particular purpose, and non-infringement. The authors and contributors are **not liable** for any claim, damage, or other liability arising from its use.\n- Not affiliated with, endorsed by, or supported by Xiaomi, KernelSU, Shizuku, or Google. All trademarks belong to their owners.\n- If you do not accept these terms, do not use the software.\n\n## License\n\nMIT — see [`LICENSE`](LICENSE). Bundled third-party components keep their own\nlicenses; see [`NOTICE.md`](NOTICE.md) and\n[`third_party\u002FNOTICE.md`](third_party\u002FNOTICE.md).\n\n---\n\n[![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpowered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https:\u002F\u002Fgithub.com\u002Fdeepseek-ai\u002Fdeepseek-harness)\n","O3 Root 是一个面向小米 Yingtian（Pad 9 Pro Max）和 Lhasa（Xiaomi 18 Fold）设备的本地提权与内核级 root 工具链。它基于 CVE-2026-98260 漏洞，通过 Shizuku 框架在 shell 模式下触发提权，并动态加载适配 KernelSU 家族（含 KernelSU \u002F KernelSU-Next \u002F SukiSU）的可加载内核模块（LKM），全程无需 PC、未解锁引导加载程序或修改系统分区。项目运行于 HyperOS 4（Android 17，内核 6.18.21），属重启即失效的临时 root 方案，专为安全研究、教育及设备修复等可控场景设计。",2,"2026-11-09 04:28:23","CREATED_QUERY"]