DF-5726 / verdict.json
{ "finding_id": "DF-5726", "status": "reproduced", "reproduced": true, "impact": "none", "confidence": "certain", "verdict": "b addr,count stores the skip count through three unchecked conversions (radix-16 lexer accumulation db_lex.c:203, db_expr_t pass-through db_break.c:271-278, int fields db_break.c:106-107): live-proven that b ticks,4294967296 arms a breakpoint with Count -1802079594 (0x4294967296 truncated to 0x94967296), and since a stop requires --bkpt->count == 0 exactly (db_run.c:100), zero/negative/truncated counts silently never fire while show breaks lists the breakpoint as armed. Root-gated DDB console -> Low; dead-instrument operational class (DF-5721 family), no memory unsafety.", "exploit_chain": "", "evidence": "baseline-up.serial.log / session1-smp.serial.log: b ticks,4294967296 + b bootverbose,2 -> show breaks prints Count -1802079594 for ticks (2 for bootverbose). fix_run.log (patched): breakpoint: skip count out of range error, nothing added; count 2 still accepted.", "kernel_refs": [ "sys/ddb/db_break.c:106", "sys/ddb/db_break.c:274", "sys/ddb/db_break.h:52", "sys/ddb/db_run.c:100", "sys/ddb/db_lex.c:119", "sys/ddb/db_lex.c:203" ], "poc_changes": "No seed PoC; uses the DF-5725 packs serial rig (drive_ddb.py/serial_vm1.sh/enter_ddb.sh).", "attempts": 2, "runtime_sec": 120, "build_cmd": "(fix kernel) cd /usr/src && patch -p1 -N < /tmp/combined.diff && make -j6 nativekernel KERNCONF=X86_64_GENERIC && make installkernel", "run_cmd": "./enter_ddb.sh; DF5725_SOCK=/tmp/opencode/df-5725-ser-up.sock ./drive_ddb.py b ticks,4294967296 2 b bootverbose,2 2 show breaks 3", "notes": "Radix-16 default (db_lex.c:119) makes decimal-looking literals hex; the truncation itself is db_break.c:106-107. Same mangle observed on SMP and UP instances.", "recommended_fix": "Reject out-of-range skip counts in db_breakpoint_cmd(): if (count < 1 || count > INT_MAX) db_error(...) (fix.diff).", "fix_status": "fixed", "fix_baseline_reproduced": true, "fix_patched_reproduced": false, "fix_verdict": "Stock kernel: garbage negative Count displayed, bp armed-never-fires. Patched kernel: db_error breakpoint: skip count out of range, breakpoint not added, in-range counts (2) unaffected. Bad behavior gone.", "fix_evidence": "findings/poc/DF-5726/fix.diff; fix_run.log (breakpoint: skip count out of range + show breaks listing only valid entries); baseline-up.serial.log", "guest_uname": "DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 x86_64 (baseline); patched fix kernel #1: Sat Oct 10 18:42:38 UTC 2026", "guest_dirty": 0, "code_hash": "4af3526ae154b6eda9c58a47a4765ec20f5f92789a42d1c221faabf9f498c9ea", "fix_kernel_uname": "DragonFly 6.5-DEVELOPMENT #1: Sat Oct 10 18:42:38 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC" } |