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

Python · 3,429 bytes
#!/usr/bin/env python3
"""Synthetic checks for CDB `/w` false-evidence linting."""

from __future__ import annotations

import sys
import subprocess
import tempfile
import unittest
from pathlib import Path

sys.path.insert(0, str(Path(__file__).resolve().parent))
from lint_cdb_condition_gates import inspect_file, log_issues, profile_issues


class CdbConditionLintTests(unittest.TestCase):
    def test_rejects_masm_poi_only_inside_dx_condition(self) -> None:
        source = '\n'.join((
            'bu620 /w "(poi(@rbx+0x10) == 0x81)" c2pa_c+0x4C9901 ".echo hit"',
            'bp /w "(@$t4 == 1)" c2pa_c+0x4C9906 "dq poi(@rbx) L1; g"',
            'bu c2pa_c+0x4C9901 "dq poi(@rbx) L1; g"',
        ))
        self.assertEqual([(i.kind, i.line) for i in profile_issues(source)],
                         [("masm_poi_in_dx_condition", 1)])

    def test_rejects_both_observed_cdb_diagnostics(self) -> None:
        log = '\n'.join((
            'ordinary debugger output',
            'Error evaluating breakpoint condition "poi(@rbx)": Unable to bind name \'poi\'',
            'PAINT_TRACE_HIT=echild_selected_header_call',
            'Breakpoint condition did not evaluate to a boolean: "(@$t4 == 1) & (...)"',
            'Syntax error in debugger conditional action',
        ))
        self.assertEqual([(i.kind, i.line) for i in log_issues(log)],
                         [("condition_evaluation_failed", 2),
                          ("condition_evaluation_failed", 4),
                          ("condition_evaluation_failed", 5)])

    def test_valid_masm_action_and_clean_log_pass(self) -> None:
        self.assertEqual(profile_issues(
            'bu620 c2pa_c+0x4C9901 ".if (poi(@rbx+0x10) == 0x81) { .echo hit }; g"'),
            [])
        self.assertEqual(log_issues('PAINT_TRACE_HIT=echild_selected_header_call\n'), [])

    def test_file_inspection_is_read_only_and_size_bounded(self) -> None:
        with tempfile.TemporaryDirectory() as temporary:
            path = Path(temporary) / 'private.cdb.txt'
            content = 'bu620 /w "(poi(@rbx) == 1)" c2pa_c+0x4C9901 "g"\n'
            path.write_text(content, encoding='utf-8')
            self.assertEqual(len(inspect_file(path, 'profile')), 1)
            self.assertEqual(path.read_text(encoding='utf-8'), content)
            with self.assertRaises(ValueError):
                inspect_file(path, 'unknown')
            with self.assertRaises(ValueError):
                inspect_file(path.with_name('missing.log'), 'log')

    def test_cli_refuses_without_echoing_private_expression(self) -> None:
        with tempfile.TemporaryDirectory() as temporary:
            path = Path(temporary) / 'private.cdb.txt'
            path.write_text(
                'bu620 /w "(poi(@rbx+0x10) == 0x81)" c2pa_c+0x4C9901 "g"\n',
                encoding='utf-8')
            command = [sys.executable,
                       str(Path(__file__).with_name('lint_cdb_condition_gates.py')),
                       '--profile', str(path)]
            run = subprocess.run(command, capture_output=True, text=True,
                                 check=False)
            self.assertNotEqual(run.returncode, 0)
            self.assertIn('masm_poi_in_dx_condition', run.stdout)
            self.assertNotIn('poi(@rbx', run.stdout + run.stderr)
            self.assertNotIn('c2pa_c+0x', run.stdout + run.stderr)


if __name__ == '__main__':
    unittest.main()