1. 14 5月, 2010 2 次提交
    • E
      inotify: race use after free/double free in inotify inode marks · e0873344
      Eric Paris 提交于
      There is a race in the inotify add/rm watch code.  A task can find and
      remove a mark which doesn't have all of it's references.  This can
      result in a use after free/double free situation.
      
      Task A					Task B
      ------------				-----------
      inotify_new_watch()
       allocate a mark (refcnt == 1)
       add it to the idr
      					inotify_rm_watch()
      					 inotify_remove_from_idr()
      					  fsnotify_put_mark()
      					      refcnt hits 0, free
       take reference because we are on idr
       [at this point it is a use after free]
       [time goes on]
       refcnt may hit 0 again, double free
      
      The fix is to take the reference BEFORE the object can be found in the
      idr.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Cc: <stable@kernel.org>
      e0873344
    • E
      inotify: clean up the inotify_add_watch out path · 3dbc6fb6
      Eric Paris 提交于
      inotify_add_watch explictly frees the unused inode mark, but it can just
      use the generic code.  Just do that.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      3dbc6fb6
  2. 12 5月, 2010 24 次提交
  3. 11 5月, 2010 9 次提交
  4. 10 5月, 2010 5 次提交