Exploit database

GH-e6e5922ef9ac5cc7d4897803cb452516

zero2005x/rokid-rv101-research

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-43499

166 sources

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

Repository files30

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

research/ghostlock_refs/extracted/honor/cve-2026-43499-honor-main/scripts/analyze/check_pi_blocked_on.py

Python · 2,172 bytes
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import struct
k = open(r"D:\新建文件夹 (4)\root\545\unpacked\kernel.bin", "rb").read()
i = k.find(b"\x9f\xeb\x01\x00")
magic, version, flags, hdr_len, type_off, type_len, str_off, str_len = struct.unpack_from("<HBBIIIII", k, i)
ts = i + hdr_len + type_off
ss = i + hdr_len + str_off
strings = k[ss:ss+str_len]

def sname(o):
    if o == 0: return ""
    e = strings.find(b"\x00", o)
    return strings[o:e].decode(errors="replace")

K_STRUCT=4; K_UNION=5
types = {}
off = ts; end = ts + type_len; tid = 1
while off < end:
    no, info, sz = struct.unpack_from("<III", k, off)
    kind = (info>>24)&0x1f; vlen = info&0xffff
    name = sname(no); off += 12
    members = []
    if kind in (K_STRUCT, K_UNION):
        for _ in range(vlen):
            mn, mt, mo = struct.unpack_from("<III", k, off); off += 12
            members.append((sname(mn), mt, mo // 8))
    elif kind == 1: off += 4
    elif kind == 6: off += vlen*8
    elif kind == 19: off += vlen*12
    elif kind == 3: off += 12
    elif kind == 13: off += vlen*8
    elif kind == 14: off += 4
    elif kind == 15: off += vlen*12
    elif kind == 17: off += 4
    types[tid] = (kind, name, sz, members)
    tid += 1

def find_struct(name):
    for tid, (kind, nm, sz, members) in types.items():
        if kind == K_STRUCT and nm == name and sz > 0:
            return sz, members, tid
    return None, None, None

def resolve_type(t):
    kind, nm, sz, members = types.get(t, (None, "?", 0, []))
    return nm

# 查 task_struct 的 pi_blocked_on 字段类型
sz, members, tid = find_struct("task_struct")
print(f"task_struct size {sz:#x}")
for mn, mt, mo in members:
    if "pi_" in mn or "blocked" in mn:
        print(f"  {mn:30s} @ {mo:#06x}  type_id={mt} -> {resolve_type(mt)}")

# 查 type_id 对应类型(pi_blocked_on 指向的类型)
print("\n=== 关键类型 ===")
for t in ["rt_mutex_base", "rt_mutex", "rt_mutex_waiter", "rb_root_cached", "rb_root"]:
    s2, m2, t2 = find_struct(t)
    if s2:
        print(f"\nstruct {t} (size {s2:#x}):")
        for mn, mt, mo in m2:
            print(f"  {mn:30s} @ {mo:#06x}  type={resolve_type(mt)}")