In FreeBSD through 11.1 the smb_strdupin function in sys/netsmb/smb_subr.c has a race condition with a resultant out-of-bounds read because it can cause t2p->t_name strings to lack a final '\\0' character.