Skip to content
KitploitKITPLOIT
ツールエクスプロイトブログ
Log in
提出
ツールエクスプロイトブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

フィードお問い合わせプライバシー© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2025-21479 — Temporary root exploit for vivo X Fold+ (CVE-2025-21479): GPU physical memory read/write, __do_sys_capset shellcode patch, seccomp/SELinux bypass and KernelSU activation. | Kitploit
ツール/GitHubGitHub/catxiaoshi/cve-2025-21479
Android SecurityPrivilege EscalationMemory ForensicsExploitationReverse EngineeringShellcodeMobile SecurityPayload DevelopmentBinary Exploitation
GitHubcatxiaoshi/cve-2025-21479

CVE-2025-21479

Temporary root exploit for vivo X Fold+ (CVE-2025-21479): GPU physical memory read/write, __do_sys_capset shellcode patch, seccomp/SELinux bypass and KernelSU activation.

2026年11月15日未レビュー
共有
リポジトリを見る
要求された言語のコンテンツは利用できません。英語版を表示しています。

Temporary root on vivo X Fold+ based on CVE-2025-21479

In the previous article, I achieved a temporary root shell using the cred method (see my previous post https://www.coolapk.com/feed/73490425?s=NjQ3OWQwNDMxOWJmMzk4ZzZhZjk1ZGNhega1670). However, due to seccomp restrictions, ksu could not be activated. Since I had no suitable approach, activating ksu was put on hold for the time being. Later, @曉曉恒 published a method for the same CPU and same kernel scheme, and that method can clear seccomp.

(Link: https://www.coolapk.com/feed/73486895?s=YjRmZWY2ZmExOWJmMzk4ZzZhYTU1MmJlega1651)

It also references @TNTHe's method.

(Link: https://blog.kinser.top/archives/1787279031701)

However, both of these schemes require patching the global __do_sys_capset

(Community version patch method concept diagram)


patch __do_sys_capset(全局生效)

    ↓

zygote 孵化应用时 specialize → 调用 capset() 降权

    ↓

★ 中招:执行 shellcode → commit_creds(prepare_kernel_cred(0))

    ↓

zygote 被提权成 root + seccomp 被清 + cred 被换成 init_cred 拷贝

(Flowchart of patch causing zygote exceptions)

In other words, this method, as long as it patches the global syscall, has an unavoidable timing race + hardcoded offset risk. zygote will inevitably be caught in the crossfire. And over time it may cause a kernel panic, but compared with the cred method, it can clear seccomp; for this reason, I added a safer recovery mechanism based on the patch method.


1. The Cred Method

1.1 What the Cred Method Can Do

GPU physical write task_struct->cred, modifying fields such as uid/gid/suid to escalate privileges. This path has always been successful.

1.2 The Fatal Flaw: Cache Consistency When Clearing seccomp

To clear seccomp, you must write the mode/filter fields of task_struct (0x848/0x850).

| Data | Access Frequency | Description |

| --- | --- | --- |

| cred | cold data | read only during permission checks |

| task_struct | extremely hot | accessed on every system call/scheduling/signal |

current->flags is being read and written by the CPU on every system call, and this page has a dirty line resident in L1/L2. The GPU is a non-coherent bus master; after it writes into DRAM, the CPU's next normal write-back swallows the entire line (64 bytes).

mode@0x848 and filter@0x850 happen to be in the same cache line, so they are overwritten together — all 8 retries result in 0x100000002.

1.3 A Worse Side Effect: SIGSYS

GPU writes occasionally take partial effect (the filter lands, but the mode does not), creating a self-contradictory state:


mode   = 2 (FILTER)   // 内核仍要走过滤器

filter = 坏值/NULL    // 指针已被破坏

The next system call enters __seccomp_filter() and executes the broken BPF → returns KILL → "Bad system call"


II. Principles of the Improved Patch Method

Friendly reminder: some new content, such as save, exists in my iterative version and may differ from the community version

2.1 Execution Flow

| Step | Action | Description |

| --- | --- | --- |

| 1 | GPU initialization | Gain physical address read/write capability |

| 2 | Disable SELinux | Physical write to selinux_state |

| 3 | kallsyms resolution | Read the 43MB kernel image and resolve symbols |

| 4 | Locate __do_sys_capset | VA → PA |

| 5 | Save the original code | Authoritative GPU read |

| 6 | Write gated shellcode | CPU window write + cache flush |

| 7 | Current process capset(NULL,NULL) | Trigger |

| 8 | Shellcode executes in kernel mode | prepare_kernel_cred(0) → commit_creds() |

| 9 | Restore the original code | CPU write + authoritative GPU verification |

| 10 | Tear down the fast_rw window | GPU write + verification |

| 11 | exec shell | — |

2.2 Why choose __do_sys_capset?

  1. Because this is the system call entry point, it can be precisely triggered from user space, and it is necessarily executed on every call

  2. The physical address is predictable: 0xa8000000 + 0x16c7bc = 0xa816c7bc (the kernel physical base address is fixed; KASLR only changes the virtual base address, and most in the community use this, with plenty of examples)

2.3 Address-fetching shortcut


uint64_t v = kernel_pread_u64(cheese, 0xa816c7bc);

if ((uint32_t)v == 0xd503233f)   /* paciasp = __do_sys_capset 首指令 */

    /* 不需要 kallsyms 就能定位! */

Only when prepare_kernel_cred / commit_creds are called from within the shellcode is the KASLR virtual base address required.


III. Gating Mechanism (Resolving zygote Corruption)

3.1 The Fatal Flaw of the Community Edition


zygote 在 specializeAppProcess 里

【每孵化一个 APP 都调 capset(&hdr,&data) 降权】

     ↓ 社区 shellcode 无条件执行

prepare_kernel_cred(0) → commit_creds()

     ↓ 每次命中

zygote 的 cred 被换掉 + cred_jar 泄漏一个 → 越用越崩 → 无法新开应用

"Anomalies increasing over time" is precisely the cumulative effect of the continuous cred_jar leak and the corrupted reference counting.

3.2 Improvements in This Version

To address this, this version adds a gating mechanism (solving the zygote breakage): only capset(NULL,NULL) triggers privilege escalation; when zygote passes a non-NULL pointer, it takes the skip path. The community edition escalates unconditionally, causing zygote to be mistakenly escalated every time it spawns an APP plus leak one cred → the more it is used, the more it crashes.

| Comparison Item | Community Edition | This Version |

| --- | --- | --- |

| zygote calls capset(&hdr,&data) | Unconditional escalation | Takes skip, returns 0 |

| cred allocation | Leaks one per spawn | No allocation, zero leak |

| App uid/gid | Affected | Unaffected (set by setuid/setgid) |

When overwriting contiguously in place, non-target paths must replay all N overwritten instructions before jumping back, while the shellcode itself has only N slots, which cannot hold "replay N instructions + gating + payload" — mathematically impossible, so an in-kernel trampoline is required.

Therefore the skip path returns 0. This is consistent with the community edition's behavior toward zygote (both are "capset returns 0"), but removes the privilege escalation and cred allocation; the APP's uid/gid is set via setuid / setgid (not capset), so app permissions are unaffected.


IV. Recovery Module (Core Innovation)

This is the most tortuous part of the entire process, only closed after many failures. Because validation was added and the process fixed, the privilege escalation time was also extended to 3~4 minutes.

4.0 Failure Overview

| No. | Failure | Symptom | Root Cause | Fix |

| --- | --- | --- | --- | --- |

| 1 | False success | Validation all green, DRAM untouched | CPU reads its own dirty cache line | Switched to authoritative GPU read |

| 2 | Wrong cache level | GPU cannot read new value | dc cvau only reaches PoU | Changed to dc cvac (reaches PoC) |

| 3 | No external validation | Cannot prove it has been written to disk | Missing GPU perspective | Added patch_verify_bytes_gpu() |

| 4 | fork breaks everything | restore inevitably fails | COW + GPU channel death | Privilege escalation no longer forks |

4.1 Failure One: False Success (CPU Reading Deceives Itself)


patch_verify_bytes() → fast_pread_u64()   // CPU 通过窗口读

As soon as the write finishes, it is read back with the CPU, and what is read is the cache line that was just dirtied by the write itself, which always equals the expected value. The logs stay green the whole way, and DRAM is never touched.

Hard evidence: on the second run, save reads back the shellcode rather than the original code.

4.2 Failure two: cache flushed at the wrong level


"dc cvau, %0"    // clean by VA to PoU(本核 L2/统一点)

GPU is an external bus master and accesses the PoC (DRAM). cvau cannot clean to DRAM.

Fix: dc cvau → dc cvac (clean to PoC).

4.3 Failure three: missing GPU authoritative verification

ツールをダウンロード

関連ツール

  • Mobile-Security-Framework-MobSF

    Android、iOS、Windows向けの自動モバイルアプリケーションセキュリティテストフレームワーク。静的・動的解析、マルウェア検出、CI/CD統合によるAPIセキュリティテストを実行します。

  • jadx

    AndroidのDexファイルやAPKファイルを読み取り可能なJavaソースコードに逆コンパイルするためのコマンドラインおよびGUIツール。リソースデコード、難読化解除、Smaliデバッグ機能を備えています。

  • Apktool

    Android apkファイルのリバースエンジニアリングツール

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock ワンタップ実行アプリ(CVE-2026-43499)

    750
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    不正なGSMセルを展開してSMSを傍受し、メッセージを注入し、モバイル端末を追跡するIMSI Catcherプラットフォーム

    739
  • 3

    Callisto

    jetp1ane/callisto

    Ghidraを介して実行可能ファイルを逆コンパイルし、Semgrepで擬似Cコードをスキャンし、GPT-3.5-Turboを使用して検出結果を検証することで誤検知を低減する、自動化されたバイナリ脆弱性解析ツール。

    585
  • 4

    opencti

    opencti-platform/opencti

    オープンサイバー脅威インテリジェンスプラットフォーム

    550
  • 5

    DFRoot

    a2333c/dfroot

    Samsung Galaxy S25 Ultra (SM-S938B) 向けの Android root ツール。DirtyFrag CVE-2026-43284 と CVE-2026-43499 を連鎖させ、KernelSU 経由で起動時に自動的に root を取得します。

    414
  • 6

    ARTEX

    baarai/artex

    プランナー/ワーカーエージェント、資産グラフと探索グラフ、MITMトラフィック記録、脆弱性の再テストを備えたLLMマルチエージェント自律ペネトレーションテストプラットフォーム。

    409

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →