Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 613712 (CVE-2017-2619) - <net-fs/samba-{4.5.7,4.6.1}: symlink race permits opening files outside share directory (CVE-2017-2619)
Summary: <net-fs/samba-{4.5.7,4.6.1}: symlink race permits opening files outside share...
Alias: CVE-2017-2619
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
Whiteboard: B3 [cve cleanup]
Depends on:
Reported: 2017-03-24 08:48 UTC by Frank Krömmelbein
Modified: 2017-06-04 21:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Frank Krömmelbein 2017-03-24 08:48:28 UTC

Subject:     Symlink race allows access outside share definition.
CVE ID#:     CVE-2017-2619
Versions:    All versions of Samba prior to 4.6.1, 4.5.7, 4.4.12
Summary:     A time-of-check, time-of-use race condition
		can allow clients to access non-exported parts
		of the file system via symlinks.

All versions of Samba prior to 4.6.1, 4.5.7, 4.4.12 are vulnerable to
a malicious client using a symlink race to allow access to areas of
the server file system not exported under the share definition.

Samba uses the realpath() system call to ensure when a client requests
access to a pathname that it is under the exported share path on the
server file system.

Clients that have write access to the exported part of the file system
via SMB1 unix extensions or NFS to create symlinks can race the server
by renaming a realpath() checked path and then creating a symlink. If
the client wins the race it can cause the server to access the new
symlink target after the exported share path check has been done. This
new symlink target can point to anywhere on the server file system.

This is a difficult race to win, but theoretically possible. Note that
the proof of concept code supplied wins the race reliably only when
the server is slowed down using the strace utility running on the
server. Exploitation of this bug has not been seen in the wild.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-03-24 09:01:00 UTC
commit 49b774319eec93601a9ad48bbad32f6db0bbbd84
Author: Lars Wendler <>
Date:   Fri Mar 24 09:56:00 2017

    net-fs/samba: Bump to versions 4.5.7 and 4.6.1

    Package-Manager: Portage-2.3.5, Repoman-2.3.2
Comment 2 Thomas Deutschmann gentoo-dev 2017-06-04 21:48:15 UTC
Cleanup moved to bug 619516.