DF-3964 / verdict.json
{ "finding_id": "DF-3964", "status": "not_reproduced", "reproduced": 0, "impact": "none", "confidence": "certain", "verdict": "Certain validation gap, Low impact: hptiop_attach stores the device-fed get_config reply verbatim (hptiop.c:1928-1933) and consumes it in bus_dma_tag_create with maxsize = PAGE_SIZE*(max_sg_count-1) (:1951 \u2014 underflows to ~2^64-4096 when max_sg_count==0) and cam_simq_alloc(max_requests-1) (:1993/1999 \u2014 openings = 0xffffffff when max_requests==0, over a 256-srb pool), plus target bounds at :2281/:2374. Outcomes are failed attach / bogus DMA geometry / CAM queue nonsense \u2014 robustness, not direct host memory corruption. Distinct from DF-1313 (ioctl size-check trust). Not reproduced: guest lacks the HBA.", "exploit_chain": "", "evidence": "VERDICT.md, trigger.c (field->consumer map), env.txt, fix.diff (attach-time validation)", "kernel_refs": [ "sys/dev/raid/hptiop/hptiop.c:1928", "sys/dev/raid/hptiop/hptiop.c:1933", "sys/dev/raid/hptiop/hptiop.c:1951", "sys/dev/raid/hptiop/hptiop.c:1952", "sys/dev/raid/hptiop/hptiop.c:1993", "sys/dev/raid/hptiop/hptiop.c:2281", "sys/dev/raid/hptiop/hptiop.c:2374" ], "poc_changes": "Informational trigger only.", "attempts": 1, "guest_uname": "DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 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": 4, "guest_dirty": 0, "build_cmd": "guest: cd /usr/src/sys/dev/raid/hptiop && patch -p1 < fix.diff && make # after make obj", "run_cmd": "dfbsd-qemu/vm.sh run_root pciconf -lv | grep -i 1103", "code_hash": "b3af77e365650a9fc4c010b7e263a2f04b4ff88692c2d567ed13621c3e0c10cc", "notes": "Pass-2 finding, checklist items (a)/(e) fallout. mvfrey get_config validates only header size/type (hptiop.c:970-976), never the values.", "recommended_fix": "Validate the firmware config at attach: reject max_requests==0, floor max_sg_count and max_devices at 1 (fix.diff).", "fix_status": "not_testable", "fix_baseline_reproduced": 0, "fix_patched_reproduced": 0, "fix_verdict": "fix.diff adds the missing validation before the values reach bus_dma_tag_create/cam_simq_alloc; git apply --check clean fix.diff applied to the guest /usr/src copy and the hptiop.ko module rebuilt clean with -Werror (build.log; combined with the other four hptiop fix.diffs of this batch); runtime validation still impossible without the HBA.", "fix_evidence": "fix.diff; fix.diff applied to the guest /usr/src copy and the hptiop.ko module rebuilt clean with -Werror (build.log; combined with the other four hptiop fix.diffs of this batch); runtime validation still impossible without the HBA." } |