DF-3372 / verdict.json
{ "finding_id": "DF-3372", "status": "not_reproduced", "reproduced": 0, "impact": "none", "confidence": "certain", "verdict": "The out-of-bounds/uninitialized read is certain from the code path (getsockaddr kmallocs exactly namelen bytes and tcp_usr_bind/tcp_usr_connect/tcp_usr_preconnect/tcp6_usr_bind/tcp6_usr_connect read sin_addr/sin6_addr before any sa_len validation), and the multicast decision is live on partially-copied addresses (5-byte sockaddr with byte4=224 deterministically returns EAFNOSUPPORT vs EINVAL, proving the handler consumes the full sin_addr regardless of sa_len). However the observable oracle (groomed recycled bytes flipping EAFNOSUPPORT for namelen<=4) never fired across ~600k attempts (8/16-byte M_SONAME grooms via UDP bind and sendto, single/fleet/hammer variants): DFs slab allocator routes cross-CPU frees to the owning CPUs z_RChunks list which user-thread allocations do not reuse, affinity pinning (usched_set) is privileged, and the v6 cross-object byte the multicast test samples is structurally the neighbor chunks sa_len (=8, never 0xff). Defect real (CWE-125, same family as DF-3357), demonstrated impact on stock system: none.", "exploit_chain": "", "evidence": [ "probe_matrix.log: len=5 sa[4]=224 -> errno 47 vs sa[4]=8 -> errno 22 (decision consumes sin_addr with sa_len<16); len<=4 always 22 across 64x grooms", "probe3.log: 200k-iteration hammer + 48-process fleet: zero EAFNOSUPPORT flips", "VERDICT.md: full code-path proof and allocator-topology analysis" ], "kernel_refs": [ "sys/netinet/tcp_usrreq.c:316-321", "sys/netinet/tcp_usrreq.c:406-411", "sys/netinet/tcp_usrreq.c:597-602", "sys/netinet/tcp_usrreq.c:640-656", "sys/netinet/tcp_usrreq.c:965-968", "sys/kern/uipc_syscalls.c:1513-1532", "sys/kern/kern_jail.c:459-480", "sys/netinet/in_pcb.c:648", "sys/netinet6/in6_pcb.c:129", "sys/netinet6/in6_pcb.c:282" ], "poc_changes": "PoC authored for this run: grooms M_SONAME size classes via UDP bind/sendto with controlled sockaddr content, then TCP bind/connect with 2-8 byte sockaddrs; probes swept groom size (8/16), vector (bind/sendto), repetitions (2..256), namelen (2..5), affinity (usched_set denied), fleet (48 procs) and 200k-iteration hammers.", "attempts": 5, "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": 90, "guest_dirty": 0, "build_cmd": "cc -O2 -include unistd.h -o oob_oracle oob_oracle.c", "run_cmd": "./oob_oracle", "code_hash": "ec79ca6a0e1c0b513c533ff7001c52bb11c8d65ffcb4e5093683192dda464294", "notes": "Low severity: bytes only steer an error code (EAFNOSUPPORT vs EINVAL); no data leaves the kernel; no write primitive. Same read-before-validate family as DF-3357 (udp) where the OOB address was used as packet destination - TCP never uses it.", "recommended_fix": "Validate nam->sa_len >= sizeof(struct sockaddr_in)/sin6 before reading address fields at the five tcp_usrreq.c sites (and length-check inside prison_remote_ip).", "fix_status": "not_testable", "fix_kernel_uname": "", "fix_baseline_reproduced": 0, "fix_patched_reproduced": 0, "fix_verdict": "Fix not kernel-validated: the defect has no observable manifestation on the stock system (oracle unflippable), so a patched kernel cannot be differentiated by this PoC; the length-check fix is trivially correct by inspection.", "fix_evidence": "fix.diff (sa_len guards at the five sites)" } |