There is a feature allowing mksnap_ffs to be executed in the chroot environment. It has been noticed that in some cases this feature does not work correctly, resulting in the FS mount point passed to the kernel to be truncated:
# ktrace mksnap_ffs /mnt/build-1133-20250920214034/.sfile
70844 mksnap_ffs CALL nmount(0x34400ee30000,0xc,0x10201000<MNT_SOFTDEP|MNT_NOATIME|MNT_LOCAL>) 70844 mksnap_ffs NAMI "/mnt/build-113" 70844 mksnap_ffs RET nmount -1 errno 2 No such file or directory 70844 mksnap_ffs CALL write(0x2,0x2921b8113420,0xc) 70844 mksnap_ffs GIO fd 2 wrote 12 bytes "mksnap_ffs: " 70844 mksnap_ffs RET write 12/0xc 70844 mksnap_ffs CALL write(0x2,0x2921b8113510,0x3c) 70844 mksnap_ffs GIO fd 2 wrote 60 bytes "Cannot create snapshot /mnt/build-1133-20250920214034/.sfile" 70844 mksnap_ffs RET write 60/0x3c 70844 mksnap_ffs CALL write(0x2,0x2921b953a8a9,0x2) 70844 mksnap_ffs GIO fd 2 wrote 2 bytes ": "
The issue has been tracked down improper use of strlcpy() for overlapping strings, which in certain cases might cause truncation of the resulting string.