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/test_bfdb_output_gates.py
Python · 7,477 bytes"""Offline checks for the old-build bfdb output-gate profile and reducer."""
from __future__ import annotations
import json
import sys
import tempfile
import unittest
from dataclasses import replace
from pathlib import Path
from unittest.mock import patch
sys.path.insert(0, str(Path(__file__).resolve().parent))
import build_bfdb_output_gates as profile # noqa: E402
from review_bfdb_output_gates import review_text # noqa: E402
def sample_log(*, status: int = 0, context_free: bool = True) -> str:
lines = [f"PAINT_BFDB_OUT_PROFILE={profile.SCHEMA}"]
events = [
("paint_open", {}),
("validation_init", {"handle": 0xABC0}),
("validation_status", {"code": status}),
]
if status == 0:
events.extend([
("raw_store", {"begin": 0x1000, "size": 0x100, "code": 0}),
("tree_before", {"begin": 0x3000, "end": 0x3100,
"count": 0}),
("tree_after", {"count": 1}),
])
if context_free:
events.append(("context_free", {"handle": 0xABC0}))
for event, values in events:
lines.extend([f"PAINT_BFDB_OUT_EVENT={event}",
f"PAINT_BFDB_OUT_PID={event}:400",
f"PAINT_BFDB_OUT_TID={event}:123"])
for key, value in values.items():
lines.append(f"PAINT_BFDB_OUT_VALUE={event}.{key}:{value:016x}")
lines.append(f"PAINT_BFDB_OUT_ARMED={len(profile.GATES)}")
return "\n".join(lines)
class BfdbOutputGateProfileTests(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
package = profile.ROOT / "packages" / profile.VERSION["old"] / "x64/PaintApp"
fixtures = profile.ROOT / "lab/output/provenance-bfdb"
if not all((package / name).is_file()
for name in profile.MODULE_HASHES):
raise unittest.SkipTest("Signed old package unavailable")
if not all((fixtures / name).is_file()
for name in profile.FIXTURES):
raise unittest.SkipTest("Frozen local bfdb pair unavailable")
def setUp(self) -> None:
temp = tempfile.TemporaryDirectory()
self.addCleanup(temp.cleanup)
self.output = Path(temp.name) / "old.auto.cdb.txt"
def test_build_pins_modules_fixtures_and_gate_instructions(self) -> None:
manifest = profile.build(self.output)
sidecar = json.loads(
self.output.with_suffix(".txt.json").read_text(encoding="utf-8")
)
script = self.output.read_text(encoding="ascii")
self.assertEqual(manifest, sidecar)
self.assertEqual(manifest["status"], "pending_guest_measurement")
self.assertEqual(len(manifest["gates"]), 12)
self.assertIn("bu /1 ProvenanceHelper+0x29D2", script)
self.assertIn("bu /1 ProvenanceHelper+0x4A31", script)
self.assertIn("bu /1 ProvenanceHelper+0x4A51", script)
self.assertIn("PAINT_BFDB_OUT_VALUE=tree_before.begin", script)
self.assertIn("PAINT_BFDB_OUT_VALUE=context_free.handle", script)
self.assertNotIn("db @", script)
self.assertNotIn("capture", json.dumps(manifest))
def test_changed_hash_fails_closed(self) -> None:
hashes = dict(profile.MODULE_HASHES)
hashes["provenancesdk.dll"] = "0" * 64
with patch.object(profile, "MODULE_HASHES", hashes):
with self.assertRaisesRegex(ValueError, "module digest differs"):
profile.build(self.output)
def test_changed_opcode_fails_closed(self) -> None:
gates = list(profile.GATES)
gates[0] = replace(gates[0], opcode="000000000000")
with patch.object(profile, "GATES", tuple(gates)):
with self.assertRaisesRegex(ValueError, "Signed opcode differs"):
profile.build(self.output)
class BfdbOutputGateReviewTests(unittest.TestCase):
def test_complete_handoff_is_not_called_a_leak(self) -> None:
result = review_text(sample_log())
self.assertEqual(result["category"], "raw_tree_context_handoff_observed")
self.assertEqual(result["raw_store_length_category"], "32_to_4095")
self.assertEqual(result["tree_vector_length_category"], "32_to_4095")
self.assertEqual(result["raw_tree_begin_relation"], "different")
self.assertEqual(result["validation_context_identity"], "same")
self.assertEqual(result["tree_count_change"], "plus_one")
self.assertEqual(result["core_thread_relation"], "same")
self.assertEqual(result["paint_visible_disclosure"], "not_established")
self.assertNotIn("abc0", json.dumps(result).lower())
def test_nonzero_validation_is_rejected_before_tree(self) -> None:
result = review_text(sample_log(status=14))
self.assertEqual(result["category"], "validation_rejected_before_tree")
self.assertEqual(result["paint_visible_disclosure"], "not_established")
def test_missing_context_free_fails_closed(self) -> None:
result = review_text(sample_log(context_free=False))
self.assertEqual(result["category"], "incomplete_or_changed_success_handoff")
def test_mixed_pid_fails_closed(self) -> None:
log = sample_log().replace("PAINT_BFDB_OUT_PID=tree_after:400",
"PAINT_BFDB_OUT_PID=tree_after:401")
self.assertEqual(review_text(log)["category"], "invalid_or_mixed_trace")
def test_duplicate_event_fails_closed(self) -> None:
log = sample_log() + "\nPAINT_BFDB_OUT_EVENT=tree_before\n"
self.assertEqual(review_text(log)["category"], "invalid_or_mixed_trace")
def test_mixed_core_thread_cannot_establish_handoff(self) -> None:
log = sample_log().replace("PAINT_BFDB_OUT_TID=tree_after:123",
"PAINT_BFDB_OUT_TID=tree_after:456")
result = review_text(log)
self.assertEqual(result["core_thread_relation"], "different_or_incomplete")
self.assertEqual(result["category"], "incomplete_or_changed_success_handoff")
def test_debugger_command_echo_does_not_count_as_event(self) -> None:
log = ('.echo PAINT_BFDB_OUT_PROFILE=paint-bfdb-output-gates-v1\n'
'0:000> bu /1 mspaint+0x1655A '
'".echo PAINT_BFDB_OUT_EVENT=paint_open; '
'PAINT_BFDB_OUT_PID=paint_open:999; '
'PAINT_BFDB_OUT_TID=paint_open:999"\n'
+ sample_log())
self.assertEqual(review_text(log)["category"],
"raw_tree_context_handoff_observed")
def test_glued_runtime_tokens_are_parsed_without_echoes(self) -> None:
log = sample_log()
for marker in ("PID", "TID", "VALUE"):
log = log.replace(f"\nPAINT_BFDB_OUT_{marker}=",
f" PAINT_BFDB_OUT_{marker}=")
first_event = log.index("\nPAINT_BFDB_OUT_EVENT=")
log = (log[:first_event + 1] +
log[first_event + 1:].replace("\nPAINT_BFDB_OUT_EVENT=",
" PAINT_BFDB_OUT_EVENT="))
log = ('0:000> bu /1 mspaint+0x1655A '
'".echo PAINT_BFDB_OUT_EVENT=paint_open; '
'.printf \\"PAINT_BFDB_OUT_PID=paint_open:%u\\""\n' + log)
result = review_text(log)
self.assertEqual(result["category"], "raw_tree_context_handoff_observed")
self.assertEqual(result["raw_store_length_category"], "32_to_4095")
if __name__ == "__main__":
unittest.main()