1. 11 May, 2015 4 commits
  2. 06 May, 2015 1 commit
  3. 15 Apr, 2015 2 commits
  4. 20 Feb, 2015 1 commit
    • David Howells's avatar
      configfs: Fix potential NULL d_inode dereference · 112fc894
      David Howells authored
      Code that does this:
      		if (!(d_unhashed(dentry) && dentry->d_inode)) {
      			simple_unlink(parent->d_inode, dentry);
      is broken because:
          !(d_unhashed(dentry) && dentry->d_inode)
      is equivalent to:
          !d_unhashed(dentry) || !dentry->d_inode
      so it is possible to get into simple_unlink() with dentry->d_inode == NULL.
      simple_unlink(), however, assumes dentry->d_inode cannot be NULL.
      I think that what was meant is this:
          !d_unhashed(dentry) && dentry->d_inode
      and that the logical-not operator or the final close-bracket was misplaced.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Joel Becker <joel.becker@oracle.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
  5. 18 Feb, 2015 3 commits
  6. 20 Jan, 2015 2 commits
  7. 19 Nov, 2014 1 commit
  8. 04 Jun, 2014 3 commits
  9. 22 Nov, 2013 1 commit
    • Junxiao Bi's avatar
      configfs: fix race between dentry put and lookup · 76ae281f
      Junxiao Bi authored
      A race window in configfs, it starts from one dentry is UNHASHED and end
      before configfs_d_iput is called.  In this window, if a lookup happen,
      since the original dentry was UNHASHED, so a new dentry will be
      allocated, and then in configfs_attach_attr(), sd->s_dentry will be
      updated to the new dentry.  Then in configfs_d_iput(),
      BUG_ON(sd->s_dentry != dentry) will be triggered and system panic.
      sys_open:                     sys_close:
       ...                           fput
                                        __d_drop <--- dentry unhashed here,
                                                 but sd->dentry still point
                                                 to this dentry.
         configfs_attach_attr---> update sd->s_dentry
                                  to new allocated dentry here.
                                           configfs_d_iput <--- BUG_ON(sd->s_dentry != dentry)
                                                           triggered here.
      To fix it, change configfs_d_iput to not update sd->s_dentry if
      sd->s_count > 2, that means there are another dentry is using the sd
      beside the one that is going to be put.  Use configfs_dirent_lock in
      configfs_attach_attr to sync with configfs_d_iput.
      With the following steps, you can reproduce the bug.
      1. enable ocfs2, this will mount configfs at /sys/kernel/config and
         fill configure in it.
      2. run the following script.
      	while [ 1 ]; do cat /sys/kernel/config/cluster/$your_cluster_name/idle_timeout_ms > /dev/null; done &
      	while [ 1 ]; do cat /sys/kernel/config/cluster/$your_cluster_name/idle_timeout_ms > /dev/null; done &
      Signed-off-by: default avatarJunxiao Bi <junxiao.bi@oracle.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  10. 16 Nov, 2013 1 commit
  11. 14 Jul, 2013 1 commit
  12. 03 Jul, 2013 1 commit
  13. 29 Jun, 2013 1 commit
  14. 04 Mar, 2013 1 commit
    • Eric W. Biederman's avatar
      fs: Limit sys_mount to only request filesystem modules. · 7f78e035
      Eric W. Biederman authored
      Modify the request_module to prefix the file system type with "fs-"
      and add aliases to all of the filesystems that can be built as modules
      to match.
      A common practice is to build all of the kernel code and leave code
      that is not commonly needed as modules, with the result that many
      users are exposed to any bug anywhere in the kernel.
      Looking for filesystems with a fs- prefix limits the pool of possible
      modules that can be loaded by mount to just filesystems trivially
      making things safer with no real cost.
      Using aliases means user space can control the policy of which
      filesystem modules are auto-loaded by editing /etc/modprobe.d/*.conf
      with blacklist and alias directives.  Allowing simple, safe,
      well understood work-arounds to known problematic software.
      This also addresses a rare but unfortunate problem where the filesystem
      name is not the same as it's module name and module auto-loading
      would not work.  While writing this patch I saw a handful of such
      cases.  The most significant being autofs that lives in the module
      This is relevant to user namespaces because we can reach the request
      module in get_fs_type() without having any special permissions, and
      people get uncomfortable when a user specified string (in this case
      the filesystem type) goes all of the way to request_module.
      After having looked at this issue I don't think there is any
      particular reason to perform any filtering or permission checks beyond
      making it clear in the module request that we want a filesystem
      module.  The common pattern in the kernel is to call request_module()
      without regards to the users permissions.  In general all a filesystem
      module does once loaded is call register_filesystem() and go to sleep.
      Which means there is not much attack surface exposed by loading a
      filesytem module unless the filesystem is mounted.  In a user
      namespace filesystems are not mounted unless .fs_flags = FS_USERNS_MOUNT,
      which most filesystems do not set today.
      Acked-by: default avatarSerge Hallyn <serge.hallyn@canonical.com>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Reported-by: default avatarKees Cook <keescook@google.com>
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
  15. 23 Feb, 2013 1 commit
  16. 22 Feb, 2013 1 commit
  17. 18 Dec, 2012 1 commit
  18. 18 Sep, 2012 1 commit
  19. 14 Jul, 2012 1 commit
    • Al Viro's avatar
      stop passing nameidata to ->lookup() · 00cd8dd3
      Al Viro authored
      Just the flags; only NFS cares even about that, but there are
      legitimate uses for such argument.  And getting rid of that
      completely would require splitting ->lookup() into a couple
      of methods (at least), so let's leave that alone for now...
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
  20. 21 Mar, 2012 6 commits
  21. 04 Jan, 2012 4 commits
  22. 13 Dec, 2011 1 commit
  23. 27 Sep, 2011 1 commit
    • Paul Bolle's avatar
      doc: fix broken references · 395cf969
      Paul Bolle authored
      There are numerous broken references to Documentation files (in other
      Documentation files, in comments, etc.). These broken references are
      caused by typo's in the references, and by renames or removals of the
      Documentation files. Some broken references are simply odd.
      Fix these broken references, sometimes by dropping the irrelevant text
      they were part of.
      Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>