NEWS[4.17.0rc4]: Samba 4.17.0rc4 Available for Download
[samba-web.git] / security / CVE-2015-5252.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4
5 <head>
6 <title>Samba - Security Announcement Archive</title>
7 </head>
8
9 <body>
10
11    <H2>CVE-2015-5252.html:</H2>
12
13 <p>
14 <pre>
15 ===========================================================
16 == Subject:     Insufficient symlink verification in smbd.
17 ==
18 == CVE ID#:     CVE-2015-5252
19 ==
20 == Versions:    All versions of Samba, from 3.0.0 to 4.3.2
21 ==
22 == Summary:     Insufficient symlink verification could allow
23 ==              data access outside share path.
24 ==
25 ===========================================================
26
27 ===========
28 Description
29 ===========
30
31 All versions of Samba from 3.0.0 to 4.3.2 inclusive are vulnerable to
32 a bug in symlink verification, which under certain circumstances could
33 allow client access to files outside the exported share path.
34
35 If a Samba share is configured with a path that shares a common path
36 prefix with another directory on the file system, the smbd daemon may
37 allow the client to follow a symlink pointing to a file or directory
38 in that other directory, even if the share parameter "wide links" is
39 set to "no" (the default).
40
41 For example. Given two directories on the file system:
42
43 /share/
44
45 /share1/
46
47 If a Samba share is created as follows:
48
49 [sharename]
50         path = /share
51         wide links = no
52
53 Then a symlink with the path
54
55 /share/symlink -> /share1/file
56
57 would be followed by smbd, due to the fact that only the string
58 "/share" is checked to see if it matches the target path. This means a
59 path that starts with "/share", such as "/share1" will also match.
60
61 ==================
62 Patch Availability
63 ==================
64
65 Patches addressing this defect have been posted to
66
67  https://www.samba.org/samba/history/security.html
68
69 Additionally, Samba 4.3.3, 4.2.7 and 4.1.22 have been issued as
70 security releases to correct the defect.
71 Samba vendors and administrators running affected versions are
72 advised to upgrade or apply the patch as soon as possible.
73
74 ===========
75 Workarounds
76 ===========
77
78 Ensure all exported share paths do not share base path names with
79 other directories on the file system.
80
81 Please note, setting the smb.conf variable "follow symlinks = no" is
82 *NOT* a workaround for this problem, as this only prohibits smbd from
83 following a symlink at the end of a path.
84
85 A symlink could be created that points to the directory which shares a
86 base path name instead, and smbd would still follow that link. For
87 example, with the above share definition, given a symlink of:
88
89 /share/symlink -> /share1
90
91 a client could send a relative path such as "symlink/file", which
92 would still be followed by smbd as the end component "file" of
93 "symlink/file" is *NOT* a symlink, and so is not affected by "follow
94 symlinks = no".
95
96 =======
97 Credits
98 =======
99
100 The problem was found by Jan "Yenya" Kasprzak and the Computer Systems
101 Unit team at Faculty of Informatics, Masaryk University. The fix was
102 created by Jeremy Allison of Google.
103 </pre>
104 </body>
105 </html>