DF-2715 / verdict.json
{ "finding_id": "DF-2715", "status": "reproduced", "reproduced": 1, "impact": "leak", "confidence": "certain", "verdict": "REPRODUCED unprivileged on the stock guest: recvmsg on an O_NONBLOCK UDP socket with a queued datagram returns msg_flags = 0x00020000 - the kernel-internal MSG_FNONBLOCKING bit is visible in the user msghdr (twice, deterministic). POSIX defines msg_flags as an output field carrying MSG_TRUNC/MSG_CTRUNC/MSG_EOR-class status; two bits of kernel-internal state (which blocking mode the kernel forced) leak into every such recvmsg.", "exploit_chain": "no escalation path: disclosure of one kernel state bit to the receiving process itself", "evidence": "run.log (two consecutive runs): recvmsg on O_NONBLOCK socket with data queued -> msg_flags = 0x00020000 (MSG_FNONBLOCKING leaked)", "kernel_refs": [ "sys/kern/uipc_syscalls.c:996", "sys/kern/uipc_syscalls.c:999", "sys/kern/uipc_syscalls.c:1190", "sys/sys/socket.h:399" ], "poc_changes": "Initial version polled an empty socket: msg_flags is only copied out when recvmsg returns without error; added a self-sent datagram so the non-blocking receive succeeds and the flags word is written back.", "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": 15, "guest_dirty": 0, "build_cmd": "cc -o msgflags_leak msgflags_leak.c", "run_cmd": "as unpriv user: ./msgflags_leak (exit 0 = leaked)", "code_hash": "38df407ec0a308998bd2e58ca7e55b114bc9eee0a4ba2395683e297dddffff60", "notes": "", "recommended_fix": "Strip MSG_FNONBLOCKING|MSG_FBLOCKING from *flags after so_pru_soreceive returns.", "fix_status": "not_testable", "fix_kernel_uname": null, "fix_baseline_reproduced": null, "fix_patched_reproduced": null, "fix_verdict": "fix.diff compile-validated in the batch combined kernel build (all 37 diffs of this batch applied to in-guest /usr/src; make -j6 nativekernel KERNCONF=X86_64_GENERIC, see batch build log referenced in VERDICT.md); no behavior A/B performed for this Info-tier item; behavior A/B intentionally skipped for Info tier", "fix_evidence": "batch combined kernel build log (see findings/poc/_batch41 note in VERDICT.md)" } |