Exploit databaseDownload repository ZIP
GH-945bd5267b0d1b94c3f74faf5cda7e5a
blkph0x/cve-2026-83844_poc
Sources for CVE-2026-83844
5 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files579
blkph0x/cve-2026-83844_pocRevision 193ed44859da
- ↑..Parent directory
- afl_emf_gdiplus/
- capture/
- generated/
- BFDB_ALLOCATOR_REUSE_PROTOCOL.md
- BFDB_AUTHORING_MEDIA_STATIC.md
- BFDB_AUTHORING_PROTOCOL.md
- BFDB_BOUNDED_MARKER_PLACEMENT_PROTOCOL.md
- BFDB_BYTE_PROVENANCE_PROTOCOL.md
- BFDB_CACHE_PROTOCOL.md
- BFDB_CLOCK_ONLY_CONTROL_PROTOCOL.md
- BFDB_CROSSSLOT_PROTOCOL.md
- BFDB_FAST_FIRST_OPEN_PROTOCOL.md
- BFDB_FOUR_WPR_PROTOCOL.md
- BFDB_GEOMETRY_GUEST_PROTOCOL.md
- BFDB_LFH_CHECKPOINT_PROTOCOL.md
- BFDB_MARKER_ACCEPTANCE.md
- BFDB_MARKER_FIRSTOPEN_SEMANTIC_GATE.md
- BFDB_MARKER_FOUR_FIRSTOPEN_PROTOCOL.md
- BFDB_MARKER_FOUR_PROTOCOL.md
- BFDB_MARKER_ROUTE_CONTROL.md
- BFDB_MARKER_SEMANTIC_GATE.md
- BFDB_NORMAL_EXTENT_PROTOCOL.md
- BFDB_NORMAL_HEAP_PROTOCOL.md
- BFDB_NORMAL_RECORD_PROTOCOL.md
- BFDB_OUTPUT_GATES_PROTOCOL.md
- BFDB_POSTOPEN_PROTOCOL.md
- BFDB_SDK_RESOLUTION_SCAN.md
- BFDB_SINK_GATE_PROTOCOL.md
- BFDB_VALIDATION_LIFETIME_PROTOCOL.md
- BFDB_WPR_HEAP_PROTOCOL.md
- BRUSH_DISPATCH_PROTOCOL.md
- COLD_ATTACH_REPAIR_PLAN.md
- EMF_BFDB_FUZZ_ANALYSIS.md
- EMF_BFDB_FUZZ_BATCH_PROTOCOL.md
- EMF_BFDB_FUZZ_CAMPAIGN.md
- EMF_BFDB_SEQUENCE_PROTOCOL.md
- EMF_BFDB_WARM_PAGEHEAP_PROTOCOL.md
- EMF_CLIPBOARD_VALID_PROTOCOL.md
- EMF_VALID_ACCEPTANCE_PROTOCOL.md
- FILL_LOOP_CENSUS_PROTOCOL.md
- FILL_MOUSE_EVENT_PROTOCOL.md
- FILL_TOUCH_INPUT_PROTOCOL.md
- FILL_WIN32_DISPATCH_PROTOCOL.md
- PROVENANCE_APP11_POSTSEEK_PROTOCOL.md
- PROVENANCE_APP11_READER_SCAN_PROTOCOL.md
- PROVENANCE_APP11_SPLIT_NEW_LABEL_GUARD_PROTOCOL.md
- PROVENANCE_BATCH_E_SUBSET_PROTOCOL.md
- PROVENANCE_COPY_REOPEN_PROTOCOL.md
- PROVENANCE_E_CHILD_DECISION_PROTOCOL.md
- PROVENANCE_FIELD_ID_CONSUMER_PROTOCOL.md
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
lab/trace/export_provenance_sdk_c1_heap.py
Python · 10,243 bytes#!/usr/bin/env python3
"""Export bounded, address-free C1 heap samples from a completed old guest.
The ordinary C1 pair remains separate. This exporter verifies the exact
three-case heap profile and guest lifecycle before converting private CDB
address queries into allocation-relative offsets and sizes.
"""
from __future__ import annotations
import argparse
import json
import re
from pathlib import Path
from typing import Any
from export_provenance_sdk_matrix import (
LAB, MARKER_RE, digest, read_json, require, verify_trial,
)
SELECTED = ("control", "desc_signature_only", "desc_private_only")
ADDR = r"(?:0x)?[0-9a-f`]+"
SEARCH_RE = re.compile(
rf"Search was performed for the following Address:\s*({ADDR})",
re.IGNORECASE,
)
def _hex(value: str) -> int:
return int(value.lower().removeprefix("0x").replace("`", ""), 16)
def _single(pattern: str, area: str, label: str) -> str:
found = re.findall(pattern, area, re.IGNORECASE | re.MULTILINE)
require(len(found) == 1, f"Expected one {label} in heap checkpoint")
return found[0]
def _marker_section(log: str, marker: str) -> str:
hits = list(MARKER_RE.finditer(log))
positions = [index for index, hit in enumerate(hits)
if hit.group(1) == marker]
require(len(positions) == 1, f"Expected one target heap marker: {marker}")
index = positions[0]
return log[hits[index].end():hits[index + 1].start()
if index + 1 < len(hits) else len(log)]
def _register_address(area: str, name: str) -> int:
values = re.findall(rf"(?m)^{re.escape(name)}=([0-9a-f]+)\r?$",
area, re.IGNORECASE)
require(values and len(set(values)) == 1,
f"Missing or inconsistent {name} at heap checkpoint")
return int(values[0], 16)
def _sample_region(prefix: str, query: int) -> None:
usages = re.findall(r"(?m)^Usage:\s+(\S+)\s*$", prefix)
bases = re.findall(rf"(?m)^Base Address:\s+({ADDR})\s*$", prefix,
re.IGNORECASE)
ends = re.findall(rf"(?m)^End Address:\s+({ADDR})\s*$", prefix,
re.IGNORECASE)
require(usages and usages[-1] == "Heap" and bases and ends and
_hex(bases[-1]) <= query < _hex(ends[-1]),
"Address query lacked a containing committed heap region")
def _allocation_chunk(detail: str, query: int, span: int) -> dict[str, Any]:
require(0 < span <= 0x10000, "Heap span is not a bounded parser operation")
if "Allocation status : LFH Allocated" in detail:
base = _hex(_single(rf"^Block Address\s*:\s*({ADDR})\s*$", detail,
"LFH block address"))
size = int(_single(r"^Block Size\s*:\s*(\d+) Bytes", detail,
"LFH block size"))
requested = int(_single(r"^User requested size\s*:\s*(\d+) Bytes",
detail, "LFH requested size"))
offset = query - base
require(0 <= offset and offset + span <= requested <= size <= 0x1000000,
"Requested read/copy does not fit reported LFH user extent")
return {"allocation_kind": "LFH", "offset_from_block": offset,
"requested_bytes": requested, "reported_block_bytes": size,
"span_bytes": span,
"bytes_before_reported_user_end": requested - (offset + span),
"within_reported_user_extent": True}
require("Allocation status : Variable size allocated chunk." in detail,
"Heap query did not report an allocated backend or LFH chunk")
base = _hex(_single(rf"^Chunk header address\s*:\s*({ADDR})\s*$", detail,
"backend chunk header"))
size = int(_single(r"^Chunk size \(bytes\)\s*:\s*(\d+)\s*$", detail,
"backend chunk size"))
unused = int(_single(r"^Chunk unused bytes\s*:\s*(\d+)\s*$", detail,
"backend chunk unused count"))
offset = query - base
require(0 <= offset and offset + span <= size - unused and
0 <= unused < size <= 0x1000000,
"Requested read/copy does not fit reported backend chunk envelope")
return {"allocation_kind": "backend", "offset_from_chunk_header": offset,
"reported_chunk_bytes": size, "unused_bytes": unused,
"span_bytes": span,
"bytes_before_reported_chunk_end": size - unused - (offset + span),
"within_reported_chunk_envelope": True}
def _heap_queries(area: str, spans: tuple[int, ...]) -> tuple[list[int], list[dict[str, Any]]]:
searches = list(SEARCH_RE.finditer(area))
require(len(searches) == len(spans),
"Heap extension query count differs from targeted operation")
queries: list[int] = []
samples: list[dict[str, Any]] = []
for index, (hit, span) in enumerate(zip(searches, spans)):
query = _hex(hit.group(1))
prior = searches[index - 1].end() if index else 0
_sample_region(area[prior:hit.start()], query)
following = searches[index + 1].start() if index + 1 < len(searches) else len(area)
sample = _allocation_chunk(area[hit.end():following], query, span)
queries.append(query)
samples.append(sample)
return queries, samples
def _result_log(label: str, case_id: str) -> str:
root = LAB / "results" / label / "focus" / "old" / case_id
paths = list(root.glob("*/cdb.log"))
require(len(paths) == 1, "Missing or ambiguous private heap debugger log")
return paths[0].read_text(encoding="utf-8", errors="replace")
def export(label: str) -> dict[str, Any]:
stage_path = LAB / "isolation" / "generated" / f"{label}.provenance-sdk-matrix-stage.json"
stage = read_json(stage_path)
require(stage.get("heap_context") is True and
stage.get("internal_rust") is False and
stage.get("description_guard") is False and
stage.get("selected_cases") == [
"40_official_c2pa_jpeg", "sdk_desc_signature_only",
"sdk_desc_private_only"],
"C1 heap stage flags or selected cases differ")
manifest_path = LAB / "corpus" / "provenance_sdk_differential" / "generated" / "manifest.json"
manifest = read_json(manifest_path)
verified = verify_trial("old", label, "C1", SELECTED,
manifest, digest(manifest_path))
require(all(verified["cases"][case]["status_hex"] == "0x00000000"
for case in SELECTED),
"Old C1 heap cases did not retain the expected helper-facing status")
signature_log = _result_log(label, "sdk_desc_signature_only")
signature: dict[str, dict[str, Any]] = {}
pointer: int | None = None
for index, suffix in enumerate(("first", "second")):
area = _marker_section(signature_log,
f"olddesc_signature_load_{suffix}")
base = _register_address(area, "rbx")
if pointer is None:
pointer = base
require(pointer == base, "Signature source pointer changed between loads")
queries, samples = _heap_queries(area, (16,))
require(queries == [base + index * 16],
"Signature heap query did not follow the selected 16-byte load")
signature[suffix] = samples[0]
private_log = _result_log(label, "sdk_desc_private_only")
area = _marker_section(private_log, "olddesc_private_copy")
before_heap = area.split("Usage:", 1)[0]
slots = re.findall(rf"(?m)^[0-9a-f`]+\s{{2,}}([0-9a-f`]+)\s*$",
before_heap, re.IGNORECASE)
require(len(slots) == 2, "Private-copy source/count slots incomplete")
source = _hex(slots[0])
count = _hex(slots[1])
destination = _register_address(area, "r8")
require(0 < count <= 0x10000, "Private-copy byte count is not bounded")
queries, samples = _heap_queries(area, (count, count))
require(queries == [source, destination],
"Private-copy heap queries do not match source/destination operands")
return {
"schema": "paint-provenance-sdk-c1-heap-observations-v1",
"build": "old", "version": verified["version"],
"selected_case_names": list(SELECTED),
"corpus_manifest_sha256": digest(manifest_path),
"profile_sha256": verified["profile_sha256"],
"signed_module_sha256": verified["signed_module_sha256"],
"batch_result_sha256": verified["batch_result_sha256"],
"guest_shutdown_and_teardown_verified": verified["shutdown_verified"],
"signature": {"source_loads": signature,
"private_log_sha256": verified["cases"]["desc_signature_only"]["private_log_sha256"]},
"private_copy": {"copy_bytes": count, "source": samples[0],
"destination": samples[1],
"private_log_sha256": verified["cases"]["desc_private_only"]["private_log_sha256"]},
"evidence_limits": [
"The backend chunk envelope includes allocator metadata and is not an exact user allocation extent.",
"LFH requested size is reported by the debugger heap extension for this sampled destination.",
"Only the selected load/copy checkpoints are sampled; other parser reads are unmeasured.",
"No out-of-bounds read, content disclosure, or CVE patch attribution is established.",
"Raw addresses, memory bytes, process IDs and guest paths remain local only.",
],
}
def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--label", required=True)
parser.add_argument("--output", type=Path, required=True)
args = parser.parse_args()
require(re.fullmatch(r"[a-z0-9][a-z0-9-]{0,39}", args.label) is not None,
"Trial label must be safe")
try:
record = export(args.label)
except (ValueError, FileNotFoundError, KeyError, TypeError) as exc:
parser.exit(2, f"Refused export: {exc}\n")
args.output.parent.mkdir(parents=True, exist_ok=True)
args.output.write_text(json.dumps(record, indent=2) + "\n", encoding="utf-8")
print("Verified old C1 heap control, signature loads, private copy, and guest teardown")
if __name__ == "__main__":
main()