DF-2970 / verdict.json
{ "finding_id": "DF-2970", "status": "reproduced", "reproduced": 1, "impact": "denial_of_service", "confidence": "certain", "verdict": "Registry defects reproduced live with ng_tty loaded (NETGRAPHDISC=6 live). (1) ldisc_register(6, fake) SILENTLY ACCEPTED the explicit slot although it holds ng_ttys live registration - no occupied-slot check exists (tty_conf.c:105-110); linesw[6].l_open repointed from the live module to the harness. (2) With a pty actively switched to disc 6 (harness l_open counted), ldisc_deregister(6) completed (returns void, no use-count) leaving the open tty stranded on nodisc; the disciplines l_close NEVER ran (counters 1/0) - per-tty softc leaked, exactly the strand/leak claim. MAXLDISC is 9 (slots 4-8 nodisc by default); the netgraph/netgraph7 dual-index-6 collision is the same defect with two modules. Root-triggered (kldload) optionally racing unpriv TIOCSETD churn. Fix (occupied-slot rejection) A/B validated on the fix-all kernel.", "exploit_chain": "", "evidence": "run.log DF2970 lines: slot=6 SILENTLY ACCEPTED; deregister returned void while a tty is OPEN; l_open=1 l_close=0", "kernel_refs": [ "sys/kern/tty_conf.c:105", "sys/kern/tty_conf.c:110", "sys/kern/tty_conf.c:123" ], "poc_changes": "used live ng_tty registration at slot 6 instead of loading both netgraph generations (netgraph7 tty module not present in guest)", "attempts": 1, "guest_uname": "DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:04 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64", "runtime_sec": 60, "guest_dirty": 0, "build_cmd": "make (KMOD dfv_safe); cc dfv0pty.c", "run_cmd": "kldload ng_tty; kldload dfv_safe.ko; sysctl -w dfv.l2970=1; ./dfv0pty 8 &; sysctl -w dfv.l2970=2; ... =3", "code_hash": "8211ab6aada2d050ed579802377f08a3b6aeddeabcc33fd0679d43540120a7f4", "notes": "use-count-gated deregister still needed (fix covers the occupied-slot overwrite)", "recommended_fix": "occupied-slot rejection + use-count-gated deregister + ng modules using LDISC_LOAD", "fix_status": "fixed", "fix_verdict": "A/B on fix kernel #2: ldisc_register(6, fake) over the live NETGRAPHDISC registration returns -1; linesw[6] unchanged. Use-count-gated deregister remains follow-up.", "fix_baseline_reproduced": 1, "fix_patched_reproduced": 0 } |