1. 14 12月, 2012 2 次提交
  2. 12 10月, 2012 1 次提交
  3. 21 9月, 2012 1 次提交
  4. 08 9月, 2012 1 次提交
    • M
      ima: add ima_inode_setxattr/removexattr function and calls · 42c63330
      Mimi Zohar 提交于
      Based on xattr_permission comments, the restriction to modify 'security'
      xattr is left up to the underlying fs or lsm. Ensure that not just anyone
      can modify or remove 'security.ima'.
      
      Changelog v1:
      - Unless IMA-APPRAISE is configured, use stub ima_inode_removexattr()/setxattr()
        functions.  (Moved ima_inode_removexattr()/setxattr() to ima_appraise.c)
      
      Changelog:
        - take i_mutex to fix locking (Dmitry Kasatkin)
        - ima_reset_appraise_flags should only be called when modifying or
          removing the 'security.ima' xattr. Requires CAP_SYS_ADMIN privilege.
          (Incorporated fix from Roberto Sassu)
        - Even if allowed to update security.ima, reset the appraisal flags,
          forcing re-appraisal.
        - Replace CAP_MAC_ADMIN with CAP_SYS_ADMIN
        - static inline ima_inode_setxattr()/ima_inode_removexattr() stubs
        - ima_protect_xattr should be static
      Signed-off-by: NMimi Zohar <zohar@us.ibm.com>
      Signed-off-by: NDmitry Kasatkin <dmitry.kasatkin@intel.com>
      42c63330
  5. 06 9月, 2012 1 次提交
  6. 03 7月, 2012 1 次提交
    • P
      security: Fix nommu build. · 75331a59
      Paul Mundt 提交于
      The security + nommu configuration presently blows up with an undefined
      reference to BDI_CAP_EXEC_MAP:
      
      security/security.c: In function 'mmap_prot':
      security/security.c:687:36: error: dereferencing pointer to incomplete type
      security/security.c:688:16: error: 'BDI_CAP_EXEC_MAP' undeclared (first use in this function)
      security/security.c:688:16: note: each undeclared identifier is reported only once for each function it appears in
      
      include backing-dev.h directly to fix it up.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: NJames Morris <james.l.morris@oracle.com>
      75331a59
  7. 02 7月, 2012 1 次提交
    • P
      security: Fix nommu build. · 659b5e76
      Paul Mundt 提交于
      The security + nommu configuration presently blows up with an undefined
      reference to BDI_CAP_EXEC_MAP:
      
      security/security.c: In function 'mmap_prot':
      security/security.c:687:36: error: dereferencing pointer to incomplete type
      security/security.c:688:16: error: 'BDI_CAP_EXEC_MAP' undeclared (first use in this function)
      security/security.c:688:16: note: each undeclared identifier is reported only once for each function it appears in
      
      include backing-dev.h directly to fix it up.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: NJames Morris <james.l.morris@oracle.com>
      659b5e76
  8. 01 6月, 2012 3 次提交
  9. 10 4月, 2012 1 次提交
  10. 14 2月, 2012 2 次提交
  11. 10 2月, 2012 1 次提交
  12. 07 1月, 2012 1 次提交
  13. 06 1月, 2012 5 次提交
    • E
      security: remove the security_netlink_recv hook as it is equivalent to capable() · fd778461
      Eric Paris 提交于
      Once upon a time netlink was not sync and we had to get the effective
      capabilities from the skb that was being received.  Today we instead get
      the capabilities from the current task.  This has rendered the entire
      purpose of the hook moot as it is now functionally equivalent to the
      capable() call.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      fd778461
    • E
      capabilities: remove all _real_ interfaces · 2920a840
      Eric Paris 提交于
      The name security_real_capable and security_real_capable_noaudit just don't
      make much sense to me.  Convert them to use security_capable and
      security_capable_noaudit.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Acked-by: NSerge E. Hallyn <serge.hallyn@canonical.com>
      2920a840
    • E
      capabilities: introduce security_capable_noaudit · c7eba4a9
      Eric Paris 提交于
      Exactly like security_capable except don't audit any denials.  This is for
      places where the kernel may make decisions about what to do if a task has a
      given capability, but which failing that capability is not a sign of a
      security policy violation.  An example is checking if a task has
      CAP_SYS_ADMIN to lower it's likelyhood of being killed by the oom killer.
      This check is not a security violation if it is denied.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Acked-by: NSerge E. Hallyn <serge.hallyn@canonical.com>
      c7eba4a9
    • E
      capabilities: reverse arguments to security_capable · b7e724d3
      Eric Paris 提交于
      security_capable takes ns, cred, cap.  But the LSM capable() hook takes
      cred, ns, cap.  The capability helper functions also take cred, ns, cap.
      Rather than flip argument order just to flip it back, leave them alone.
      Heck, this should be a little faster since argument will be in the right
      place!
      Signed-off-by: NEric Paris <eparis@redhat.com>
      b7e724d3
    • E
      capabilities: remove the task from capable LSM hook entirely · 6a9de491
      Eric Paris 提交于
      The capabilities framework is based around credentials, not necessarily the
      current task.  Yet we still passed the current task down into LSMs from the
      security_capable() LSM hook as if it was a meaningful portion of the security
      decision.  This patch removes the 'generic' passing of current and instead
      forces individual LSMs to use current explicitly if they think it is
      appropriate.  In our case those LSMs are SELinux and AppArmor.
      
      I believe the AppArmor use of current is incorrect, but that is wholely
      unrelated to this patch.  This patch does not change what AppArmor does, it
      just makes it clear in the AppArmor code that it is doing it.
      
      The SELinux code still uses current in it's audit message, which may also be
      wrong and needs further investigation.  Again this is NOT a change, it may
      have always been wrong, this patch just makes it clear what is happening.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      6a9de491
  14. 04 1月, 2012 7 次提交
  15. 19 10月, 2011 1 次提交
  16. 15 9月, 2011 1 次提交
  17. 10 9月, 2011 1 次提交
  18. 20 7月, 2011 2 次提交
  19. 19 7月, 2011 5 次提交
  20. 25 4月, 2011 1 次提交
    • A
      SECURITY: Move exec_permission RCU checks into security modules · 1c990429
      Andi Kleen 提交于
      Right now all RCU walks fall back to reference walk when CONFIG_SECURITY
      is enabled, even though just the standard capability module is active.
      This is because security_inode_exec_permission unconditionally fails
      RCU walks.
      
      Move this decision to the low level security module. This requires
      passing the RCU flags down the security hook. This way at least
      the capability module and a few easy cases in selinux/smack work
      with RCU walks with CONFIG_SECURITY=y
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NEric Paris <eparis@redhat.com>
      1c990429
  21. 23 4月, 2011 1 次提交