Exploit database

GH-b7eeca4acf335ee5398b753d19eb63d8

chayewuu/prague-cve-2026-98260-os4.0

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-98260

60 sources

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

Repository files6
chayewuu/prague-cve-2026-98260-os4.0Revision fd3ea3a8370e

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

tools/btf_recheck.py

Python · 1,882 bytes
#!/usr/bin/env python3
"""从 prague 的 Image 用 BTF 复测 98260 需要的全部偏移(阶段 C)。"""
import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).resolve().parent))
from btf_query import Btf, find_btf  # noqa: E402

KIND_STRUCT = 4

IMG = sys.argv[1] if len(sys.argv) > 1 else "Image"
try:
    data = open(IMG, "rb").read()
except OSError as exc:
    sys.exit(f"读不到 {IMG}: {exc}\n用法: python btf_recheck.py <内核 Image 或 vmlinux>")
b = Btf(data, find_btf(data)[0])
b.parse()
print(f"# image={IMG} types={len(b.types)}")


def find(name, kind=KIND_STRUCT):
    return [t for t in range(1, len(b.types)) if b.kind(t) == kind and b.name(t) == name]


def dump(name, kind=KIND_STRUCT):
    hits = find(name, kind)
    if not hits:
        print(f"== {name}: NOT FOUND")
        return None
    tid = hits[0]
    print(f"== {name} id={tid} n={len(hits)} size=0x{b.size(tid):x}")
    for (mname, mtype, bitoff, bitsize) in b.members(tid):
        print(f"   {mname:30s} +0x{bitoff // 8:x}  (bit_off={bitoff})")
    return tid


for n in ("k_itimer", "cpu_timer", "timerqueue_node", "timerqueue_head",
          "rb_node", "rb_root_cached", "posix_cputimers", "posix_cputimer_base",
          "task_struct", "signal_struct", "pid", "cred", "miscdevice",
          "configfs_buffer", "slab", "kmem_cache", "ctl_table", "pipe_buffer",
          "mm_struct", "kclock", "sigqueue", "itimerspec"):
    dump(n)

for n in ("posix_cputimers", "posix_cputimer_base"):
    pass

# 派生偏移
print("\n# 派生")
for n in ("cpu_timer", "kclock", "k_itimer"):
    hits = find(n)
    if hits:
        tid = hits[0]
        print(f"{n} size=0x{b.size(tid):x}")
        for (mname, mtype, bitoff, bitsize) in b.members(tid):
            print(f"   {mname:24s} +0x{bitoff // 8:x} size=0x{b.size(mtype) if b.kind(mtype) in (KIND_STRUCT, 5) else 0:x}")