[lkml]   [2012]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH v2012.1] fs: symlink restrictions on sticky directories
    On 2012-01-04 12:18 -0800, Kees Cook wrote:
    > A long-standing class of security issues is the symlink-based
    > time-of-check-time-of-use race, most commonly seen in world-writable
    > directories like /tmp. The common method of exploitation of this flaw
    > is to cross privilege boundaries when following a given symlink (i.e. a
    > root process follows a symlink belonging to another user). For a likely
    > incomplete list of hundreds of examples across the years, please see:
    > The solution is to permit symlinks to only be followed when outside
    > a sticky world-writable directory, or when the uid of the symlink and
    > follower match, or when the directory owner matches the symlink's owner.
    > diff --git a/fs/Kconfig b/fs/Kconfig
    > index 5f4c45d..26ede24 100644
    > --- a/fs/Kconfig
    > +++ b/fs/Kconfig
    > @@ -278,3 +278,19 @@ source "fs/nls/Kconfig"
    > source "fs/dlm/Kconfig"
    > endmenu
    > +
    > + bool "Protect symlink following in sticky world-writable directories"
    > + default y

    Why do we need a config option for this? What's wrong with just using
    the sysctl?

    Why have you made this option "default y", when enabling it clearly
    makes user-visible changes to kernel behaviour?

    Nick Bowler, Elliptic Technologies (

     \ /
      Last update: 2012-01-05 15:43    [W:0.021 / U:76.588 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site