brooks bf0e2ca510 Fix a stack overflow in mount_smbfs when hostname is too long.
The local hostname was blindly copied into the to the nn_name array.
When the hostname exceeded 16 bytes, it would overflow.  Truncate the
hostname to 15 bytes plus a 0 terminator which is the "workstation name"
suffix.

Use defensive strlcpy() when filling nn_name in all cases.

PR:		228354
Reported by:	donald.buchholz@intel.com
Reviewed by:	jpaetzel,  ian (prior version)
Discussed with:	Security Officer (gtetlow)
MFC after:	3 days
Security:	Stack overflow with the hostname.
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D15936
2018-06-25 16:42:49 +00:00
..
2018-05-19 00:26:00 +00:00
2018-05-12 12:00:18 +00:00
2018-05-31 09:11:21 +00:00
2018-05-23 01:20:31 +00:00
2018-06-19 14:46:59 +00:00
2018-02-28 07:59:55 +00:00
2018-06-17 07:08:47 +00:00
2018-06-17 17:10:35 +00:00
2018-05-31 09:11:21 +00:00
2018-05-08 04:52:52 +00:00
2018-05-29 10:29:04 +00:00
2018-05-04 10:17:27 +00:00
2018-05-31 09:11:21 +00:00
2018-05-18 06:10:16 +00:00