Exploit database

GH-da6010618e69c188f9d9c8e9cb803347

viper-boss/iqoo-neo5-temp-root

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-43499

165 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files16
viper-boss/iqoo-neo5-temp-rootRevision 121d760703eb

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

scripts/reverify_kallsyms.py

Python · 6,189 bytes
import struct

IMG = r"Q:\Deepseek\_neo5\firmware\kernel_Image"
KAL = r"Q:\Deepseek\_neo5\firmware\kallsyms_fixed.txt"

d = open(IMG, "rb").read()

# ---------- load symbol table ----------
syms = []   # (offset, type, name)
with open(KAL) as f:
    for line in f:
        o, raw = line.rstrip("\n").split(" ", 1)
        syms.append((int(o, 16), raw[0], raw[1:]))

NAMES_S = 0x1feb9cc
MARKERS = 0x21590cc
OFFS_S  = 0x1f805cc
NUM_SYMS = 109687

print("=" * 64)
print(" INDEPENDENT KALLSYMS RE-VERIFICATION")
print("=" * 64)

# ---------- check 1: counts ----------
print("\n[1] COUNT CONSISTENCY")
print(f"    symbols in dump : {len(syms)}")
print(f"    num_syms (binary): {NUM_SYMS}")
assert len(syms) == NUM_SYMS, "COUNT MISMATCH"
print(f"    -> offsets count == names count == num_syms : PASS")

# ---------- check 2: offsets array monotonic + endpoints ----------
offs = [struct.unpack_from("<i", d, OFFS_S + 4*i)[0] for i in range(NUM_SYMS)]
viol = sum(1 for i in range(NUM_SYMS-1) if offs[i] > offs[i+1])
print(f"\n[2] OFFSETS ARRAY (independent re-read from Image)")
print(f"    start=0x{OFFS_S:x} first={offs[0]:#x} last={offs[-1]:#x}")
print(f"    monotonic violations: {viol}")
assert viol == 0 and offs[0] == 0
# verify dump offsets match a fresh read of the array
mism = sum(1 for i in range(NUM_SYMS) if offs[i] != syms[i][0])
print(f"    dump-vs-binary offset mismatches: {mism}")
assert mism == 0
print("    -> PASS")

# ---------- check 3: markers cross-validation ----------
# rebuild name positions by re-parsing the names stream
toks = []
p = 0x2159ecc
for i in range(256):
    e = d.find(b"\x00", p); toks.append(d[p:e]); p = e + 1
pos = NAMES_S; positions = []; cnt = 0
NAMES_E = 0x215904e
while pos < NAMES_E:
    ln = d[pos]
    if ln == 0: break
    positions.append(pos); pos += 1 + ln; cnt += 1
print(f"\n[3] MARKERS CROSS-VALIDATION")
print(f"    re-parsed names: {cnt} (end={pos:#x})")
ok = 0; tot = 0
for k in range(429):
    idx = 256 * k
    if idx >= len(positions): break
    tot += 1
    mk = struct.unpack_from("<I", d, MARKERS + 8*k)[0]
    if mk == positions[idx] - NAMES_S: ok += 1
print(f"    markers[k] == name[256k] byte-offset : {ok}/{tot}")
assert ok == tot and cnt == NUM_SYMS
print("    -> PASS (name stream aligned end-to-end)")

# ---------- check 4: type vs section ordering ----------
# In arm64 vmlinux: text(T/t) < init < rodata(R/r) < data(D/d) < bss(B/b)
# Verify median offset increases across type classes (pairing sanity).
print(f"\n[4] TYPE vs ADDRESS-RANGE (pairing sanity)")
classes = {'T':[], 't':[], 'R':[], 'r':[], 'D':[], 'd':[], 'B':[], 'b':[]}
for o,t,n in syms:
    if t in classes: classes[t].append(o)
for t in ['T','t','R','r','D','d','B','b']:
    v = classes[t]
    if v:
        v.sort()
        print(f"    type '{t}': n={len(v):6d}  min=0x{v[0]:08x}  median=0x{v[len(v)//2]:08x}  max=0x{v[-1]:08x}")
# text (T/t) median must be well below bss (B/b) median
tmed = sorted(classes['T']+classes['t'])[len(classes['T']+classes['t'])//2]
bmed = sorted(classes['B']+classes['b'])[len(classes['B']+classes['b'])//2]
print(f"    text median 0x{tmed:x} < bss median 0x{bmed:x} : {'PASS' if tmed < bmed else 'FAIL'}")
assert tmed < bmed

# ---------- check 5: source-adjacent symbol clustering ----------
# Functions defined together in one .c file must have adjacent offsets.
# If name<->offset pairing were misaligned, this clustering would break.
print(f"\n[5] SOURCE-ADJACENT CLUSTERING (independent pairing check)")
tab = {}
for o,t,n in syms: tab.setdefault(n,(o,t))
groups = {
    "mm/ashmem.c": ['ashmem_ioctl','compat_ashmem_ioctl','ashmem_mmap','ashmem_open','ashmem_release','ashmem_show_fdinfo'],
    "fs/configfs/file.c": ['configfs_read_file','configfs_write_bin_file'],
    "kernel/cred.c": ['prepare_creds','prepare_exec_creds','copy_creds','abort_creds','cred_alloc_blank','__put_cred'],
}
for f, names in groups.items():
    present = [(tab[n][0], n) for n in names if n in tab]
    if len(present) < 2: 
        print(f"    {f}: insufficient symbols"); continue
    present.sort()
    span = present[-1][0] - present[0][0]
    print(f"    {f}: {len(present)} syms span {span} bytes (0x{present[0][0]:x}..0x{present[-1][0]:x})")
    assert span < 0x8000, f"{f} span too large -> possible misalignment"
print("    -> PASS (all clusters tightly grouped)")

# ---------- check 6: ARM64 code spot-check for text symbols ----------
# _text is at Image file offset 0, so a text symbol at kallsyms offset X has
# its first instruction at kernel_Image[X]. Verify it decodes as a plausible
# ARM64 function prologue (independent proof the offset points at real code).
print(f"\n[6] ARM64 PROLOGUE SPOT-CHECK (text symbols point at real code)")
def first_insn(off):
    return struct.unpack_from("<I", d, off)[0]
def classify(w):
    if w == 0xd503233f: return "paciasp"
    if w == 0xd503237f: return "pacibsp"
    # stp x29,x30,[sp,#imm]! (pre-index) : 0xa98..7bfd-ish ; mask key bits
    if (w & 0xffc003e0) == 0xa98003e0 or (w & 0x7fc00000) == 0x29800000: return "stp(pre-index)"
    if (w & 0xff0003ff) == 0xd10003ff: return "sub sp,sp,#imm"
    if (w & 0xfc000000) == 0x94000000: return "bl"
    if (w & 0xfc000000) == 0x14000000: return "b"
    if (w & 0xffe0001f) == 0xd538d000: return "mrs"
    if (w & 0x7f800000) == 0x29800000: return "stp x29/x30"
    if (w & 0xffc003e0) == 0xa90003e0: return "stp(pre)"
    return None
text_probes = ['start_kernel','schedule','printk','panic','do_exit','wake_up_process',
               'kallsyms_lookup_name','remove_waiter','ashmem_ioctl','generic_file_splice_read']
good = 0
for n in text_probes:
    if n not in tab: 
        print(f"    {n}: MISSING"); continue
    o = tab[n][0]
    w = first_insn(o)
    c = classify(w)
    # also show next 2 words for context
    w1 = first_insn(o+4); w2 = first_insn(o+8)
    tag = c if c else "other-valid-insn"
    if c or (w & 0xfc000000) not in (0,):  # crude validity
        good += 1
    print(f"    {n:26s} @0x{o:08x}: {w:08x} {w1:08x} {w2:08x}  [{tag}]")
print(f"    -> {good}/{len(text_probes)} text symbols start with recognizable code")

print("\n" + "=" * 64)
print(" ALL STRUCTURAL CHECKS PASSED")
print("=" * 64)