# DF-3262 verification

Kernel: 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

## Bottom line

The validation gap is demonstrated live: an O_VIA glob rule whose 16-byte name has no NUL byte installs through IP_FW_ADD (only the instruction length is checked at ip_fw2.c:5482) and shows in ipfw -S list, while a properly terminated control rule matches traffic. Rigorous source analysis of libkern fnmatch shows the out-of-bounds pattern read is genuinely reachable but oracle-only: the default, ? and leading-* branches consume pattern in lockstep with the string (bounded by if_xname, <= 15 chars + NUL), but an unterminated [ opens rangematch()s bracket scan, which walks pattern bytes until a ] or an EOS byte - past the 16-byte name, through the rest of the rule, into adjacent heap when no zero byte intervenes. The result is a match/no-match oracle on adjacent kernel heap bytes with no crash or disclosure path; classification is therefore not_reproduced for want of an observable manifestation, with the gap and the reachability analysis on record.

## Kernel references
- sys/net/ipfw/ip_fw2.c:1355
- sys/net/ipfw/ip_fw2.c:5480-5483
- sys/libkern/fnmatch.c:56-175

## Exploit chain
(none: availability/correctness finding; no privilege chain)

## Fix

require memchr(name, 0, IFNAMSIZ) at install for O_RECV/O_XMIT/O_VIA

See fix.diff in this directory (git-apply-able against the read-only sys/
tree; applied only inside the disposable verification guest).

## Reproduction

build: guest: addset via 2000 <16-byte-name> (same tool as DF-3261)

run: guest: addset via 2000 vtnet0[AAAAAAAAA; ipfw -S list; traffic; ipfw show 2000

expected: rule installs with no NUL in name[] (validation gap); never matches the control pattern

## Notes on the PoC (what changed vs the finding sketch)

(none)

## Fix status (batch validation)
Applied with the 36 sibling fix.diffs of this batch in findings/poc/_batch41/all_fixes.patch; single in-guest `make -j6 nativekernel KERNCONF=X86_64_GENERIC` completed RC=0 with zero errors under -Werror (full log: findings/poc/_batch41/fix_build8.log). Behavior A/B intentionally skipped for this Info-tier item.
