DF-2770 / verdict.json
{ "finding_id": "DF-2770", "status": "reproduced", "reproduced": 1, "impact": "none", "confidence": "certain", "verdict": "Mechanically reproduced on the stock guest with a pty pair in TIOCPKT mode: after TIOCEXT (EXTPROC on) a slave tcsetattr queues the TIOCPKT_IOCTL packet (tty_pty.c:1248); the master full-buffer read returns 0x40 + 44 termios bytes (sanity phase). A second event read into [1 valid byte][1 PROT_NONE byte] returned rv=1 with errno=0: ureadc delivered the 0x40 control byte, then uiomove(termios,1) hit EFAULT which the code discards (tty_pty.c:721-722), consumed pt_send (tty_pty.c:724) and reported success - the control event and the termios snapshot are silently lost and the short read is EOF-indistinguishable, exactly as filed. On the fix kernel the same faulting read returns -1/EFAULT (retryable).", "exploit_chain": "", "evidence": "run.log baseline: B rv=1 errno=0 byte0=0x40 (EFAULT swallowed); A/B fix kernel: B rv=-1 errno=14; pty_pkt.c phases A/B", "kernel_refs": [ "sys/kern/tty_pty.c:718", "sys/kern/tty_pty.c:721", "sys/kern/tty_pty.c:724" ], "poc_changes": "initial PoC missed that TIOCPKT_IOCTL on TIOCSETA requires EXTPROC (TIOCEXT) - added the TIOCEXT handshake and a full-buffer sanity phase", "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": 120, "guest_dirty": 0, "build_cmd": "cc -Wall -O2 -o pty_pkt pty_pkt.c", "run_cmd": "./pty_pkt", "code_hash": "94e347c52ef512b9611351b914f80c26fe4e5ee20d70c46fd45a49e9571c5bda", "notes": "Trigger requires EXTPROC; szmin-bounded, memory-safe", "recommended_fix": "Capture the uiomove return and propagate EFAULT like the ureadc path", "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 read rv=1 errno=0 (error swallowed); fix kernel rv=-1 errno=14 EFAULT with the error propagated per the ureadc pattern at tty_pty.c:712-717." } |