Critical Severity
Published: Oct 25, 2026

[GitHub] matisse-public

Rce
Type
N/A
CVSS Score
78
Views
Anonymous
Author

Description

# matisse-public — Redmi K50 Pro (MT6983) / kernel 5.10.209 Privilege Escalation and KernelSU Loading

> **English TL;DR** — A fully documented, from-scratch writeup + toolkit for obtaining `uid=0` with a
> kernel SID on a **Redmi K50 Pro (matisse, MediaTek MT6983, kernel 5.10.209)** and loading **KernelSU via
> LKM late-load**, without unlocking the bootloader. Full source is published on purpose: a root tool you
> cannot audit is a root tool you should not trust.

---

## Why Full Source Code is Published

This repository does **privilege escalation**. Any closed-source tool claiming to "give you root" should be suspect:
it can equally do other things in secret, and you have no way to verify. Therefore we **proactively publish all source code, log formats, failure cases, and reproduction steps**, including:

- Complete exploit source code (`payload_src/`) — you can read it line by line, compile it yourself, verify hashes
- All scripts and decision logic (`tools/`, `ksu_persist.sh`) — including **failed attempts**
- Real kernel panic excerpts (`evidence/`) — proving the crashes we encountered and their root causes
- Build recipes and artifact hashes (`payload_src/mt87_build/BUILD_INFO.txt`, `SHA256SUMS`) — for you to verify
- Clear **scope boundaries and disclaimers** (see below)

**Does NOT contain**: any device identifiers (serial numbers / MACs), personal data. Sources and licenses for third-party derived code are listed in [`NOTICE.md`](NOTICE.md) and [`payload_src/PROVENANCE.md`](payload_src/PROVENANCE.md).

---

## Verified Results

| Item | Tested Evidence |
|---|---|
| `uid=0` | `su -c id` → `uid=0(root) gid=0(root) groups=0(root)` |
| **kernel SID** | Same line shows `context=u:r:ksu:s0` |
| **KernelSU Loaded** | `/proc/modules` → `kernelsu … - Live` |
| Loader Logs | `/data/local/tmp/ksu_go.log` → `uid=0` / `load_policy rc=0` / `late-load rc=0` / `modules: 1` |
| Device Stable | Same `boot_id` throughout, `uptime` continuously increasing |

Full battle report: [WIN_20261003_1620_uid0_kernelsu.md](WIN_20261003_1620_uid0_kernelsu.md)

> **Verification**: Hashes of published artifacts are in [`SHA256SUMS`](SHA256SUMS); exploit artifact build recipes and expected sha256 are in
> [`payload_src/mt87_build/BUILD_INFO.txt`](payload_src/mt87_build/BUILD_INFO.txt). If you do not trust any binaries, build from source only.

---

## What It Does (High Level)

1. **Round R**: Heap layout on `pselect` `fd_set`, combined with dangling `pi_blocked_on` after `rt_waiter` free,
triggers `rt_mutex_adjust_prio_chain` walk leading to controlled write (`task->real_cred`).
2. **Round E5**: Zero out SELinux enforcing flag (Per-Android `enforcing-8` write), enter Permissive mode.
3. **Round C**: Write `task->cred` (true `uid=0` + kernel SID).
4. **gate branch** (this repository's key patch): At the moment of **truly obtaining `uid=0`**,
execute `system("sh /data/local/tmp/ksu_go.sh &")` — using the official userspace loader

Translated to English from Chinese. Show original · see the source links.
Community Rating
0

Login to rate this exploit

Quick Actions