Change parameter "wide links" to default to "no"; it's also incompatible with "unix extensions"

2010-02-02T00:00:00
ID SAMBA:CVE-2010-0926
Type samba
Reporter Samba
Modified 2010-02-02T00:00:00

Description

The problem comes from a combination of two features in Samba, each of which on their own are useful to Administrators, but in combination allow users to access any file on the system that their logged in username has permissions to read (this is not a privilege escalation problem). By default Samba ships with the parameter "wide links = yes", which allows Administrators to locally (on the server) add a symbolic link inside an exported share which SMB/CIFS clients will follow. As an example, given a share definition: [tmp] path = /tmp read only = no guest ok = yes The administrator could add a symlink: $ ln -s /etc/passwd /tmp/passwd and SMB/CIFS clients would then see a file called "passwd" within the [tmp] share that could be read and would allow clients to read /etc/passwd. If the "wide links" parameter is set to "no", any attempt to read this file will fail with an "access denied" error. The problem occurs as Samba allows clients using the UNIX extensions (which are also turned on by default) to create symlinks on remotely mounted shares on which they have write access that point to any path on the file system. This is by design, as applications running on UNIX clients may have good reasons to create symlinks anywhere on the filesystem they have write access that point to local files (such as /etc/passwd). UNIX clients will resolve these links locally, but Windows clients will resolve them on the server. It is this combination that causes the problem. All future versions of Samba will have the parameter "wide links" set to "no" by default, and the manual pages will be updated to explain this issue. http://www.samba.org/samba/news/symlink_attack.html