1. 17 12月, 2010 2 次提交
    • O
      net: fix nulls list corruptions in sk_prot_alloc · fcbdf09d
      Octavian Purdila 提交于
      Special care is taken inside sk_port_alloc to avoid overwriting
      skc_node/skc_nulls_node. We should also avoid overwriting
      skc_bind_node/skc_portaddr_node.
      
      The patch fixes the following crash:
      
       BUG: unable to handle kernel paging request at fffffffffffffff0
       IP: [<ffffffff812ec6dd>] udp4_lib_lookup2+0xad/0x370
       [<ffffffff812ecc22>] __udp4_lib_lookup+0x282/0x360
       [<ffffffff812ed63e>] __udp4_lib_rcv+0x31e/0x700
       [<ffffffff812bba45>] ? ip_local_deliver_finish+0x65/0x190
       [<ffffffff812bbbf8>] ? ip_local_deliver+0x88/0xa0
       [<ffffffff812eda35>] udp_rcv+0x15/0x20
       [<ffffffff812bba45>] ip_local_deliver_finish+0x65/0x190
       [<ffffffff812bbbf8>] ip_local_deliver+0x88/0xa0
       [<ffffffff812bb2cd>] ip_rcv_finish+0x32d/0x6f0
       [<ffffffff8128c14c>] ? netif_receive_skb+0x99c/0x11c0
       [<ffffffff812bb94b>] ip_rcv+0x2bb/0x350
       [<ffffffff8128c14c>] netif_receive_skb+0x99c/0x11c0
      Signed-off-by: NLeonard Crestez <lcrestez@ixiacom.com>
      Signed-off-by: NOctavian Purdila <opurdila@ixiacom.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fcbdf09d
    • A
      ipv6: delete expired route in ip6_pmtu_deliver · d3052b55
      Andrey Vagin 提交于
      The first big packets sent to a "low-MTU" client correctly
      triggers the creation of a temporary route containing the reduced MTU.
      
      But after the temporary route has expired, new ICMP6 "packet too big"
      will be sent, rt6_pmtu_discovery will find the previous EXPIRED route
      check that its mtu isn't bigger then in icmp packet and do nothing
      before the temporary route will not deleted by gc.
      
      I make the simple experiment:
      while :; do
          time ( dd if=/dev/zero bs=10K count=1 | ssh hostname dd of=/dev/null ) || break;
      done
      
      The "time" reports real 0m0.197s if a temporary route isn't expired, but
      it reports real 0m52.837s (!!!!) immediately after a temporare route has
      expired.
      Signed-off-by: NAndrey Vagin <avagin@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d3052b55
  2. 14 12月, 2010 2 次提交
  3. 11 12月, 2010 5 次提交
  4. 10 12月, 2010 1 次提交
  5. 09 12月, 2010 10 次提交
    • D
      econet: Fix crash in aun_incoming(). · 4e085e76
      David S. Miller 提交于
      Unconditional use of skb->dev won't work here,
      try to fetch the econet device via skb_dst()->dev
      instead.
      
      Suggested by Eric Dumazet.
      Reported-by: NNelson Elhage <nelhage@ksplice.com>
      Tested-by: NNelson Elhage <nelhage@ksplice.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4e085e76
    • E
      tcp: protect sysctl_tcp_cookie_size reads · f1987257
      Eric Dumazet 提交于
      Make sure sysctl_tcp_cookie_size is read once in
      tcp_cookie_size_check(), or we might return an illegal value to caller
      if sysctl_tcp_cookie_size is changed by another cpu.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: William Allen Simpson <william.allen.simpson@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f1987257
    • E
      tcp: avoid a possible divide by zero · ad9f4f50
      Eric Dumazet 提交于
      sysctl_tcp_tso_win_divisor might be set to zero while one cpu runs in
      tcp_tso_should_defer(). Make sure we dont allow a divide by zero by
      reading sysctl_tcp_tso_win_divisor exactly once.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ad9f4f50
    • H
      mac80211: Fix BUG in pskb_expand_head when transmitting shared skbs · 7e244707
      Helmut Schaa 提交于
      mac80211 doesn't handle shared skbs correctly at the moment. As a result
      a possible resize can trigger a BUG in pskb_expand_head.
      
      [  676.030000] Kernel bug detected[#1]:
      [  676.030000] Cpu 0
      [  676.030000] $ 0   : 00000000 00000000 819662ff 00000002
      [  676.030000] $ 4   : 81966200 00000020 00000000 00000020
      [  676.030000] $ 8   : 819662e0 800043c0 00000002 00020000
      [  676.030000] $12   : 3b9aca00 00000000 00000000 00470000
      [  676.030000] $16   : 80ea2000 00000000 00000000 00000000
      [  676.030000] $20   : 818aa200 80ea2018 80ea2000 00000008
      [  676.030000] $24   : 00000002 800ace5c
      [  676.030000] $28   : 8199a000 8199bd20 81938f88 80f180d4
      [  676.030000] Hi    : 0000026e
      [  676.030000] Lo    : 0000757e
      [  676.030000] epc   : 801245e4 pskb_expand_head+0x44/0x1d8
      [  676.030000]     Not tainted
      [  676.030000] ra    : 80f180d4 ieee80211_skb_resize+0xb0/0x114 [mac80211]
      [  676.030000] Status: 1000a403    KERNEL EXL IE
      [  676.030000] Cause : 10800024
      [  676.030000] PrId  : 0001964c (MIPS 24Kc)
      [  676.030000] Modules linked in: mac80211_hwsim rt2800lib rt2x00soc rt2x00pci rt2x00lib mac80211 crc_itu_t crc_ccitt cfg80211 compat arc4 aes_generic deflate ecb cbc [last unloaded: rt2800pci]
      [  676.030000] Process kpktgend_0 (pid: 97, threadinfo=8199a000, task=81879f48, tls=00000000)
      [  676.030000] Stack : ffffffff 00000000 00000000 00000014 00000004 80ea2000 00000000 00000000
      [  676.030000]         818aa200 80f180d4 ffffffff 0000000a 81879f78 81879f48 81879f48 00000018
      [  676.030000]         81966246 80ea2000 818432e0 80f1a420 80203050 81814d98 00000001 81879f48
      [  676.030000]         81879f48 00000018 81966246 818432e0 0000001a 8199bdd4 0000001c 80f1b72c
      [  676.030000]         80203020 8001292c 80ef4aa2 7f10b55d 801ab5b8 81879f48 00000188 80005c90
      [  676.030000]         ...
      [  676.030000] Call Trace:
      [  676.030000] [<801245e4>] pskb_expand_head+0x44/0x1d8
      [  676.030000] [<80f180d4>] ieee80211_skb_resize+0xb0/0x114 [mac80211]
      [  676.030000] [<80f1a420>] ieee80211_xmit+0x150/0x22c [mac80211]
      [  676.030000] [<80f1b72c>] ieee80211_subif_start_xmit+0x6f4/0x73c [mac80211]
      [  676.030000] [<8014361c>] pktgen_thread_worker+0xfac/0x16f8
      [  676.030000] [<8002ebe8>] kthread+0x7c/0x88
      [  676.030000] [<80008e0c>] kernel_thread_helper+0x10/0x18
      [  676.030000]
      [  676.030000]
      [  676.030000] Code: 24020001  10620005  2502001f <0200000d> 0804917a  00000000  2502001f  00441023  00531021
      
      Fix this by making a local copy of shared skbs prior to mangeling them.
      To avoid copying the skb unnecessarily move the skb_copy call below the
      checks that don't need write access to the skb.
      
      Also, move the assignment of nh_pos and h_pos below the skb_copy to point
      to the correct skb.
      
      It would be possible to avoid another resize of the copied skb by using
      skb_copy_expand instead of skb_copy but that would make the patch more
      complex. Also, shared skbs are a corner case right now, so the resize
      shouldn't matter much.
      
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NHelmut Schaa <helmut.schaa@googlemail.com>
      Cc: stable@kernel.org
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7e244707
    • T
      tcp: Replace time wait bucket msg by counter · 67631510
      Tom Herbert 提交于
      Rather than printing the message to the log, use a mib counter to keep
      track of the count of occurences of time wait bucket overflow.  Reduces
      spam in logs.
      Signed-off-by: NTom Herbert <therbert@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67631510
    • A
      x25: decrement netdev reference counts on unload · 171995e5
      Apollon Oikonomopoulos 提交于
      x25 does not decrement the network device reference counts on module unload.
      Thus unregistering any pre-existing interface after unloading the x25 module
      hangs and results in
      
       unregister_netdevice: waiting for tap0 to become free. Usage count = 1
      
      This patch decrements the reference counts of all interfaces in x25_link_free,
      the way it is already done in x25_link_device_down for NETDEV_DOWN events.
      Signed-off-by: NApollon Oikonomopoulos <apollon@noc.grnet.gr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      171995e5
    • 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
  6. 07 12月, 2010 2 次提交
  7. 02 12月, 2010 2 次提交
  8. 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
  9. 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
  10. 29 11月, 2010 4 次提交
  11. 28 11月, 2010 2 次提交
  12. 25 11月, 2010 5 次提交
  13. 23 11月, 2010 1 次提交