1. 05 6月, 2017 2 次提交
  2. 13 3月, 2017 1 次提交
    • M
      ima: provide ">" and "<" operators for fowner/uid/euid rules. · 3dd0c8d0
      Mikhail Kurinnoi 提交于
      For now we have only "=" operator for fowner/uid/euid rules. This
      patch provide two more operators - ">" and "<" in order to make
      fowner/uid/euid rules more flexible.
      
      Examples of usage.
      
       Appraise all files owned by special and system users (SYS_UID_MAX 999):
          appraise fowner<1000
       Don't appraise files owned by normal users (UID_MIN 1000):
          dont_appraise fowner>999
       Appraise all files owned by users with UID 1000-1010:
          dont_appraise fowner>1010
          appraise fowner>999
      
      Changelog v3:
      - Removed code duplication in ima_parse_rule().
      - Fix ima_policy_show() - (Mimi)
      
      Changelog v2:
      - Fixed default policy rules.
      Signed-off-by: NMikhail Kurinnoi <viewizard@viewizard.com>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      
       security/integrity/ima/ima_policy.c | 115 +++++++++++++++++++++++++++---------
       1 file changed, 87 insertions(+), 28 deletions(-)
      3dd0c8d0
  3. 07 3月, 2017 1 次提交
  4. 30 6月, 2016 2 次提交
  5. 21 5月, 2016 1 次提交
  6. 04 5月, 2016 1 次提交
  7. 21 2月, 2016 5 次提交
  8. 19 2月, 2016 2 次提交
  9. 09 2月, 2016 1 次提交
  10. 25 12月, 2015 1 次提交
    • S
      IMA: policy can be updated zero times · 0112721d
      Sasha Levin 提交于
      Commit "IMA: policy can now be updated multiple times" assumed that the
      policy would be updated at least once.
      
      If there are zero updates, the temporary list head object will get added
      to the policy list, and later dereferenced as an IMA policy object, which
      means that invalid memory will be accessed.
      
      Changelog:
      - Move list_empty() test to ima_release_policy(), before audit msg - Mimi
      Signed-off-by: NSasha Levin <sasha.levin@oracle.com>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      0112721d
  11. 15 12月, 2015 3 次提交
  12. 16 6月, 2015 3 次提交
    • M
      ima: update builtin policies · 24fd03c8
      Mimi Zohar 提交于
      This patch defines a builtin measurement policy "tcb", similar to the
      existing "ima_tcb", but with additional rules to also measure files
      based on the effective uid and to measure files opened with the "read"
      mode bit set (eg. read, read-write).
      
      Changing the builtin "ima_tcb" policy could potentially break existing
      users.  Instead of defining a new separate boot command line option each
      time the builtin measurement policy is modified, this patch defines a
      single generic boot command line option "ima_policy=" to specify the
      builtin policy and deprecates the use of the builtin ima_tcb policy.
      
      [The "ima_policy=" boot command line option is based on Roberto Sassu's
      "ima: added new policy type exec" patch.]
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      Signed-off-by: NDr. Greg Wettstein <gw@idfusion.org>
      Cc: stable@vger.kernel.org
      24fd03c8
    • M
      ima: extend "mask" policy matching support · 4351c294
      Mimi Zohar 提交于
      The current "mask" policy option matches files opened as MAY_READ,
      MAY_WRITE, MAY_APPEND or MAY_EXEC.  This patch extends the "mask"
      option to match files opened containing one of these modes.  For
      example, "mask=^MAY_READ" would match files opened read-write.
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      Signed-off-by: NDr. Greg Wettstein <gw@idfusion.org>
      Cc: stable@vger.kernel.org
      4351c294
    • M
      ima: add support for new "euid" policy condition · 139069ef
      Mimi Zohar 提交于
      The new "euid" policy condition measures files with the specified
      effective uid (euid).  In addition, for CAP_SETUID files it measures
      files with the specified uid or suid.
      
      Changelog:
      - fixed checkpatch.pl warnings
      - fixed avc denied {setuid} messages - based on Roberto's feedback
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      Signed-off-by: NDr. Greg Wettstein <gw@idfusion.org>
      Cc: stable@vger.kernel.org
      139069ef
  13. 22 5月, 2015 2 次提交
  14. 13 5月, 2015 1 次提交
  15. 18 11月, 2014 1 次提交
    • D
      ima: require signature based appraisal · c57782c1
      Dmitry Kasatkin 提交于
      This patch provides CONFIG_IMA_APPRAISE_SIGNED_INIT kernel configuration
      option to force IMA appraisal using signatures. This is useful, when EVM
      key is not initialized yet and we want securely initialize integrity or
      any other functionality.
      
      It forces embedded policy to require signature. Signed initialization
      script can initialize EVM key, update the IMA policy and change further
      requirement of everything to be signed.
      
      Changes in v3:
      * kernel parameter fixed to configuration option in the patch description
      
      Changes in v2:
      * policy change of this patch separated from the key loading patch
      Signed-off-by: NDmitry Kasatkin <d.kasatkin@samsung.com>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      c57782c1
  16. 12 10月, 2014 3 次提交
  17. 18 9月, 2014 1 次提交
    • R
      ima: added ima_policy_flag variable · a756024e
      Roberto Sassu 提交于
      This patch introduces the new variable 'ima_policy_flag', whose bits
      are set depending on the action of the current policy rules. Only the
      flags IMA_MEASURE, IMA_APPRAISE and IMA_AUDIT are set.
      
      The new variable will be used to improve performance by skipping the
      unnecessary execution of IMA code if the policy does not contain rules
      with the above actions.
      
      Changes in v6 (Roberto Sassu)
      * do not check 'ima_initialized' before calling ima_update_policy_flag()
        in ima_update_policy() (suggested by Dmitry)
      * calling ima_update_policy_flag() moved to init_ima to co-locate with
        ima_initialized (Dmitry)
      * add/revise comments (Mimi)
      
      Changes in v5 (Roberto Sassu)
      * reset IMA_APPRAISE flag in 'ima_policy_flag' if 'ima_appraise' is set
        to zero (reported by Dmitry)
      * update 'ima_policy_flag' only if IMA initialization is successful
        (suggested by Mimi and Dmitry)
      * check 'ima_policy_flag' instead of 'ima_initialized'
        (suggested by Mimi and Dmitry)
      Signed-off-by: NRoberto Sassu <roberto.sassu@polito.it>
      Signed-off-by: NDmitry Kasatkin <d.kasatkin@samsung.com>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      a756024e
  18. 26 7月, 2014 1 次提交
  19. 17 7月, 2014 1 次提交
  20. 04 6月, 2014 1 次提交
    • M
      ima: audit log files opened with O_DIRECT flag · f9b2a735
      Mimi Zohar 提交于
      Files are measured or appraised based on the IMA policy.  When a
      file, in policy, is opened with the O_DIRECT flag, a deadlock
      occurs.
      
      The first attempt at resolving this lockdep temporarily removed the
      O_DIRECT flag and restored it, after calculating the hash.  The
      second attempt introduced the O_DIRECT_HAVELOCK flag. Based on this
      flag, do_blockdev_direct_IO() would skip taking the i_mutex a second
      time.  The third attempt, by Dmitry Kasatkin, resolves the i_mutex
      locking issue, by re-introducing the IMA mutex, but uncovered
      another problem.  Reading a file with O_DIRECT flag set, writes
      directly to userspace pages.  A second patch allocates a user-space
      like memory.  This works for all IMA hooks, except ima_file_free(),
      which is called on __fput() to recalculate the file hash.
      
      Until this last issue is addressed, do not 'collect' the
      measurement for measuring, appraising, or auditing files opened
      with the O_DIRECT flag set.  Based on policy, permit or deny file
      access.  This patch defines a new IMA policy rule option named
      'permit_directio'.  Policy rules could be defined, based on LSM
      or other criteria, to permit specific applications to open files
      with the O_DIRECT flag set.
      
      Changelog v1:
      - permit or deny file access based IMA policy rules
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      Acked-by: NDmitry Kasatkin <d.kasatkin@samsung.com>
      Cc: <stable@vger.kernel.org>
      f9b2a735
  21. 08 3月, 2014 3 次提交
  22. 06 2月, 2014 1 次提交
  23. 26 10月, 2013 1 次提交
  24. 26 2月, 2013 1 次提交