Exploit database

GH-945bd5267b0d1b94c3f74faf5cda7e5a

blkph0x/cve-2026-83844_poc

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-83844

5 sources

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

Repository files579
blkph0x/cve-2026-83844_pocRevision 193ed44859da
Next files →

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

lab/trace/review_bfdb_wpr_capture.py

Python · 6,699 bytes
#!/usr/bin/env python3
"""Check WPR capture and teardown, without inferring any heap occupant.

The ETL still needs a complete, zero-loss private event parse before any
allocation count or callsite can be reported.  This script deliberately
returns review_required even when every capture gate passes.
"""

from __future__ import annotations

import argparse
import json
import re
from pathlib import Path
from typing import Any

from export_bfdb_allocator_reuse import LAB, read_json, require
from generate_cdb import sha256
from review_bfdb_lfh_checkpoint import review as review_lfh
from export_pinned_bfdb_focus_entry import REVISION, SHA256 as FOCUS_SHA256


SCHEMA = "paint-bfdb-wpr-heap-stage-v1"
RECEIPT_SCHEMA = "paint-bfdb-wpr-heap-guest-v1"
WPR_PROFILE = LAB / "output/bfdb-wpr-heap/old.wpr.cdb.txt"
HEX_SHA = re.compile(r"[0-9a-f]{64}\Z")


def command_ok(value: Any) -> bool:
    return (isinstance(value, dict) and value.get("exit_code") == 0 and
            value.get("timed_out") is False and "error" not in value)


def validate_receipt(stage: dict[str, Any], receipt: dict[str, Any],
                     etl: Path) -> None:
    require(receipt.get("schema") == RECEIPT_SCHEMA and
            receipt.get("build") == "old" and
            receipt.get("case_id") == stage.get("case_id") and
            receipt.get("status") == "capture_complete_unreviewed" and
            receipt.get("focus_batch_status") == "complete" and
            receipt.get("focus_entry_sha256") == FOCUS_SHA256 and
            receipt.get("shutdown_exit_code") == 0,
            "Guest WPR receipt identity or focus completion differs")
    for name in ("heap_config_enable", "heap_start", "heap_stop",
                 "heap_config_disable"):
        step = {"heap_config_enable": "enable", "heap_start": "start",
                "heap_stop": "stop", "heap_config_disable": "disable"}[name]
        value = receipt.get(name)
        sidecar = etl.parent / f"wpr-{step}.exit.json"
        require(command_ok(value) and
                isinstance(value.get("native_exit_receipt_sha256"), str) and
                bool(HEX_SHA.fullmatch(value["native_exit_receipt_sha256"])) and
                sidecar.is_file() and
                sha256(sidecar) == value["native_exit_receipt_sha256"],
                f"Guest WPR {name} or native exit sidecar incomplete")
    require(receipt.get("tracing_flags_after_disable") == 0 and
            type(receipt.get("capture_duration_seconds")) in (int, float) and
            0 < receipt["capture_duration_seconds"] <= 600,
            "Guest heap tracing teardown or duration differs")
    size = receipt.get("etl_size_bytes")
    digest = receipt.get("etl_sha256")
    require(type(size) is int and 4096 <= size <= 2_147_483_648 and
            isinstance(digest, str) and bool(HEX_SHA.fullmatch(digest)) and
            etl.is_file() and etl.stat().st_size == size and sha256(etl) == digest,
            "Private ETL missing, changed, or outside bounded capture size")
    require(isinstance(receipt.get("wpr_sha256"), str) and
            bool(HEX_SHA.fullmatch(receipt["wpr_sha256"])),
            "Guest WPR executable hash missing")


def review(stage_path: Path) -> dict[str, Any]:
    stage = read_json(stage_path)
    require(stage.get("schema") == "paint-bfdb-allocator-reuse-stage-v1" and
            stage.get("wpr_heap_schema") == SCHEMA and
            stage.get("wpr_clock_schema") == "paint-bfdb-wpr-heap-clock-v1" and
            stage.get("case_id") in ("primer_a", "primer_b") and
            stage.get("wpr_focus_entry_revision") == REVISION and
            stage.get("guest_focus_entry_sha256") == FOCUS_SHA256 and
            stage.get("wpr_guest_wrapper_sha256") == sha256(
                LAB / "trace/guest_bfdb_wpr_heap_entry.ps1") and
            stage.get("wpr_native_call_helper_sha256") == sha256(
                LAB / "trace/guest_bfdb_wpr_call.ps1"),
            "WPR stage or pinned guest entry differs")
    profile_meta = read_json(Path(str(WPR_PROFILE) + ".json"))
    require(profile_meta.get("wpr_heap_clock", {}).get("schema") ==
            "paint-bfdb-wpr-heap-clock-v1" and
            sha256(WPR_PROFILE) == stage.get("profile_sha256"),
            "WPR selected clock profile differs")
    # Reuse the complete signed-build, same-PID two-open, 16/16 versus 12/16
    # geometry, ordinary Paint close and host Sandbox teardown gates.
    lfh = review_lfh(stage_path, profile_path=WPR_PROFILE)
    relation = lfh["base_result"]
    require(relation.get("primer_requested_bytes") == 16 and
            relation.get("primer_rounded_block_bytes") == 16 and
            relation.get("target_requested_bytes") == 12 and
            relation.get("target_rounded_block_bytes") == 16 and
            relation.get("same_lfh_size_class") is True and
            relation.get("matching_delete_call_returned_before_target") is True,
            "WPR-instrumented allocator geometry differs")
    trial = LAB / "results" / stage["trial_label"]
    private = trial / "bfdb-wpr-heap"
    receipt_path = private / "receipt.json"
    etl = private / "paint-heap.etl"
    receipt = read_json(receipt_path)
    validate_receipt(stage, receipt, etl)
    return {
        "schema": "paint-bfdb-wpr-heap-capture-gate-v1",
        "case_id": stage["case_id"],
        "build": lfh["build"],
        "status": "review_required",
        "signed_same_pid_route_and_geometry": True,
        "wpr_guest_capture_and_teardown": True,
        "etl_hash_and_size_match_receipt": True,
        "etl_full_parse_and_lost_events": "not_validated",
        "occupant_callsite": "not_determined",
        "allocation_count": "not_measured",
        "artifact_sha256": {
            "stage": sha256(stage_path),
            "wpr_receipt": sha256(receipt_path),
        },
        "limits": [
            "A successful WPR stop and matching ETL hash do not prove complete events.",
            "Do not identify an occupant until the private ETL parser validates zero loss and event order.",
            "Tracing may alter allocator selection; this is a separate instrumented row.",
            "Raw ETL, addresses, PIDs, TIDs, stacks, heap rows and bytes remain private.",
        ],
    }


def main() -> None:
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("--stage", type=Path, required=True)
    parser.add_argument("--output", type=Path, required=True)
    args = parser.parse_args()
    result = review(args.stage)
    args.output.parent.mkdir(parents=True, exist_ok=True)
    args.output.write_text(json.dumps(result, indent=2) + "\n", encoding="utf-8")
    print(result["status"])


if __name__ == "__main__":
    main()