DF-3391 / verdict.json
{ "finding_id": "DF-3391", "status": "reproduced", "reproduced": 1, "impact": "none", "confidence": "certain", "verdict": "Reproduced on the stock INVARIANTS guest (kldload ipfw3; note loading ipfw3 enables default-deny, so the probe runs detached and unloads the module). A NESTED opcode is required: setsockopt(IP_FW_X) with payload opcode IP_FW_X(49) re-enters ip_fw3_ctl_x, whose inner failure (invalid innermost opcode 0xBEEF -> EINVAL, kernel logs ip_fw3_ctl invalid option 48879) is DROPPED at ip_fw3.c:1058-1059 and setsockopt returns 0 - the firewall operator gets success for an operation that failed. Control case: flat invalid opcode through the glue propagates EINVAL correctly. First probe (flat opcode) hit the glue path and refuted nothing - the bug needs the nested dispatch; second probe reproduced. Post-fix A/B on the F40FIX-built ipfw3.ko: nested case returns -1/EINVAL.", "exploit_chain": "", "evidence": "VERDICT.md with path:line citations; run.log where a live demo exists; fix.diff", "kernel_refs": [ "sys/net/ipfw3/ip_fw3.c:1058", "sys/net/ipfw3/ip_fw3.c:1059", "sys/netinet/raw_ip.c:334" ], "poc_changes": "initial probe used a flat invalid opcode (propagates correctly through the glue); fixed to a nested IP_FW_X payload opcode which is the only path that reaches the discarding case", "attempts": 2, "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": 120, "guest_dirty": 0, "build_cmd": "see build.sh", "run_cmd": "see run.sh", "code_hash": "da85f711e7efead88aff13d7725c58bcb5f4ac92f029d104aae878df5067efb5", "notes": "", "recommended_fix": "error = ip_fw3_ctl_x(sopt) in the IP_FW_X case", "fix_status": "fixed", "fix_verdict": "A/B complete with the module rebuilt from the fixed tree: nested IP_FW_X opcode now returns -1/EINVAL (stock returned 0 while the kernel logged the inner EINVAL)." } |