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/compare_bfdb_extent_repeats.py

Python · 5,371 bytes
#!/usr/bin/env python3
"""Compare two private old-bfdb extent traces without exporting memory bytes."""

from __future__ import annotations

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

from export_bfdb_authoring_trial import digest, read_json
from export_bfdb_normal_heap_trial import register_at
from export_bfdb_normal_record_trial import private_db_sample


TRIGGER_SHA = "82e1ad0b1be3183b0a6075ce53a44a888f149765f24cd2a681b0656b348a8f9a"
PREFIX = b"image/jpeg\x01"


def checked_trace(review_path: Path, result_path: Path) -> tuple[dict[str, Any], int, bytes]:
    review = read_json(review_path)
    result = read_json(result_path)
    hashes = review.get("artifact_sha256", {})
    gates = review.get("gates")
    if (review.get("schema") != "paint-bfdb-normal-extent-public-review-v1"
            or review.get("build") != "old"
            or review.get("case_id") != "trigger"
            or review.get("trace_mode") != "NormalExtent"
            or review.get("fixture_source") != "licensed"
            or review.get("outcome") != "source_block_relation_observed"
            or review.get("strlen_terminator_vs_reported_user_request")
            != "strlen_terminator_beyond_reported_user_request"
            or review.get("strlen_terminator_vs_reported_heap_block")
            != "strlen_terminator_within_reported_heap_block"
            or review.get("sampled_original_to_intermediate_to_record_suffix")
            != "original_to_intermediate_to_record_suffix_equal"
            or not isinstance(gates, dict) or not gates or not all(gates.values())
            or result.get("fixture_sha256") != TRIGGER_SHA
            or result.get("source") != "licensed"
            or digest(result_path) != hashes.get("result")):
        raise ValueError("Extent review or bound private result differs")
    log_path = result_path.with_name("cdb.log")
    if not log_path.is_file() or digest(log_path) != hashes.get("debugger_log"):
        raise ValueError("Private debugger log does not match public review")
    log = log_path.read_text(encoding="utf-8", errors="replace")
    length = register_at(log, "bfdb_strlen_return", "rax")
    ctor_length = register_at(log, "bfdb_string_ctor", "r8")
    ctor_source = register_at(log, "bfdb_string_ctor", "rdx")
    sampled_address, sample = private_db_sample(log, "bfdb_string_ctor")
    if (length is None or length <= len(PREFIX) or length > len(sample)
            or ctor_length != length or ctor_source != sampled_address
            or sample[:len(PREFIX)] != PREFIX):
        raise ValueError("Original-source sample is unbound or incomplete")
    return review, length, sample


def classify_pair(left: tuple[dict[str, Any], int, bytes],
                  right: tuple[dict[str, Any], int, bytes]) -> dict[str, Any]:
    left_review, left_length, left_sample = left
    right_review, right_length, right_sample = right
    left_hashes = left_review["artifact_sha256"]
    right_hashes = right_review["artifact_sha256"]
    if (left_hashes["profile"] != right_hashes["profile"]
            or left_hashes["profile_manifest"] != right_hashes["profile_manifest"]
            or left_hashes["guest_entry"] != right_hashes["guest_entry"]
            or left_review["fixture_source"] != right_review["fixture_source"]
            or left_review["version"] != right_review["version"]
            or left_hashes["result"] == right_hashes["result"]):
        raise ValueError("Repeats must have distinct results under one profile and fixture")
    common_end = min(left_length, right_length)
    return {
        "schema": "paint-bfdb-normal-extent-repeat-review-v1",
        "build": "old",
        "version": left_review["version"],
        "case_id": "trigger",
        "profile_sha256": left_hashes["profile"],
        "fixture_sha256": TRIGGER_SHA,
        "private_result_sha256": [left_hashes["result"], right_hashes["result"]],
        "strlen_length_relation": "equal" if left_length == right_length else "different",
        "sampled_common_suffix_relation": (
            "equal" if left_sample[len(PREFIX):common_end]
            == right_sample[len(PREFIX):common_end] else "different"
        ),
        "sample_complete_through_each_strlen_length": True,
        "limits": [
            "Only two fresh old-build runs were compared.",
            "The comparison does not identify earlier contents of the rounded heap slot.",
            "No attacker-controlled marker or Paint-visible output is established.",
            "Memory bytes, addresses and exact lengths remain private.",
        ],
    }


def main() -> None:
    parser = argparse.ArgumentParser(description=__doc__)
    for name in ("left", "right"):
        parser.add_argument(f"--{name}-review", required=True, type=Path)
        parser.add_argument(f"--{name}-result", required=True, type=Path)
    parser.add_argument("--output", required=True, type=Path)
    args = parser.parse_args()
    result = classify_pair(
        checked_trace(args.left_review, args.left_result),
        checked_trace(args.right_review, args.right_result),
    )
    args.output.parent.mkdir(parents=True, exist_ok=True)
    args.output.write_text(json.dumps(result, indent=2) + "\n", encoding="utf-8")
    print("Compared two bounded old-bfdb traces; no memory bytes exported")


if __name__ == "__main__":
    main()