Exploit database

GH-300ffa121d06cb7357be8fb011e8d8b3

nanoturtle1145/cve-2026-98260-uaf

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-98260

63 sources

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

Repository files45
nanoturtle1145/cve-2026-98260-uafRevision cb03af3ff043

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

tools/analyze_page_identity.py

Python · 3,251 bytes
#!/usr/bin/env python3
"""P1:判定 AIO(pagecache_get_page) 是否拿到 victim k_itimer 所在的 slab 页。

用法: analyze_page_identity.py <trace> [--page-offset 0xffffff7f80000000] [--vmemmap 0xfffffffe00000000]

推导:
  victim 对象 V(pctd timer=)→ phys = V - page_offset → pfn = phys>>12
  struct page* = vmemmap + pfn*64(BTF 实测 sizeof(struct page)=64)
  判据:pcg 的 ret 精确等于 victim_page* → 抢到
"""
import re, sys, argparse
from collections import Counter

def main():
    ap = argparse.ArgumentParser()
    ap.add_argument('trace')
    ap.add_argument('--page-offset', default='0xffffff7f80000000')
    ap.add_argument('--vmemmap', default='0xfffffffe00000000')
    ap.add_argument('--page-size', type=int, default=0x40)
    a = ap.parse_args()
    PO = int(a.page_offset, 16); VME = int(a.vmemmap, 16); SZ = a.page_size
    RAM_LIMIT = 0x300000000  # 12GiB,用于判断 vmemmap 估计是否合理

    pctd = []   # (ts, timer)
    pcg  = []   # (ts, ret)
    fp   = []   # (ts, page, order)
    pat_ts = re.compile(r'\s(\d+\.\d+):\s')
    for line in open(a.trace, errors='ignore'):
        m = pat_ts.search(line)
        ts = float(m.group(1)) if m else 0.0
        if 'pctd:' in line:
            r = re.search(r'timer=(0x[0-9a-f]+)', line)
            if r: pctd.append((ts, int(r.group(1), 16)))
        elif 'pcg:' in line:
            r = re.search(r'ret=(0x[0-9a-f]+)', line)
            if r: pcg.append((ts, int(r.group(1), 16)))
        elif 'fp:' in line:
            r = re.search(r'page=(0x[0-9a-f]+) order=(\S+)', line)
            if r: fp.append((ts, int(r.group(1), 16), r.group(2)))

    print(f"  pctd={len(pctd)}  pcg={len(pcg)}  fp={len(fp)}")
    if fp:
        bad = [p for _, p, _ in fp if (p - VME) % SZ == 0 and
               (((p - VME)//SZ) << 12) < RAM_LIMIT]
        print(f"  fp page* 合理性: {len(bad)}/{len(fp)} 在 12GiB 内(验证 vmemmap=0x{VME:x} 是否成立)")
        for _, p, o in fp[:3]:
            pfn = (p - VME)//SZ if (p - VME) % SZ == 0 else None
            phys = (pfn << 12) if pfn is not None else None
            print(f"    fp page=0x{p:x} order={o} pfn={pfn} phys={hex(phys) if phys is not None else '?'}")

    if not pctd:
        print("  ! 没有 pctd 事件(victim timer 没触发,或探针缺失)"); return 2
    for ts, V in pctd[:3]:
        pfn = (V - PO) >> 12
        page = VME + pfn * SZ
        print(f"  victim obj=0x{V:x} pfn=0x{pfn:x} → victim_page*=0x{page:x} (ts={ts})")

    # 用最后一个 pctd 作为 victim
    V = pctd[-1][1]
    pfn = (V - PO) >> 12
    page = VME + pfn * SZ
    hit = [(ts, r) for ts, r in pcg if r == page]
    near = [(ts, r) for ts, r in pcg if abs(r - page) <= SZ]
    print(f"\n  === 判定(victim obj=0x{V:x} → victim_page*=0x{page:x})===")
    print(f"  pcg 精确命中 victim_page: {len(hit)} 次")
    if near: print(f"  pcg ±1 struct page 命中: {len(near)} 次(<= 仅为近似)")
    if hit:
        t0 = hit[0][0]
        print(f"  命中时刻 ts={t0:.6f}(首次)")
        print("  结论: AIO 抢到了 victim 页 ✔")
    else:
        print("  结论: 本 trace 中 AIO 未拿到 victim 页 ✘")
    return 0 if hit else 1

sys.exit(main())