1. 09 12月, 2010 4 次提交
    • M
      l2tp: Fix modalias of l2tp_ip · e8d34a88
      Michal Marek 提交于
      Using the SOCK_DGRAM enum results in
      "net-pf-2-proto-SOCK_DGRAM-type-115", so use the numeric value like it
      is done in net/dccp.
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e8d34a88
    • N
      econet: Do the correct cleanup after an unprivileged SIOCSIFADDR. · 0c62fc6d
      Nelson Elhage 提交于
      We need to drop the mutex and do a dev_put, so set an error code and break like
      the other paths, instead of returning directly.
      Signed-off-by: NNelson Elhage <nelhage@ksplice.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c62fc6d
    • E
      llc: fix a device refcount imbalance · 35d9b0c9
      Eric Dumazet 提交于
      Le dimanche 05 décembre 2010 à 12:23 +0100, Eric Dumazet a écrit :
      > Le dimanche 05 décembre 2010 à 09:19 +0100, Eric Dumazet a écrit :
      >
      > > Hmm..
      > >
      > > If somebody can explain why RTNL is held in arp_ioctl() (and therefore
      > > in arp_req_delete()), we might first remove RTNL use in arp_ioctl() so
      > > that your patch can be applied.
      > >
      > > Right now it is not good, because RTNL wont be necessarly held when you
      > > are going to call arp_invalidate() ?
      >
      > While doing this analysis, I found a refcount bug in llc, I'll send a
      > patch for net-2.6
      
      Oh well, of course I must first fix the bug in net-2.6, and wait David
      pull the fix in net-next-2.6 before sending this rcu conversion.
      
      Note: this patch should be sent to stable teams (2.6.34 and up)
      
      [PATCH net-2.6] llc: fix a device refcount imbalance
      
      commit abf9d537 (llc: add support for SO_BINDTODEVICE) added one
      refcount imbalance in llc_ui_bind(), because dev_getbyhwaddr() doesnt
      take a reference on device, while dev_get_by_index() does.
      
      Fix this using RCU locking. And since an RCU conversion will be done for
      2.6.38 for dev_getbyhwaddr(), put the rcu_read_lock/unlock exactly at
      their final place.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Cc: stable@kernel.org
      Cc: Octavian Purdila <opurdila@ixiacom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      35d9b0c9
    • N
      tcp: Bug fix in initialization of receive window. · b1afde60
      Nandita Dukkipati 提交于
      The bug has to do with boundary checks on the initial receive window.
      If the initial receive window falls between init_cwnd and the
      receive window specified by the user, the initial window is incorrectly
      brought down to init_cwnd. The correct behavior is to allow it to
      remain unchanged.
      Signed-off-by: NNandita Dukkipati <nanditad@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b1afde60
  2. 07 12月, 2010 1 次提交
    • E
      filter: fix sk_filter rcu handling · 46bcf14f
      Eric Dumazet 提交于
      Pavel Emelyanov tried to fix a race between sk_filter_(de|at)tach and
      sk_clone() in commit 47e958ea
      
      Problem is we can have several clones sharing a common sk_filter, and
      these clones might want to sk_filter_attach() their own filters at the
      same time, and can overwrite old_filter->rcu, corrupting RCU queues.
      
      We can not use filter->rcu without being sure no other thread could do
      the same thing.
      
      Switch code to a more conventional ref-counting technique : Do the
      atomic decrement immediately and queue one rcu call back when last
      reference is released.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      46bcf14f
  3. 02 12月, 2010 2 次提交
  4. 01 12月, 2010 2 次提交
    • S
      mac80211: Fix STA disconnect due to MIC failure · 8e26d5ad
      Senthil Balasubramanian 提交于
      Th commit titled "mac80211: clean up rx handling wrt. found_sta"
      removed found_sta variable which caused a MIC failure event
      to be reported twice for a single failure to supplicant resulted
      in STA disconnect.
      
      This should fix WPA specific countermeasures WiFi test case (5.2.17)
      issues with mac80211 based drivers which report MIC failure events in
      rx status.
      
      Cc: Stable <stable@kernel.org> (2.6.37)
      Signed-off-by: NSenthil Balasubramanian <senthilkumar@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8e26d5ad
    • C
      mac80211: ignore non-bcast mcast deauth/disassoc franes · 2c31333a
      Christian Lamparter 提交于
      This patch fixes an curious issue due to insufficient
      rx frame filtering.
      
      Saqeb Akhter reported frequent disconnects while streaming
      videos over samba: <http://marc.info/?m=128600031109136>
      > [ 1166.512087] wlan1: deauthenticated from 30:46:9a:10:49:f7 (Reason: 7)
      > [ 1526.059997] wlan1: deauthenticated from 30:46:9a:10:49:f7 (Reason: 7)
      > [ 2125.324356] wlan1: deauthenticated from 30:46:9a:10:49:f7 (Reason: 7)
      > [...]
      
      The reason is that the device generates frames with slightly
      bogus SA/TA addresses.
      
      e.g.:
       [ 2314.402316] Ignore 9f:1f:31:f8:64:ff
       [ 2314.402321] Ignore 9f:1f:31:f8:64:ff
       [ 2352.453804] Ignore 0d:1f:31:f8:64:ff
       [ 2352.453808] Ignore 0d:1f:31:f8:64:ff
       					   ^^ the group-address flag is set!
       (the correct SA/TA would be: 00:1f:31:f8:64:ff)
      
      Since the AP does not know from where the frames come, it
      generates a DEAUTH response for the (invalid) mcast address.
      This mcast deauth frame then passes through all filters and
      tricks the stack into thinking that the AP brutally kicked
      us!
      
      This patch fixes the problem by simply ignoring
      non-broadcast, group-addressed deauth/disassoc frames.
      
      Cc: Jouni Malinen <j@w1.fi>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Reported-by: NSaqeb Akhter <saqeb.akhter@gmail.com>
      Signed-off-by: NChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2c31333a
  5. 30 11月, 2010 2 次提交
    • J
      mac80211: Fix frame injection using non-AP vif · 7dff3125
      Jouni Malinen 提交于
      In order for frame injection to work properly for some use cases
      (e.g., finding the station entry and keys for encryption), mac80211
      needs to find the correct sdata entry. This works when the main vif
      is in AP mode, but commit a2c1e3da
      broke this particular use case for station main vif. While this type of
      injection is quite unusual operation, it has some uses and we should fix
      it. Do this by changing the monitor vif sdata selection to allow station
      vif to be selected instead of limiting it to just AP vifs. We still need
      to skip some iftypes to avoid selecting unsuitable vif for injection.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7dff3125
    • E
      af_unix: limit recursion level · 25888e30
      Eric Dumazet 提交于
      Its easy to eat all kernel memory and trigger NMI watchdog, using an
      exploit program that queues unix sockets on top of others.
      
      lkml ref : http://lkml.org/lkml/2010/11/25/8
      
      This mechanism is used in applications, one choice we have is to have a
      recursion limit.
      
      Other limits might be needed as well (if we queue other types of files),
      since the passfd mechanism is currently limited by socket receive queue
      sizes only.
      
      Add a recursion_level to unix socket, allowing up to 4 levels.
      
      Each time we send an unix socket through sendfd mechanism, we copy its
      recursion level (plus one) to receiver. This recursion level is cleared
      when socket receive queue is emptied.
      Reported-by: NМарк Коренберг <socketpair@gmail.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25888e30
  6. 29 11月, 2010 4 次提交
  7. 28 11月, 2010 2 次提交
  8. 25 11月, 2010 5 次提交
  9. 23 11月, 2010 1 次提交
  10. 22 11月, 2010 2 次提交
  11. 20 11月, 2010 1 次提交
  12. 19 11月, 2010 6 次提交
  13. 18 11月, 2010 1 次提交
    • D
      rds: Integer overflow in RDS cmsg handling · 218854af
      Dan Rosenberg 提交于
      In rds_cmsg_rdma_args(), the user-provided args->nr_local value is
      restricted to less than UINT_MAX.  This seems to need a tighter upper
      bound, since the calculation of total iov_size can overflow, resulting
      in a small sock_kmalloc() allocation.  This would probably just result
      in walking off the heap and crashing when calling rds_rdma_pages() with
      a high count value.  If it somehow doesn't crash here, then memory
      corruption could occur soon after.
      Signed-off-by: NDan Rosenberg <drosenberg@vsecurity.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      218854af
  14. 17 11月, 2010 3 次提交
  15. 13 11月, 2010 4 次提交