Bug 1536053

Summary: CVE-2017-2619 regression with non-wide symlinks to directories
Product: Red Hat Enterprise Linux 6 Reporter: Andreas Schneider <asn>
Component: sambaAssignee: Andreas Schneider <asn>
Status: CLOSED ERRATA QA Contact: Robin Hack <rhack>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.10CC: asn, atolani, cobrown, Colin.Simpson, cparadka, enewland, gdeschner, jarrpa, jkurik, mkolaja, mkosek, msugaya, pkulkarn, rhack, sfroemer
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: samba-3.6.23-49.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-19 05:09:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1504542    

Description Andreas Schneider 2018-01-18 14:43:05 UTC
Description of problem:

The new helper function non_widelink_open() introduced with the fix part of the security fix for CVE-2017-2619 cannot reliably handle (non-wide) symlinks to directories if the underlying OS supports to O_DIRECTORY flag to open().

In this case, source3/smbd/open.c::open_directory() may end up calling fd_open() with flags O_RDONLY|O_DIRECTORY. If wide links = no, the flags get passed on to non_widelink_open(), which in turns adds O_NOFOLLOW, calls SMB_VFS_OPEN(), and then checks errno for ELOOP to detect whether a symlink was hit.

However, due to the flag O_DIRECTORY, open() may also return ENOTDIR in this case, and non_widelink_open() won't try to follow the link even if it remains within the share.

Comment 9 Colin.Simpson 2018-03-20 13:55:13 UTC
I have this. If this is ON_QA is it likely to get a release before 6.10 (given this isn't in beta yet from what I can see), and this seems to be what this bug fix is targeting?

Further, is this release imminent without me opening a support case?

Comment 17 errata-xmlrpc 2018-06-19 05:09:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:1860