1. 16 11月, 2010 5 次提交
  2. 13 11月, 2010 9 次提交
  3. 12 11月, 2010 3 次提交
  4. 11 11月, 2010 8 次提交
    • D
      tcp: Increase TCP_MAXSEG socket option minimum. · 7a1abd08
      David S. Miller 提交于
      As noted by Steve Chen, since commit
      f5fff5dc ("tcp: advertise MSS
      requested by user") we can end up with a situation where
      tcp_select_initial_window() does a divide by a zero (or
      even negative) mss value.
      
      The problem is that sometimes we effectively subtract
      TCPOLEN_TSTAMP_ALIGNED and/or TCPOLEN_MD5SIG_ALIGNED from the mss.
      
      Fix this by increasing the minimum from 8 to 64.
      Reported-by: NSteve Chen <schen@mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7a1abd08
    • G
      dccp ccid-2: Implementation of circular Ack Vector buffer with overflow handling · b3d14bff
      Gerrit Renker 提交于
      This completes the implementation of a circular buffer for Ack Vectors, by
      extending the current (linear array-based) implementation.  The changes are:
      
       (a) An `overflow' flag to deal with the case of overflow. As before, dynamic
           growth of the buffer will not be supported; but code will be added to deal
           robustly with overflowing Ack Vector buffers.
      
       (b) A `tail_seqno' field. When naively implementing the algorithm of Appendix A
           in RFC 4340, problems arise whenever subsequent Ack Vector records overlap,
           which can bring the entire run length calculation completely out of synch.
           (This is documented on http://www.erg.abdn.ac.uk/users/gerrit/dccp/notes/\
                                                   ack_vectors/tracking_tail_ackno/ .)
       (c) The buffer length is now computed dynamically (i.e. current fill level),
           as the span between head to tail.
      
      As a result, dccp_ackvec_pending() is now simpler - the #ifdef is no longer
      necessary since buf_empty is always true when IP_DCCP_ACKVEC is not configured.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      b3d14bff
    • G
      dccp ccid-2: Separate internals of Ack Vectors from option-parsing code · 7d870936
      Gerrit Renker 提交于
      This patch
       * separates Ack Vector housekeeping code from option-insertion code;
       * shifts option-specific code from ackvec.c into options.c;
       * introduces a dedicated routine to take care of the Ack Vector records;
       * simplifies the dccp_ackvec_insert_avr() routine: the BUG_ON was redundant,
         since the list is automatically arranged in descending order of ack_seqno.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      7d870936
    • G
      dccp ccid-2: Ack Vector interface clean-up · f17a37c9
      Gerrit Renker 提交于
      This patch brings the Ack Vector interface up to date. Its main purpose is
      to lay the basis for the subsequent patches of this set, which will use the
      new data structure fields and routines.
      
      There are no real algorithmic changes, rather an adaptation:
      
       (1) Replaced the static Ack Vector size (2) with a #define so that it can
           be adapted (with low loss / Ack Ratio, a value of 1 works, so 2 seems
           to be sufficient for the moment) and added a solution so that computing
           the ECN nonce will continue to work - even with larger Ack Vectors.
      
       (2) Replaced the #defines for Ack Vector states with a complete enum.
      
       (3) Replaced #defines to compute Ack Vector length and state with general
           purpose routines (inlines), and updated code to use these.
      
       (4) Added a `tail' field (conversion to circular buffer in subsequent patch).
      
       (5) Updated the (outdated) documentation for Ack Vector struct.
      
       (6) All sequence number containers now trimmed to 48 bits.
      
       (7) Removal of unused bits:
           * removed dccpav_ack_nonce from struct dccp_ackvec, since this is already
             redundantly stored in the `dccpavr_ack_nonce' (of Ack Vector record);
           * removed Elapsed Time for Ack Vectors (it was nowhere used);
           * replaced semantics of dccpavr_sent_len with dccpavr_ack_runlen, since
             the code needs to be able to remember the old run length;
           * reduced the de-/allocation routines (redundant / duplicate tests).
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      f17a37c9
    • E
      net: avoid limits overflow · 8d987e5c
      Eric Dumazet 提交于
      Robin Holt tried to boot a 16TB machine and found some limits were
      reached : sysctl_tcp_mem[2], sysctl_udp_mem[2]
      
      We can switch infrastructure to use long "instead" of "int", now
      atomic_long_t primitives are available for free.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Reported-by: NRobin Holt <holt@sgi.com>
      Reviewed-by: NRobin Holt <holt@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d987e5c
    • V
      net: packet: fix information leak to userland · 67286640
      Vasiliy Kulikov 提交于
      packet_getname_spkt() doesn't initialize all members of sa_data field of
      sockaddr struct if strlen(dev->name) < 13.  This structure is then copied
      to userland.  It leads to leaking of contents of kernel stack memory.
      We have to fully fill sa_data with strncpy() instead of strlcpy().
      
      The same with packet_getname(): it doesn't initialize sll_pkttype field of
      sockaddr_ll.  Set it to zero.
      Signed-off-by: NVasiliy Kulikov <segooon@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67286640
    • D
      filter: make sure filters dont read uninitialized memory · 57fe93b3
      David S. Miller 提交于
      There is a possibility malicious users can get limited information about
      uninitialized stack mem array. Even if sk_run_filter() result is bound
      to packet length (0 .. 65535), we could imagine this can be used by
      hostile user.
      
      Initializing mem[] array, like Dan Rosenberg suggested in his patch is
      expensive since most filters dont even use this array.
      
      Its hard to make the filter validation in sk_chk_filter(), because of
      the jumps. This might be done later.
      
      In this patch, I use a bitmap (a single long var) so that only filters
      using mem[] loads/stores pay the price of added security checks.
      
      For other filters, additional cost is a single instruction.
      
      [ Since we access fentry->k a lot now, cache it in a local variable
        and mark filter entry pointer as const. -DaveM ]
      Reported-by: NDan Rosenberg <drosenberg@vsecurity.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      57fe93b3
    • V
      net: ax25: fix information leak to userland · fe10ae53
      Vasiliy Kulikov 提交于
      Sometimes ax25_getname() doesn't initialize all members of fsa_digipeater
      field of fsa struct, also the struct has padding bytes between
      sax25_call and sax25_ndigis fields.  This structure is then copied to
      userland.  It leads to leaking of contents of kernel stack memory.
      Signed-off-by: NVasiliy Kulikov <segooon@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe10ae53
  5. 10 11月, 2010 5 次提交
  6. 09 11月, 2010 10 次提交