1. 04 1月, 2006 5 次提交
    • A
    • A
    • A
    • H
      [IPV4]: Safer reassembly · 89cee8b1
      Herbert Xu 提交于
      Another spin of Herbert Xu's "safer ip reassembly" patch
      for 2.6.16.
      
      (The original patch is here:
      http://marc.theaimsgroup.com/?l=linux-netdev&m=112281936522415&w=2
      and my only contribution is to have tested it.)
      
      This patch (optionally) does additional checks before accepting IP
      fragments, which can greatly reduce the possibility of reassembling
      fragments which originated from different IP datagrams.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NArthur Kepner <akepner@sgi.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      89cee8b1
    • T
      [LSM-IPSec]: Security association restriction. · df71837d
      Trent Jaeger 提交于
      This patch series implements per packet access control via the
      extension of the Linux Security Modules (LSM) interface by hooks in
      the XFRM and pfkey subsystems that leverage IPSec security
      associations to label packets.  Extensions to the SELinux LSM are
      included that leverage the patch for this purpose.
      
      This patch implements the changes necessary to the XFRM subsystem,
      pfkey interface, ipv4/ipv6, and xfrm_user interface to restrict a
      socket to use only authorized security associations (or no security
      association) to send/receive network packets.
      
      Patch purpose:
      
      The patch is designed to enable access control per packets based on
      the strongly authenticated IPSec security association.  Such access
      controls augment the existing ones based on network interface and IP
      address.  The former are very coarse-grained, and the latter can be
      spoofed.  By using IPSec, the system can control access to remote
      hosts based on cryptographic keys generated using the IPSec mechanism.
      This enables access control on a per-machine basis or per-application
      if the remote machine is running the same mechanism and trusted to
      enforce the access control policy.
      
      Patch design approach:
      
      The overall approach is that policy (xfrm_policy) entries set by
      user-level programs (e.g., setkey for ipsec-tools) are extended with a
      security context that is used at policy selection time in the XFRM
      subsystem to restrict the sockets that can send/receive packets via
      security associations (xfrm_states) that are built from those
      policies.
      
      A presentation available at
      www.selinux-symposium.org/2005/presentations/session2/2-3-jaeger.pdf
      from the SELinux symposium describes the overall approach.
      
      Patch implementation details:
      
      On output, the policy retrieved (via xfrm_policy_lookup or
      xfrm_sk_policy_lookup) must be authorized for the security context of
      the socket and the same security context is required for resultant
      security association (retrieved or negotiated via racoon in
      ipsec-tools).  This is enforced in xfrm_state_find.
      
      On input, the policy retrieved must also be authorized for the socket
      (at __xfrm_policy_check), and the security context of the policy must
      also match the security association being used.
      
      The patch has virtually no impact on packets that do not use IPSec.
      The existing Netfilter (outgoing) and LSM rcv_skb hooks are used as
      before.
      
      Also, if IPSec is used without security contexts, the impact is
      minimal.  The LSM must allow such policies to be selected for the
      combination of socket and remote machine, but subsequent IPSec
      processing proceeds as in the original case.
      
      Testing:
      
      The pfkey interface is tested using the ipsec-tools.  ipsec-tools have
      been modified (a separate ipsec-tools patch is available for version
      0.5) that supports assignment of xfrm_policy entries and security
      associations with security contexts via setkey and the negotiation
      using the security contexts via racoon.
      
      The xfrm_user interface is tested via ad hoc programs that set
      security contexts.  These programs are also available from me, and
      contain programs for setting, getting, and deleting policy for testing
      this interface.  Testing of sa functions was done by tracing kernel
      behavior.
      Signed-off-by: NTrent Jaeger <tjaeger@cse.psu.edu>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df71837d
  2. 03 1月, 2006 1 次提交
    • D
      [PATCH] Avoid namespace pollution in <asm/param.h> · abe842eb
      Dag-Erling Smrgrav 提交于
      In commit 3D59121003721a8fad11ee72e646fd9d3076b5679c, the x86 and x86-64
      <asm/param.h> was changed to include <linux/config.h> for the
      configurable timer frequency.
      
      However, asm/param.h is sometimes used in userland (it is included
      indirectly from <sys/param.h>), so your commit pollutes the userland
      namespace with tons of CONFIG_FOO macros.  This greatly confuses
      software packages (such as BusyBox) which use CONFIG_FOO macros
      themselves to control the inclusion of optional features.
      
      After a short exchange, Christoph approved this patch
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      abe842eb
  3. 28 12月, 2005 1 次提交
    • D
      [IPV6] mcast: Fix multiple issues in MLDv2 reports. · 5ab4a6c8
      David L Stevens 提交于
      The below "jumbo" patch fixes the following problems in MLDv2.
      
      1) Add necessary "ntohs" to recent "pskb_may_pull" check [breaks
              all nonzero source queries on little-endian (!)]
      
      2) Add locking to source filter list [resend of prior patch]
      
      3) fix "mld_marksources()" to
              a) send nothing when all queried sources are excluded
              b) send full exclude report when source queried sources are
                      not excluded
              c) don't schedule a timer when there's nothing to report
      
      NOTE: RFC 3810 specifies the source list should be saved and each
        source reported individually as an IS_IN. This is an obvious DOS
        path, requiring the host to store and then multicast as many sources
        as are queried (e.g., millions...). This alternative sends a full, 
        relevant report that's limited to number of sources present on the
        machine.
      
      4) fix "add_grec()" to send empty-source records when it should
              The original check doesn't account for a non-empty source
              list with all sources inactive; the new code keeps that
              short-circuit case, and also generates the group header
              with an empty list if needed.
      
      5) fix mca_crcount decrement to be after add_grec(), which needs
              its original value
      
      These issues (other than item #1 ;-) ) were all found by Yan Zheng,
      much thanks!
      Signed-off-by: NDavid L Stevens <dlstevens@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5ab4a6c8
  4. 25 12月, 2005 3 次提交
  5. 23 12月, 2005 1 次提交
    • N
      [PATCH] fix race with preempt_enable() · d6f02913
      Nicolas Pitre 提交于
      Currently a simple
      
      	void foo(void) { preempt_enable(); }
      
      produces the following code on ARM:
      
      foo:
      	bic	r3, sp, #8128
      	bic	r3, r3, #63
      	ldr	r2, [r3, #4]
      	ldr	r1, [r3, #0]
      	sub	r2, r2, #1
      	tst	r1, #4
      	str	r2, [r3, #4]
      	blne	preempt_schedule
      	mov	pc, lr
      
      The problem is that the TIF_NEED_RESCHED flag is loaded _before_ the
      preemption count is stored back, hence any interrupt coming within that
      3 instruction window causing TIF_NEED_RESCHED to be set won't be
      seen and scheduling won't happen as it should.
      
      Nothing currently prevents gcc from performing that reordering.  There
      is already a barrier() before the decrement of the preemption count, but
      another one is needed between this and the TIF_NEED_RESCHED flag test
      for proper code ordering.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Acked-by: NNick Piggin <nickpiggin@yahoo.com.au>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d6f02913
  6. 22 12月, 2005 1 次提交
    • A
      [PATCH] include/linux/irq.h: #include <linux/smp.h> · 23f9b317
      Adrian Bunk 提交于
      Jan's crosscompile page [1] shows, that one regression in 2.6.15-rc is
      that the v850 defconfig does no longer compile.
      
      The compile error is:
      
      <--  snip  -->
      
      ...
        CC      arch/v850/kernel/setup.o
      In file included from /usr/src/ctest/rc/kernel/arch/v850/kernel/setup.c:17:
      /usr/src/ctest/rc/kernel/include/linux/irq.h:13:43: asm/smp.h: No such file or directory
      make[2]: *** [arch/v850/kernel/setup.o] Error 1
      
      <--  snip  -->
      
      The #include <asm/smp.h> in irq.h was intruduced in 2.6.15-rc.
      
      Since include/linux/irq.h needs code from asm/smp.h only in the
      CONFIG_SMP=y case and linux/smp.h #include's asm/smp.h only in the
      CONFIG_SMP=y case, I'm suggesting this patch to #include <linux/smp.h>
      in irq.h.
      
      I've tested the compilation with both CONFIG_SMP=y and CONFIG_SMP=n
      on i386.
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Acked-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      23f9b317
  7. 21 12月, 2005 4 次提交
  8. 20 12月, 2005 3 次提交
  9. 19 12月, 2005 2 次提交
  10. 17 12月, 2005 4 次提交
  11. 16 12月, 2005 3 次提交
  12. 15 12月, 2005 6 次提交
  13. 14 12月, 2005 2 次提交
  14. 13 12月, 2005 4 次提交