History log of /freebsd-10-stable/contrib/smbfs/lib/smb/ctx.c
Revision Date Author Comments
# 335781 28-Jun-2018 brooks

MFC r335641:

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)
Security: Stack overflow with the hostname.
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15936


# 272119 25-Sep-2014 trasz

MFC r271259:

Make it possible to use empty user name ("-U ''") for mount_smbfs(8).
It's just like "-U guest", except that it actually works, at least
with Samba 4, which seems to return authentication failure for "-U guest".

Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation


# 272119 25-Sep-2014 trasz

MFC r271259:

Make it possible to use empty user name ("-U ''") for mount_smbfs(8).
It's just like "-U guest", except that it actually works, at least
with Samba 4, which seems to return authentication failure for "-U guest".

Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation