1. 01 5月, 2016 3 次提交
    • M
      ima: add support for creating files using the mknodat syscall · 05d1a717
      Mimi Zohar 提交于
      Commit 3034a146 "ima: pass 'opened' flag to identify newly created files"
      stopped identifying empty files as new files.  However new empty files
      can be created using the mknodat syscall.  On systems with IMA-appraisal
      enabled, these empty files are not labeled with security.ima extended
      attributes properly, preventing them from subsequently being opened in
      order to write the file data contents.  This patch defines a new hook
      named ima_post_path_mknod() to mark these empty files, created using
      mknodat, as new in order to allow the file data contents to be written.
      
      In addition, files with security.ima xattrs containing a file signature
      are considered "immutable" and can not be modified.  The file contents
      need to be written, before signing the file.  This patch relaxes this
      requirement for new files, allowing the file signature to be written
      before the file contents.
      
      Changelog:
      - defer identifying files with signatures stored as security.ima
        (based on Dmitry Rozhkov's comments)
      - removing tests (eg. dentry, dentry->d_inode, inode->i_size == 0)
        (based on Al's review)
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      Cc: Al Viro <<viro@zeniv.linux.org.uk>
      Tested-by: NDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
      05d1a717
    • M
      ima: fix ima_inode_post_setattr · 42a4c603
      Mimi Zohar 提交于
      Changing file metadata (eg. uid, guid) could result in having to
      re-appraise a file's integrity, but does not change the "new file"
      status nor the security.ima xattr.  The IMA_PERMIT_DIRECTIO and
      IMA_DIGSIG_REQUIRED flags are policy rule specific.  This patch
      only resets these flags, not the IMA_NEW_FILE or IMA_DIGSIG flags.
      
      With this patch, changing the file timestamp will not remove the
      file signature on new files.
      Reported-by: NDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      Tested-by: NDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
      42a4c603
    • D
      vfs: forbid write access when reading a file into memory · 39d637af
      Dmitry Kasatkin 提交于
      This patch is based on top of the "vfs: support for a common kernel file
      loader" patch set.  In general when the kernel is reading a file into
      memory it does not want anything else writing to it.
      
      The kernel currently only forbids write access to a file being executed.
      This patch extends this locking to files being read by the kernel.
      
      Changelog:
      - moved function to kernel_read_file() - Mimi
      - updated patch description - Mimi
      Signed-off-by: NDmitry Kasatkin <dmitry.kasatkin@huawei.com>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      Reviewed-by: NLuis R. Rodriguez <mcgrof@kernel.org>
      Acked-by: NKees Cook <keescook@chromium.org>
      39d637af
  2. 27 4月, 2016 1 次提交
  3. 21 4月, 2016 6 次提交
  4. 11 4月, 2016 1 次提交
  5. 03 4月, 2016 9 次提交
  6. 02 4月, 2016 20 次提交