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_validation_lifetime_pair.py

Python · 7,354 bytes
#!/usr/bin/env python3
"""Reduce a private old-Paint bfdb lifetime control/trigger pair.

The output contains only categories and artifact hashes. It cannot prove a
Paint-visible leak, code execution, or the location of a security fix.
"""

from __future__ import annotations

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

from build_bfdb_validation_lifetime import SCHEMA
from export_bfdb_authoring_trial import digest, read_json
from review_bfdb_validation_lifetime import review_run


COMPLETE = "matching_media_freed_before_helper_return"


def _teardown(stage_path: Path, label: str) -> bool:
    path = stage_path.resolve().parents[2] / "results" / label / "teardown-result.json"
    if not path.is_file():
        return False
    record = read_json(path)
    return (record.get("state") == "closed" and
            record.get("sandbox_process_count_after") == 0)


def _close_category(result: dict[str, Any]) -> str:
    cleanup = result.get("cleanup")
    if not isinstance(cleanup, dict):
        return "unknown"
    forced = cleanup.get("paint_forced_pids"), cleanup.get("debugger_forced_pids")
    if all(isinstance(item, list) for item in forced):
        return "forced_target_cleanup" if any(forced) else "normal_target_close"
    return "unknown"


def compare(control: dict[str, Any], trigger: dict[str, Any],
            control_stage: dict[str, Any], trigger_stage: dict[str, Any],
            control_result: dict[str, Any], trigger_result: dict[str, Any],
            control_digest: str, control_teardown: bool,
            trigger_teardown: bool) -> dict[str, Any]:
    paired = (
        control_stage.get("case_id") == "control" and
        trigger_stage.get("case_id") == "trigger" and
        control_stage.get("lifetime_probe_schema") == SCHEMA and
        trigger_stage.get("lifetime_probe_schema") == SCHEMA and
        control_stage.get("profile_sha256") == trigger_stage.get("profile_sha256") and
        control_stage.get("profile_manifest_sha256") ==
        trigger_stage.get("profile_manifest_sha256") and
        control_stage.get("guest_entry_sha256") == trigger_stage.get("guest_entry_sha256") and
        trigger_stage.get("control_trial_label") == control_stage.get("trial_label") and
        trigger_stage.get("control_result_sha256") == control_digest and
        control_result.get("profile_sha256") == control_stage.get("profile_sha256") and
        trigger_result.get("profile_sha256") == trigger_stage.get("profile_sha256") and
        control_teardown and trigger_teardown
    )
    complete = (paired and control.get("lifetime_category") == COMPLETE and
                trigger.get("lifetime_category") == COMPLETE and
                control.get("output_gate_category") ==
                "raw_tree_context_handoff_observed" and
                trigger.get("output_gate_category") ==
                "raw_tree_context_handoff_observed")
    return {
        "schema": "paint-bfdb-validation-lifetime-pair-review-v1",
        "pair_category": ("paired_matching_media_released_before_helper_return"
                          if complete else "incomplete_no_pair_lifetime_inference"),
        "pair_binding": "same_signed_profile_control_first" if paired else "unbound_or_incomplete",
        "control_lifetime_category": control.get("lifetime_category"),
        "trigger_lifetime_category": trigger.get("lifetime_category"),
        "control_media_pointer_relation": control.get("media_pointer_relation", "unknown"),
        "trigger_media_pointer_relation": trigger.get("media_pointer_relation", "unknown"),
        "control_close_category": _close_category(control_result),
        "trigger_close_category": _close_category(trigger_result),
        "guest_teardown": "both_closed_zero_sandbox_processes"
        if control_teardown and trigger_teardown else "incomplete",
        "semantic_media_lifetime": ("matching_final_allocation_freed_before_helper_return"
                                    if complete else "not_determined"),
        "raw_jumbf_tree_lifetime": "separate_not_determined",
        "paint_visible_disclosure": "not_established",
        "code_execution": "not_established",
        "cve_patch_location": "not_established",
        "limits": [
            "This pair covers the frozen licensed JPEG control/trigger, old signed x64 Paint, and normal LFH guest profile only.",
            "The inserted and final media allocations may differ after vector relocation; bounded samples bind ten control bytes or twelve trigger bytes, not every excess suffix byte.",
            "A matching final free concerns the semantic AssertionData.media allocation, not the separate cached raw JUMBF tree.",
            "A forced target cleanup after the selected helper return does not establish a normal Paint close.",
            "Missing one-shot markers, unexpected refcounts, heap formats, or guest teardown remain incomplete, never evidence of persistence.",
            "No process addresses, thread IDs, memory bytes, or raw debugger rows are exported.",
        ],
    }


def review_pair(control_stage_path: Path, control_result_path: Path,
                trigger_stage_path: Path, trigger_result_path: Path,
                manifest_path: Path) -> dict[str, Any]:
    control_stage = read_json(control_stage_path)
    trigger_stage = read_json(trigger_stage_path)
    control_result = read_json(control_result_path)
    trigger_result = read_json(trigger_result_path)
    control = review_run(control_stage_path, control_result_path, manifest_path)
    trigger = review_run(trigger_stage_path, trigger_result_path, manifest_path)
    outcome = compare(
        control, trigger, control_stage, trigger_stage,
        control_result, trigger_result, digest(control_result_path),
        _teardown(control_stage_path, control_stage.get("trial_label", "")),
        _teardown(trigger_stage_path, trigger_stage.get("trial_label", "")),
    )
    outcome["artifact_sha256"] = {
        "control_stage": digest(control_stage_path),
        "control_result": digest(control_result_path),
        "control_log": digest(control_result_path.with_name("cdb.log"))
        if control_result_path.with_name("cdb.log").is_file() else None,
        "trigger_stage": digest(trigger_stage_path),
        "trigger_result": digest(trigger_result_path),
        "trigger_log": digest(trigger_result_path.with_name("cdb.log"))
        if trigger_result_path.with_name("cdb.log").is_file() else None,
        "signed_profile_manifest": digest(manifest_path),
    }
    return outcome


def main() -> None:
    parser = argparse.ArgumentParser(description=__doc__)
    for case in ("control", "trigger"):
        parser.add_argument(f"--{case}-stage", required=True, type=Path)
        parser.add_argument(f"--{case}-result", required=True, type=Path)
    parser.add_argument("--manifest", required=True, type=Path)
    parser.add_argument("--output", required=True, type=Path)
    args = parser.parse_args()
    summary = review_pair(args.control_stage, args.control_result,
                          args.trigger_stage, args.trigger_result, args.manifest)
    args.output.parent.mkdir(parents=True, exist_ok=True)
    args.output.write_text(json.dumps(summary, indent=2) + "\n", encoding="utf-8")
    print(summary["pair_category"])


if __name__ == "__main__":
    main()