Semicolon (';') is a legal character in modern MS Windows filesystems (FAT32 & NTFS). it is allowed by Windows, Linux & Samba. But on FreeBSD using mount_smbfs, it is not possible to create a file or directory with a semicolon in the name. Fix: delete ';' from badchars in sys/fs/smbfs/smbfs_vnops.c Patch attached with submission follows: How-To-Repeat: mount a windows or samba share. `% touch a\;1' or `% mkdir b\;1'
Responsible Changed From-To: freebsd-bugs->freebsd-fs Over to maintainer(s).
Can't be In Progress without an Assignee. Open to take
Looking in the Apple's smbfs sources we can find a bit more restrictions in the smbfs_pathcheck() functions. https://opensource.apple.com/source/smb/smb-551/kernel/smbfs/smbfs_vnops.c Also, it looks like our restricions doesn't have all characters according to Microsoft's documentation: https://msdn.microsoft.com/en-us/library/azure/dn167011.aspx
The semicolon was added to the list as part of base r159117. I don't think it's relevant to the CVE referenced in the commit log. Also judging from the Apple source code semicolon is valid for long names but not for 8.3 format. So proer fix would be to move it from badchars to badchars83 list. Colin, do you remember why semicolon was added to the list in the first place?
Forgot to add cpercva@ to Cc. Colin, could you take a look at he question in my previous comment? Thanks
(In reply to Oleksandr Tymoshenko from comment #5) Looks to me like that security patch just changed how '\' is handled. The ';' character has been in the badchars list since smbfs was added to FreeBSD in 2001.
(In reply to Colin Percival from comment #6) Yes, you're right, my bad. Sorry, I misread the patch.
A commit references this bug: Author: gonzo Date: Sun Jan 20 05:52:17 UTC 2019 New revision: 343209 URL: https://svnweb.freebsd.org/changeset/base/343209 Log: [smbfs] Allow semicolon in mounts that support long names Semicolon is a legal character in long names but not in 8.3 format. Move it to respective character set. PR: 140068 Submitted by: tom@uffner.com MFC after: 3 weeks Changes: head/sys/fs/smbfs/smbfs_vnops.c
Patch has been committed. Thanks for submitting it.
A commit references this bug: Author: gonzo Date: Mon Feb 11 08:52:48 UTC 2019 New revision: 344000 URL: https://svnweb.freebsd.org/changeset/base/344000 Log: MFC r343209: [smbfs] Allow semicolon in mounts that support long names Semicolon is a legal character in long names but not in 8.3 format. Move it to respective character set. PR: 140068 Submitted by: tom@uffner.com Changes: _U stable/12/ stable/12/sys/fs/smbfs/smbfs_vnops.c