1. 26 6月, 2005 1 次提交
  2. 22 6月, 2005 1 次提交
  3. 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
  4. 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
  5. 21 5月, 2005 2 次提交
  6. 19 5月, 2005 1 次提交
  7. 18 5月, 2005 1 次提交
  8. 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
  9. 14 5月, 2005 1 次提交
  10. 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
  11. 06 5月, 2005 1 次提交
    • S
      The attached patch addresses the problem with getting the audit daemon · c2f0c7c3
      Steve Grubb 提交于
      shutdown credential information. It creates a new message type 
      AUDIT_TERM_INFO, which is used by the audit daemon to query who issued the 
      shutdown. 
      
      It requires the placement of a hook function that gathers the information. The 
      hook is after the DAC & MAC checks and before the function returns. Racing 
      threads could overwrite the uid & pid - but they would have to be root and 
      have policy that allows signalling the audit daemon. That should be a 
      manageable risk.
      
      The userspace component will be released later in audit 0.7.2. When it 
      receives the TERM signal, it queries the kernel for shutdown information. 
      When it receives it, it writes the message and exits. The message looks 
      like this:
      
      type=DAEMON msg=auditd(1114551182.000) auditd normal halt, sending pid=2650 
      uid=525, auditd pid=1685
      Signed-off-by: NSteve Grubb <sgrubb@redhat.com>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      c2f0c7c3
  12. 01 5月, 2005 2 次提交
    • J
      [PATCH] SELinux: add finer grained permissions to Netlink audit processing · b207a290
      James Morris 提交于
      This patch provides finer grained permissions for the audit family of
      Netlink sockets under SELinux.
      
      1.  We need a way to differentiate between privileged and unprivileged
         reads of kernel data maintained by the audit subsystem.  The AUDIT_GET
         operation is unprivileged: it returns the current status of the audit
         subsystem (e.g.  whether it's enabled etc.).  The AUDIT_LIST operation
         however returns a list of the current audit ruleset, which is considered
         privileged by the audit folk.  To deal with this, a new SELinux
         permission has been implemented and applied to the operation:
         nlmsg_readpriv, which can be allocated to appropriately privileged
         domains.  Unprivileged domains would only be allocated nlmsg_read.
      
      2.  There is a requirement for certain domains to generate audit events
         from userspace.  These events need to be collected by the kernel,
         collated and transmitted sequentially back to the audit daemon.  An
         example is user level login, an auditable event under CAPP, where
         login-related domains generate AUDIT_USER messages via PAM which are
         relayed back to auditd via the kernel.  To prevent handing out
         nlmsg_write permissions to such domains, a new permission has been
         added, nlmsg_relay, which is intended for this type of purpose: data is
         passed via the kernel back to userspace but no privileged information is
         written to the kernel.
      
      Also, AUDIT_LOGIN messages are now valid only for kernel->user messaging,
      so this value has been removed from the SELinux nlmsgtab (which is only
      used to check user->kernel messages).
      Signed-off-by: NJames Morris <jmorris@redhat.com>
      Signed-off-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b207a290
    • S
      [PATCH] SELinux: cleanup ipc_has_perm · 6af963f1
      Stephen Smalley 提交于
      This patch removes the sclass argument from ipc_has_perm in the SELinux
      module, as it can be obtained from the ipc security structure.  The use of
      a separate argument was a legacy of the older precondition function
      handling in SELinux and is obsolete.  Please apply.
      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>
      6af963f1
  13. 25 4月, 2005 1 次提交
    • H
      [SELINUX]: Fix ipv6_skip_exthdr() invocation causing OOPS. · 0d3d077c
      Herbert Xu 提交于
      The SELinux hooks invoke ipv6_skip_exthdr() with an incorrect
      length final argument.  However, the length argument turns out
      to be superfluous.
      
      I was just reading ipv6_skip_exthdr and it occured to me that we can
      get rid of len altogether.  The only place where len is used is to
      check whether the skb has two bytes for ipv6_opt_hdr.  This check
      is done by skb_header_pointer/skb_copy_bits anyway.
      
      Now it might appear that we've made the code slower by deferring
      the check to skb_copy_bits.  However, this check should not trigger
      in the common case so this is OK.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d3d077c
  14. 19 4月, 2005 1 次提交
    • S
      [PATCH] SELinux: fix deadlock on dcache lock · 219f0817
      Stephen Smalley 提交于
      This fixes a deadlock on the dcache lock detected during testing at IBM
      by moving the logging of the current executable information from the
      SELinux avc_audit function to audit_log_exit (via an audit_log_task_info
      helper) for processing upon syscall exit. 
      
      For consistency, the patch also removes the logging of other
      task-related information from avc_audit, deferring handling to
      audit_log_exit instead. 
      
      This allows simplification of the avc_audit code, allows the exe
      information to be obtained more reliably, always includes the comm
      information (useful for scripts), and avoids including bogus task
      information for checks performed from irq or softirq. 
      Signed-off-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      219f0817
  15. 17 4月, 2005 3 次提交