1. 31 10月, 2005 6 次提交
  2. 28 10月, 2005 1 次提交
  3. 24 10月, 2005 2 次提交
  4. 01 10月, 2005 1 次提交
    • J
      [PATCH] SELinux - fix SCTP socket bug and general IP protocol handling · 13402580
      James Morris 提交于
      The following patch updates the way SELinux classifies and handles IP
      based protocols.
      
      Currently, IP sockets are classified by SELinux as being either TCP, UDP
      or 'Raw', the latter being a default for IP socket that is not TCP or UDP.
      
      The classification code is out of date and uses only the socket type
      parameter to socket(2) to determine the class of IP socket.  So, any
      socket created with SOCK_STREAM will be classified by SELinux as TCP, and
      SOCK_DGRAM as UDP.  Also, other socket types such as SOCK_SEQPACKET and
      SOCK_DCCP are currently ignored by SELinux, which classifies them as
      generic sockets, which means they don't even get basic IP level checking.
      
      This patch changes the SELinux IP socket classification logic, so that
      only an IPPROTO_IP protocol value passed to socket(2) classify the socket
      as TCP or UDP.  The patch also drops the check for SOCK_RAW and converts
      it into a default, so that socket types like SOCK_DCCP and SOCK_SEQPACKET
      are classified as SECCLASS_RAWIP_SOCKET (instead of generic sockets).
      
      Note that protocol-specific support for SCTP, DCCP etc. is not addressed
      here, we're just getting these protocols checked at the IP layer.
      
      This fixes a reported problem where SCTP sockets were being recognized as
      generic SELinux sockets yet still being passed in one case to an IP level
      check, which then fails for generic sockets.
      
      It will also fix bugs where any SOCK_STREAM socket is classified as TCP or
      any SOCK_DGRAM socket is classified as UDP.
      
      This patch also unifies the way IP sockets classes are determined in
      selinux_socket_bind(), so we use the already calculated value instead of
      trying to recalculate it.
      Signed-off-by: NJames Morris <jmorris@namei.org>
      Signed-off-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      13402580
  5. 10 9月, 2005 6 次提交
  6. 05 9月, 2005 2 次提交
  7. 30 8月, 2005 5 次提交
  8. 29 7月, 2005 1 次提交
  9. 28 7月, 2005 1 次提交
    • J
      [PATCH] SELinux: default labeling of MLS field · f5c1d5b2
      James Morris 提交于
      Implement kernel labeling of the MLS (multilevel security) field of
      security contexts for files which have no existing MLS field.  This is to
      enable upgrades of a system from non-MLS to MLS without performing a full
      filesystem relabel including all of the mountpoints, which would be quite
      painful for users.
      
      With this patch, with MLS enabled, if a file has no MLS field, the kernel
      internally adds an MLS field to the in-core inode (but not to the on-disk
      file).  This MLS field added is the default for the superblock, allowing
      per-mountpoint control over the values via fixed policy or mount options.
      
      This patch has been tested by enabling MLS without relabeling its
      filesystem, and seems to be working correctly.
      Signed-off-by: NJames Morris <jmorris@redhat.com>
      Signed-off-by: NStephen Smalley <sds@epoch.ncsc.mil>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f5c1d5b2
  10. 30 6月, 2005 1 次提交
    • E
      [PATCH] selinux_sb_copy_data() should not require a whole page · 6931dfc9
      Eric Paris 提交于
      Currently selinux_sb_copy_data requires an entire page be allocated to
      *orig when the function is called.  This "requirement" is based on the fact
      that we call copy_page(in_save, nosec_save) and in_save = orig when the
      data is not FS_BINARY_MOUNTDATA.  This means that if a caller were to call
      do_kern_mount with only about 10 bytes of options, they would get passed
      here and then we would corrupt PAGE_SIZE - 10 bytes of memory (with all
      zeros.)
      
      Currently it appears all in kernel FS's use one page of data so this has
      not been a problem.  An out of kernel FS did just what is described above
      and it would almost always panic shortly after they tried to mount.  From
      looking else where in the kernel it is obvious that this string of data
      must always be null terminated.  (See example in do_mount where it always
      zeros the last byte.) Thus I suggest we use strcpy in place of copy_page.
      In this way we make sure the amount we copy is always less than or equal to
      the amount we received and since do_mount is zeroing the last byte this
      should be safe for all.
      Signed-off-by: NEric Paris <eparis@parisplace.org>
      Cc: Stephen Smalley <sds@epoch.ncsc.mil>
      Acked-by: NJames Morris <jmorris@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6931dfc9
  11. 26 6月, 2005 3 次提交
  12. 22 6月, 2005 2 次提交
  13. 19 6月, 2005 1 次提交
    • T
      [NETLINK]: Neighbour table configuration and statistics via rtnetlink · c7fb64db
      Thomas Graf 提交于
      To retrieve the neighbour tables send RTM_GETNEIGHTBL with the
      NLM_F_DUMP flag set. Every neighbour table configuration is
      spread over multiple messages to avoid running into message
      size limits on systems with many interfaces. The first message
      in the sequence transports all not device specific data such as
      statistics, configuration, and the default parameter set.
      This message is followed by 0..n messages carrying device
      specific parameter sets.
      
      Although the ordering should be sufficient, NDTA_NAME can be
      used to identify sequences. The initial message can be identified
      by checking for NDTA_CONFIG. The device specific messages do
      not contain this TLV but have NDTPA_IFINDEX set to the
      corresponding interface index.
      
      To change neighbour table attributes, send RTM_SETNEIGHTBL
      with NDTA_NAME set. Changeable attribute include NDTA_THRESH[1-3],
      NDTA_GC_INTERVAL, and all TLVs in NDTA_PARMS unless marked
      otherwise. Device specific parameter sets can be changed by
      setting NDTPA_IFINDEX to the interface index of the corresponding
      device.
      Signed-off-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c7fb64db
  14. 25 5月, 2005 1 次提交
    • S
      AUDIT: Fix remaining cases of direct logging of untrusted strings by avc_audit · 37ca5389
      Stephen Smalley 提交于
      Per Steve Grubb's observation that there are some remaining cases where
      avc_audit() directly logs untrusted strings without escaping them, here
      is a patch that changes avc_audit() to use audit_log_untrustedstring()
      or audit_log_hex() as appropriate.  Note that d_name.name is nul-
      terminated by d_alloc(), and that sun_path is nul-terminated by
      unix_mkname(), so it is not necessary for the AVC to create nul-
      terminated copies or to alter audit_log_untrustedstring to take a length
      argument.  In the case of an abstract name, we use audit_log_hex() with
      an explicit length.
      Signed-off-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      37ca5389
  15. 21 5月, 2005 2 次提交
  16. 19 5月, 2005 1 次提交
  17. 18 5月, 2005 1 次提交
  18. 17 5月, 2005 1 次提交
    • S
      [PATCH] selinux: fix avc_alloc_node() oom with no policy loaded · 4c443d1b
      Stephen Smalley 提交于
      This patch should fix the avc_alloc_node() oom condition that Andrew
      reported when no policy is loaded in SELinux.
      
      Prior to this patch, when no policy was loaded, the SELinux "security
      server" (policy engine) was only returning allowed decisions for the
      requested permissions for each access check.  This caused the cache to
      thrash when trying to use SELinux for real work with no policy loaded
      (typically, the no policy loaded state is only for bootstrapping to the
      point where we can load an initial policy).
      
      This patch changes the SELinux security server to return the complete
      allowed access vector at once, and then to reset the cache after the
      initial policy load to flush the initial cache state created during
      bootstrapping.
      Signed-off-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4c443d1b
  19. 14 5月, 2005 1 次提交
  20. 11 5月, 2005 1 次提交
    • C
      Add audit_log_type · c1b773d8
      Chris Wright 提交于
      Add audit_log_type to allow callers to specify type and pid when logging.
      Convert audit_log to wrapper around audit_log_type.  Could have
      converted all audit_log callers directly, but common case is default
      of type AUDIT_KERNEL and pid 0.  Update audit_log_start to take type
      and pid values when creating a new audit_buffer.  Move sequences that
      did audit_log_start, audit_log_format, audit_set_type, audit_log_end,
      to simply call audit_log_type directly.  This obsoletes audit_set_type
      and audit_set_pid, so remove them.
      Signed-off-by: NChris Wright <chrisw@osdl.org>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      c1b773d8