DF-2887 / verdict.json
{ "finding_id": "DF-2887", "status": "reproduced", "reproduced": 1, "impact": "none", "confidence": "certain", "verdict": "Confirmed with a SCOPE CORRECTION: uiomove (kern_subr.c:117-124), uiomovez (:234-241) and uiomove_fromphys (:562-571) all advance uio_iov/uio_iovcnt on zero-length iovecs with no iovcnt guard - the harness built a uio declaring ONE zero-length iov and uiomove read the SECOND iovec (lying past the declared array), iovcnt going to 0/-1, and copied 8 bytes through it: an unguarded out-of-bounds iov walk on any consumer-left-inconsistent uio. CORRECTION: ureadc (:293-301) DOES guard - it panics on uio_iovcnt==0 before advancing - so the findings inclusion of ureadc is inaccurate; the defect is real in the three uiomove variants. The first fix attempt placed the guard inside the zero-length branch (after the first advance) and the A/B harness correctly showed the walk still succeeded; the shipped fix checks iovcnt at loop top - on the fix kernel the same uio returns EFAULT with no copy.", "exploit_chain": "", "evidence": "harness.log T8: ret=0 dst[0]=A (copied through the out-of-array iov); fix kernel T8: ret=14, no copy", "kernel_refs": [ "sys/kern/kern_subr.c:120", "sys/kern/kern_subr.c:236", "sys/kern/kern_subr.c:566", "sys/kern/kern_subr.c:297" ], "poc_changes": "none", "attempts": 3, "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": 60, "guest_dirty": 0, "build_cmd": "cd /root/h41 && make", "run_cmd": "kldload ./h41.ko; sysctl -w debug.h41.cmd=8", "code_hash": "85d6e241caa2a7fb1fb44b80c7736a4e83c36d29314b0c96ce91769bc9bdf839", "notes": "ureadc already panics on iovcnt==0 (finding overstates by including it); guard never fires for consistent uios", "recommended_fix": "Check uio_iovcnt >= 1 at the loop top of the three uiomove variants", "fix_status": "fixed", "fix_baseline_reproduced": 1, "fix_patched_reproduced": 0, "fix_kernel_uname": "DragonFly dfbsd 6.5-DEVELOPMENT #1: Mon Oct 26 01:57:23 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64 (h41 fix kernel, all 41 hardening fixes applied)", "fix_verdict": "A/B: baseline copies through the undeclared iov; fix kernel EFAULT at loop top. Fix-v1 guard placement bug caught by the A/B harness and corrected." } |