1. 06 2月, 2013 2 次提交
    • D
      ima: add policy support for file system uuid · 85865c1f
      Dmitry Kasatkin 提交于
      The IMA policy permits specifying rules to enable or disable
      measurement/appraisal/audit based on the file system magic number.
      If, for example, the policy contains an ext4 measurement rule,
      the rule is enabled for all ext4 partitions.
      
      Sometimes it might be necessary to enable measurement/appraisal/audit
      only for one partition and disable it for another partition of the
      same type.  With the existing IMA policy syntax, this can not be done.
      
      This patch provides support for IMA policy rules to specify the file
      system by its UUID (eg. fsuuid=397449cd-687d-4145-8698-7fed4a3e0363).
      
      For partitions not being appraised, it might be a good idea to mount
      file systems with the 'noexec' option to prevent executing non-verified
      binaries.
      Signed-off-by: NDmitry Kasatkin <dmitry.kasatkin@intel.com>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      85865c1f
    • D
      evm: add file system uuid to EVM hmac · 74de6684
      Dmitry Kasatkin 提交于
      EVM uses the same key for all file systems to calculate the HMAC,
      making it possible to paste inodes from one file system on to another
      one, without EVM being able to detect it.  To prevent such an attack,
      it is necessary to make the EVM HMAC file system specific.
      
      This patch uses the file system UUID, a file system unique identifier,
      to bind the EVM HMAC to the file system. The value inode->i_sb->s_uuid
      is used for the HMAC hash calculation, instead of using it for deriving
      the file system specific key.  Initializing the key for every inode HMAC
      calculation is a bit more expensive operation than adding the uuid to
      the HMAC hash.
      
      Changing the HMAC calculation method or adding additional info to the
      calculation, requires existing EVM labeled file systems to be relabeled.
      This patch adds a Kconfig HMAC version option for backwards compatability.
      
      Changelog v1:
      - squash "hmac version setting"
      Changelog v0:
      - add missing Kconfig depends (Mimi)
      Signed-off-by: NDmitry Kasatkin <dmitry.kasatkin@intel.com>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      74de6684
  2. 23 1月, 2013 4 次提交
  3. 17 1月, 2013 9 次提交
  4. 21 12月, 2012 1 次提交
  5. 16 12月, 2012 1 次提交
  6. 15 12月, 2012 3 次提交
    • E
      Fix cap_capable to only allow owners in the parent user namespace to have caps. · 520d9eab
      Eric W. Biederman 提交于
      Andy Lutomirski pointed out that the current behavior of allowing the
      owner of a user namespace to have all caps when that owner is not in a
      parent user namespace is wrong.  Add a test to ensure the owner of a user
      namespace is in the parent of the user namespace to fix this bug.
      
      Thankfully this bug did not apply to the initial user namespace, keeping
      the mischief that can be caused by this bug quite small.
      
      This is bug was introduced in v3.5 by commit 783291e6
      "Simplify the user_namespace by making userns->creator a kuid."
      But did not matter until the permisions required to create
      a user namespace were relaxed allowing a user namespace to be created
      inside of a user namespace.
      
      The bug made it possible for the owner of a user namespace to be
      present in a child user namespace.  Since the owner of a user nameapce
      is granted all capabilities it became possible for users in a
      grandchild user namespace to have all privilges over their parent user
      namspace.
      
      Reorder the checks in cap_capable.  This should make the common case
      faster and make it clear that nothing magic happens in the initial
      user namespace.  The reordering is safe because cred->user_ns
      can only be in targ_ns or targ_ns->parent but not both.
      
      Add a comment a the top of the loop to make the logic of
      the code clear.
      
      Add a distinct variable ns that changes as we walk up
      the user namespace hierarchy to make it clear which variable
      is changing.
      Acked-by: NSerge Hallyn <serge.hallyn@canonical.com>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      520d9eab
    • C
      Smack: create a sysfs mount point for smackfs · e9307237
      Casey Schaufler 提交于
      There are a number of "conventions" for where to put LSM filesystems.
      Smack adheres to none of them. Create a mount point at /sys/fs/smackfs
      for mounting smackfs so that Smack can be conventional.
      
      Targeted for git://git.gitorious.org/smack-next/kernel.gitSigned-off-by: NCasey Schaufler <casey@schaufler-ca.com>
      e9307237
    • C
      Smack: use select not depends in Kconfig · 111fe8bd
      Casey Schaufler 提交于
      The components NETLABEL and SECURITY_NETWORK are required by
      Smack. Using "depends" in Kconfig hides the Smack option
      if the user hasn't figured out that they need to be enabled
      while using make menuconfig. Using select is a better choice.
      Because select is not recursive depends on NET and SECURITY
      are added. The reflects similar usage in TOMOYO and AppArmor.
      
      Targeted for git://git.gitorious.org/smack-next/kernel.gitSigned-off-by: NCasey Schaufler <casey@schaufler-ca.com>
      111fe8bd
  7. 14 12月, 2012 2 次提交
  8. 11 12月, 2012 1 次提交
  9. 08 12月, 2012 1 次提交
    • C
      bridge: export multicast database via netlink · ee07c6e7
      Cong Wang 提交于
      V5: fix two bugs pointed out by Thomas
          remove seq check for now, mark it as TODO
      
      V4: remove some useless #include
          some coding style fix
      
      V3: drop debugging printk's
          update selinux perm table as well
      
      V2: drop patch 1/2, export ifindex directly
          Redesign netlink attributes
          Improve netlink seq check
          Handle IPv6 addr as well
      
      This patch exports bridge multicast database via netlink
      message type RTM_GETMDB. Similar to fdb, but currently bridge-specific.
      We may need to support modify multicast database too (RTM_{ADD,DEL}MDB).
      
      (Thanks to Thomas for patient reviews)
      
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Stephen Hemminger <shemminger@vyatta.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Thomas Graf <tgraf@suug.ch>
      Cc: Jesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Acked-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ee07c6e7
  10. 21 11月, 2012 3 次提交
  11. 20 11月, 2012 2 次提交
  12. 07 11月, 2012 2 次提交
    • T
      device_cgroup: add lockdep asserts · 4b1c7840
      Tejun Heo 提交于
      device_cgroup uses RCU safe ->exceptions list which is write-protected
      by devcgroup_mutex and has had some issues using locking correctly.
      Add lockdep asserts to utility functions so that future errors can be
      easily detected.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NSerge E. Hallyn <serge.hallyn@ubuntu.com>
      Cc: Aristeu Rozanski <aris@redhat.com>
      Cc: Li Zefan <lizefan@huawei.com>
      4b1c7840
    • T
      device_cgroup: fix RCU usage · 201e72ac
      Tejun Heo 提交于
      dev_cgroup->exceptions is protected with devcgroup_mutex for writes
      and RCU for reads; however, RCU usage isn't correct.
      
      * dev_exception_clean() doesn't use RCU variant of list_del() and
        kfree().  The function can race with may_access() and may_access()
        may end up dereferencing already freed memory.  Use list_del_rcu()
        and kfree_rcu() instead.
      
      * may_access() may be called only with RCU read locked but doesn't use
        RCU safe traversal over ->exceptions.  Use list_for_each_entry_rcu().
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NSerge E. Hallyn <serge.hallyn@ubuntu.com>
      Cc: stable@vger.kernel.org
      Cc: Aristeu Rozanski <aris@redhat.com>
      Cc: Li Zefan <lizefan@huawei.com>
      201e72ac
  13. 06 11月, 2012 1 次提交
  14. 26 10月, 2012 5 次提交
  15. 24 10月, 2012 1 次提交
  16. 18 10月, 2012 1 次提交
  17. 17 10月, 2012 1 次提交
    • A
      fix a leak in replace_fd() users · 45525b26
      Al Viro 提交于
      replace_fd() began with "eats a reference, tries to insert into
      descriptor table" semantics; at some point I'd switched it to
      much saner current behaviour ("try to insert into descriptor
      table, grabbing a new reference if inserted; caller should do
      fput() in any case"), but forgot to update the callers.
      Mea culpa...
      
      [Spotted by Pavel Roskin, who has really weird system with pipe-fed
      coredumps as part of what he considers a normal boot ;-)]
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      45525b26