ansible-role-samba icon indicating copy to clipboard operation
ansible-role-samba copied to clipboard

CVE-2017-7494 Mitigation is activated even if Samba version is newer then the affected one

Open langchr86 opened this issue 4 years ago • 2 comments

In Ubuntu 20.04 Samba Version 4.11.6 is installed. Even though the mitigation option nt pipe support = no is added to the global part of smb.conf. This results in windows clients not able to connect to the shares. The reason is that ubuntu has its own naming convention for the version number which is not correctly detected by the mechnism already in place. The following happen on ubuntu.

$ smbd --version
Version 4.11.6-Ubuntu

Therefore the mechnism to detect the samba version fails to remove all text except the version number. I would propose to replace the shell command in main.yml

smbd --version | sed 's/Version //'

by

smbd --version | sed 's/Version //' | sed 's/-Ubuntu//'
# or even
smbd --version | sed 's/Version //' | sed 's/-.*//'

langchr86 avatar Jul 08 '20 19:07 langchr86

Fix pending in https://github.com/bertvv/ansible-role-samba/pull/61.

colin-nolan avatar Aug 16 '20 15:08 colin-nolan

Just come across this issue - took me ages to realise this was the cause since shares are accessible directly from Windows, but trying to browse the server returns a permission error. This can fortunately be worked around with setting samba_mitigate_cve_2017_7494 to false as described in the readme, but it would be better not to apply the fix in the first place

exterrestris avatar Feb 23 '21 19:02 exterrestris