1. 06 2月, 2014 1 次提交
  2. 24 12月, 2013 2 次提交
  3. 17 12月, 2013 2 次提交
  4. 16 12月, 2013 1 次提交
  5. 14 12月, 2013 1 次提交
    • P
      selinux: revert 102aefdd · 4d546f81
      Paul Moore 提交于
      Revert "selinux: consider filesystem subtype in policies"
      
      This reverts commit 102aefdd.
      
      Explanation from Eric Paris:
      
      	SELinux policy can specify if it should use a filesystem's
      	xattrs or not.  In current policy we have a specification that
      	fuse should not use xattrs but fuse.glusterfs should use
      	xattrs.  This patch has a bug in which non-glusterfs
      	filesystems would match the rule saying fuse.glusterfs should
      	use xattrs.  If both fuse and the particular filesystem in
      	question are not written to handle xattr calls during the mount
      	command, they will deadlock.
      
      	I have fixed the bug to do proper matching, however I believe a
      	revert is still the correct solution.  The reason I believe
      	that is because the code still does not work.  The s_subtype is
      	not set until after the SELinux hook which attempts to match on
      	the ".gluster" portion of the rule.  So we cannot match on the
      	rule in question.  The code is useless.
      Signed-off-by: NPaul Moore <pmoore@redhat.com>
      4d546f81
  6. 13 12月, 2013 4 次提交
  7. 12 12月, 2013 1 次提交
  8. 11 12月, 2013 1 次提交
  9. 10 12月, 2013 1 次提交
  10. 05 12月, 2013 3 次提交
    • P
      selinux: pull address family directly from the request_sock struct · 0b1f24e6
      Paul Moore 提交于
      We don't need to inspect the packet to determine if the packet is an
      IPv4 packet arriving on an IPv6 socket when we can query the
      request_sock directly.
      Signed-off-by: NPaul Moore <pmoore@redhat.com>
      0b1f24e6
    • P
      selinux: handle TCP SYN-ACK packets correctly in selinux_ip_postroute() · 7f721643
      Paul Moore 提交于
      In selinux_ip_postroute() we perform access checks based on the
      packet's security label.  For locally generated traffic we get the
      packet's security label from the associated socket; this works in all
      cases except for TCP SYN-ACK packets.  In the case of SYN-ACK packet's
      the correct security label is stored in the connection's request_sock,
      not the server's socket.  Unfortunately, at the point in time when
      selinux_ip_postroute() is called we can't query the request_sock
      directly, we need to recreate the label using the same logic that
      originally labeled the associated request_sock.
      
      See the inline comments for more explanation.
      Reported-by: NJanak Desai <Janak.Desai@gtri.gatech.edu>
      Tested-by: NJanak Desai <Janak.Desai@gtri.gatech.edu>
      Cc: stable@vger.kernel.org
      Signed-off-by: NPaul Moore <pmoore@redhat.com>
      7f721643
    • P
      selinux: handle TCP SYN-ACK packets correctly in selinux_ip_output() · da2ea0d0
      Paul Moore 提交于
      In selinux_ip_output() we always label packets based on the parent
      socket.  While this approach works in almost all cases, it doesn't
      work in the case of TCP SYN-ACK packets when the correct label is not
      the label of the parent socket, but rather the label of the larval
      socket represented by the request_sock struct.
      
      Unfortunately, since the request_sock isn't queued on the parent
      socket until *after* the SYN-ACK packet is sent, we can't lookup the
      request_sock to determine the correct label for the packet; at this
      point in time the best we can do is simply pass/NF_ACCEPT the packet.
      It must be said that simply passing the packet without any explicit
      labeling action, while far from ideal, is not terrible as the SYN-ACK
      packet will inherit any IP option based labeling from the initial
      connection request so the label *should* be correct and all our
      access controls remain in place so we shouldn't have to worry about
      information leaks.
      Reported-by: NJanak Desai <Janak.Desai@gtri.gatech.edu>
      Tested-by: NJanak Desai <Janak.Desai@gtri.gatech.edu>
      Cc: stable@vger.kernel.org
      Signed-off-by: NPaul Moore <pmoore@redhat.com>
      da2ea0d0
  11. 14 10月, 2013 1 次提交
  12. 05 10月, 2013 2 次提交
  13. 01 10月, 2013 1 次提交
  14. 29 8月, 2013 2 次提交
    • E
      Revert "SELinux: do not handle seclabel as a special flag" · 0b4bdb35
      Eric Paris 提交于
      This reverts commit 308ab70c.
      
      It breaks my FC6 test box.  /dev/pts is not mounted.  dmesg says
      
      SELinux: mount invalid.  Same superblock, different security settings
      for (dev devpts, type devpts)
      
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NEric Paris <eparis@redhat.com>
      0b4bdb35
    • A
      selinux: consider filesystem subtype in policies · 102aefdd
      Anand Avati 提交于
      Not considering sub filesystem has the following limitation. Support
      for SELinux in FUSE is dependent on the particular userspace
      filesystem, which is identified by the subtype. For e.g, GlusterFS,
      a FUSE based filesystem supports SELinux (by mounting and processing
      FUSE requests in different threads, avoiding the mount time
      deadlock), whereas other FUSE based filesystems (identified by a
      different subtype) have the mount time deadlock.
      
      By considering the subtype of the filesytem in the SELinux policies,
      allows us to specify a filesystem subtype, in the following way:
      
      fs_use_xattr fuse.glusterfs gen_context(system_u:object_r:fs_t,s0);
      
      This way not all FUSE filesystems are put in the same bucket and
      subjected to the limitations of the other subtypes.
      Signed-off-by: NAnand Avati <avati@redhat.com>
      Signed-off-by: NEric Paris <eparis@redhat.com>
      102aefdd
  15. 26 7月, 2013 12 次提交
  16. 25 7月, 2013 1 次提交
  17. 29 6月, 2013 1 次提交
    • D
      SELinux: Institute file_path_has_perm() · 13f8e981
      David Howells 提交于
      Create a file_path_has_perm() function that is like path_has_perm() but
      instead takes a file struct that is the source of both the path and the
      inode (rather than getting the inode from the dentry in the path).  This
      is then used where appropriate.
      
      This will be useful for situations like unionmount where it will be
      possible to have an apparently-negative dentry (eg. a fallthrough) that is
      open with the file struct pointing to an inode on the lower fs.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      13f8e981
  18. 09 6月, 2013 3 次提交