[PATCH] Fix bug 12721 - CVE-2017-2619 regression with "follow symlinks = no" - Patchset #2

Ralph Böhme slow at samba.org
Tue Mar 28 05:45:41 UTC 2017


On Mon, Mar 27, 2017 at 10:32:04PM -0700, Jeremy Allison wrote:
> On Mon, Mar 27, 2017 at 05:13:44PM -0700, Jeremy Allison via samba-technical wrote:
> > 
> > There's a second part needed to this bugfix (see
> > Ralph's comment on bug:
> > 
> > https://bugzilla.samba.org/show_bug.cgi?id=12721
> > 
> > Attached is my proposed patch. Works, but please
> > don't push yet until I finish writing the test
> > case for it).
> 
> OK, here is the version I'm proposing we use
> that goes on top of the previous patch you
> successfully pushed.
> 
> It fixes the second regression issue reported
> by the Debian, Ubuntu and Fedora users who
> have "follow symlinks = no" in their smb.conf.
> 
> See the bug report for Ralph's description of
> the problem that allowed me to track this down
> and fix it quickly.
> 
> The patch has 4 parts:
> 
> ---------------------------------------------
> #1 - Fixup a few minor issues in the previous
> test (use correct bash numeric comparisons,
> added missing "return").
> 
> #2 - Add new "cwd_name" parameter to function
> check_reduced_name(). Not yet used.
> 
> #3 - The core of the fix. Use the cwd_name
> parameter to reconstruct the original
> client name passed in for "no symlink" comparison.
> 
> #4 - Additional test case that prevents us
> from regressing on accessing files/directories
> on a share with "follow symlinks = no" set.
> 
> Please review and push if happy !

pushed, thanks!

Cheerio!
-slow



More information about the samba-technical mailing list