DF-4386 / verdict.json
{ "finding_id": "DF-4386", "status": "untested", "reproduced": 0, "impact": "none", "confidence": "certain", "verdict": "oce_get_fw_version (oce_mbox.c:289) bcopys exactly 32 device bytes into sc->fw_version[32] with no NUL guarantee; oce_sysctl.c:84-89 publishes it as a read-only string sysctl whose handler (kern_sysctl.c:1171) serves strlen(arg1)+1 bytes UNBOUNDED by arg2. A device returning 32 non-NUL bytes makes strlen walk into adjacent struct oce_softc fields (macaddr, OCE_DMA_MEM kernel pointers) and copy them to any unprivileged sysctl reader. Hardware-gated on guest (no oce NIC); sink behavior proven by guarded replica (+55 bytes past buffer). Low: malicious-peripheral class, defense-in-depth; also flags the unbounded-strlen string-sysctl pattern.", "exploit_chain": "", "evidence": "t6_guarded_run.log (strlen walked 87 bytes, +55 OOB), VERDICT.md trace, fix.diff (git apply --check OK, syntax-validated)", "kernel_refs": [ "sys/dev/netif/oce/oce_sysctl.c:84", "sys/dev/netif/oce/oce_mbox.c:289", "sys/kern/kern_sysctl.c:1171" ], "poc_changes": "n/a - pass-2 finding authored fresh; first replica hit gcc constant-folding, rewritten with volatile+guard-page model", "attempts": 2, "guest_uname": "DragonFly dfbsd 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64", "runtime_sec": 30, "guest_dirty": 0, "build_cmd": "./build.sh (guest cc 8.3)", "run_cmd": "./run.sh", "code_hash": "58952834018b46cadc591377b9bbd9b08f8d0662180d3168a45ee22357ca9e6e", "notes": "Status untested = target device absent on guest.", "recommended_fix": "terminate: sc->fw_version[sizeof(sc->fw_version)-1] = 0 after the bcopy (fix.diff)", "fix_status": "not_testable", "fix_baseline_reproduced": 0, "fix_patched_reproduced": 0, "fix_verdict": "not_testable at runtime (no oce NIC); fix.diff git-apply OK, patched oce_mbox.c syntax-validated with guest kernel toolchain (0 errors).", "fix_evidence": "fix.diff; guest cc -fsyntax-only of patched oce_mbox.c: 0 errors.", "fix_kernel_uname": "DragonFly dfbsd 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 x86_64" } |