Bug 1892631 (CVE-2020-14318) - CVE-2020-14318 samba: Missing handle permissions check in SMB1/2/3 ChangeNotify
Summary: CVE-2020-14318 samba: Missing handle permissions check in SMB1/2/3 ChangeNotify
Alias: CVE-2020-14318
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: Red Hat1892632 Red Hat1892633 1892634 Red Hat1895348
Blocks: Embargoed1891686
TreeView+ depends on / blocked
Reported: 2020-10-29 11:11 UTC by Huzaifa S. Sidhpurwala
Modified: 2021-10-05 05:16 UTC (History)
16 users (show)

Fixed In Version: samba 4.11.15, samba 4.12.9, samba 4.13.1
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the way Samba handled file and directory permissions. This flaw allows an authenticated user to gain access to certain file and directory information, which otherwise would be unavailable. The highest threat from this vulnerability is to confidentiality.
Clone Of:
Last Closed: 2020-12-15 22:19:10 UTC

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:5439 0 None None None 2020-12-15 11:13:12 UTC
Red Hat Product Errata RHSA-2021:3723 0 None None None 2021-10-05 05:16:31 UTC

Description Huzaifa S. Sidhpurwala 2020-10-29 11:11:08 UTC
As per upstream advisory:

The SMB1/2/3 protocols have a concept of "ChangeNotify", where a client can request file name notification on a directory handle when a condition such as "new file creation" or "file size change" or "file timestamp update" occurs.

A missing permissions check on a directory handle requesting ChangeNotify meant that a client with a directory handle open only for FILE_READ_ATTRIBUTES (minimal access rights) could be used to obtain change notify replies from the server. These replies contain information that should not be available to directory handles open for FILE_READ_ATTRIBUTE only.

Comment 1 Huzaifa S. Sidhpurwala 2020-10-29 11:11:18 UTC

Name: the Samba project
Upstream: Steven French (Microsoft and the Samba Team)

Comment 2 Huzaifa S. Sidhpurwala 2020-10-29 11:11:25 UTC
External References:


Comment 3 Huzaifa S. Sidhpurwala 2020-10-29 11:11:29 UTC

As Samba internally opens an underlying file system handle on a directory when a client requests an open, even for FILE_READ_ATTRIBUTES then if the underlying file system permissions don't allow "r" (read) access for the connected user, then the handle open request will be denied.

"r" access is the normal permission needed to list or otherwise reveal the contents of a directory, so if a connected user has "r" access then they will be able to list the directory contents normally, and the information received by a ChangeNofity request is already available to the user.

The security issue occurs if the Administrator or directory owner had set more restrictive Windows ACL permissions on the directory to disallow read access to the user, and this permissions change was not reflected in the underlying file system permissions.

This will only occur if Samba is configured with VFS modules to decouple the underlying file system permissions from the Windows ACLs, by setting up a share with the settings:

        vfs_objects = vfs_acl_xattr
        acl_xattr:ignore system acls = yes

Comment 4 Huzaifa S. Sidhpurwala 2020-10-29 11:12:49 UTC
Created samba tracking bugs for this issue:

Affects: fedora-all [bug 1892634]

Comment 8 errata-xmlrpc 2020-12-15 11:13:06 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2020:5439 https://access.redhat.com/errata/RHSA-2020:5439

Comment 9 Product Security DevOps Team 2020-12-15 22:19:10 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):


Comment 10 errata-xmlrpc 2021-05-18 13:57:25 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:1647 https://access.redhat.com/errata/RHSA-2021:1647

Comment 11 errata-xmlrpc 2021-10-05 05:16:30 UTC
This issue has been addressed in the following products:

  Red Hat Gluster Storage 3.5 for RHEL 7

Via RHSA-2021:3723 https://access.redhat.com/errata/RHSA-2021:3723

Note You need to log in before you can comment on or make changes to this bug.