# DF-3125 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 mount path was reached and fails cleanly: mount_cd9660 -C with a 31-byte non-NUL charset returns cd9660_iconv Invalid argument after the kernel bcopy and the iconv_open strcmp walk; a control mount with a valid charset succeeds on the same image. The over-read itself (strcmp past the 31-byte stack array until an accidental zero) is bounded and produces no externally observable state on this kernel, and the stock mount_cd9660 CLI additionally validates charset names in userland first, so the un-terminated strcmp walk requires a direct mount(2) caller. Bounded stack over-read, no demonstrated disclosure. Fix forces termination after the bcopy; compile-validated.

## Kernel references
- sys/vfs/isofs/cd9660/cd9660_vfsops.c:197
- sys/vfs/isofs/cd9660/cd9660_vfsops.c:492-493

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

## Fix

cs_local/cs_disk forced NUL-terminated after the bcopy

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

## Reproduction

build: host: python3 ../DF-3206/craft_dotdot_iso.py img (any valid ISO)

run: guest: kldload libiconv cd9660_iconv; mount_cd9660 -o ro -C <31-char-garbage> /dev/vn2 /mnt (fails at iconv lookup) vs -C ISO8859-1 (succeeds)

expected: 31-byte non-NUL charset: mount fails in iconv; valid charset: mount succeeds

## 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.
