1. 02 6月, 2009 3 次提交
    • N
      e1000: add missing length check to e1000 receive routine · ea30e119
      Neil Horman 提交于
      	Patch to fix bad length checking in e1000.  E1000 by default does two
      things:
      
      1) Spans rx descriptors for packets that don't fit into 1 skb on recieve
      2) Strips the crc from a frame by subtracting 4 bytes from the length prior to
      doing an skb_put
      
      Since the e1000 driver isn't written to support receiving packets that span
      multiple rx buffers, it checks the End of Packet bit of every frame, and
      discards it if its not set.  This places us in a situation where, if we have a
      spanning packet, the first part is discarded, but the second part is not (since
      it is the end of packet, and it passes the EOP bit test).  If the second part of
      the frame is small (4 bytes or less), we subtract 4 from it to remove its crc,
      underflow the length, and wind up in skb_over_panic, when we try to skb_put a
      huge number of bytes into the skb.  This amounts to a remote DOS attack through
      careful selection of frame size in relation to interface MTU.  The fix for this
      is already in the e1000e driver, as well as the e1000 sourceforge driver, but no
      one ever pushed it to e1000.  This is lifted straight from e1000e, and prevents
      small frames from causing the underflow described above
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Tested-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ea30e119
    • E
      forcedeth: add phy_power_down parameter, leave phy powered up by default (v2) · 5a9a8e32
      Ed Swierk 提交于
      Add a phy_power_down parameter to forcedeth: set to 1 to power down the
      phy and disable the link when an interface goes down; set to 0 to always
      leave the phy powered up.
      
      The phy power state persists across reboots; Windows, some BIOSes, and
      older versions of Linux don't bother to power up the phy again, forcing
      users to remove all power to get the interface working (see
      http://bugzilla.kernel.org/show_bug.cgi?id=13072).  Leaving the phy
      powered on is the safest default behavior.  Users accustomed to seeing
      the link state reflect the interface state and/or wanting to minimize
      power consumption can set phy_power_down=1 if compatibility with other
      OSes is not an issue.
      Signed-off-by: NEd Swierk <eswierk@aristanetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5a9a8e32
    • D
  2. 01 6月, 2009 2 次提交
  3. 30 5月, 2009 4 次提交
  4. 29 5月, 2009 5 次提交
  5. 28 5月, 2009 1 次提交
  6. 27 5月, 2009 7 次提交
    • P
      netfilter: nfnetlink_log: fix wrong skbuff size calculation · eeff9bee
      Pablo Neira Ayuso 提交于
      This problem was introduced in 72961ecf
      since no space was reserved for the new attributes NFULA_HWTYPE,
      NFULA_HWLEN and NFULA_HWHEADER.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      eeff9bee
    • J
      netfilter: xt_hashlimit does a wrong SEQ_SKIP · 683a04ce
      Jesper Dangaard Brouer 提交于
      The function dl_seq_show() returns 1 (equal to SEQ_SKIP) in case
      a seq_printf() call return -1.  It should return -1.
      
      This SEQ_SKIP behavior brakes processing the proc file e.g. via a
      pipe or just through less.
      Signed-off-by: NJesper Dangaard Brouer <hawk@comx.dk>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      683a04ce
    • D
      Bluetooth: Remove useless flush_work() causing lockdep warnings · 4c713189
      Dave Young 提交于
      The calls to flush_work() are pointless in a single thread workqueue
      and they are actually causing a lockdep warning.
      
      =============================================
      [ INFO: possible recursive locking detected ]
      2.6.30-rc6-02911-gbb803cfb #16
      ---------------------------------------------
      bluetooth/2518 is trying to acquire lock:
       (bluetooth){+.+.+.}, at: [<c0130c14>] flush_work+0x28/0xb0
      
      but task is already holding lock:
       (bluetooth){+.+.+.}, at: [<c0130424>] worker_thread+0x149/0x25e
      
      other info that might help us debug this:
      2 locks held by bluetooth/2518:
       #0:  (bluetooth){+.+.+.}, at: [<c0130424>] worker_thread+0x149/0x25e
       #1:  (&conn->work_del){+.+...}, at: [<c0130424>] worker_thread+0x149/0x25e
      
      stack backtrace:
      Pid: 2518, comm: bluetooth Not tainted 2.6.30-rc6-02911-gbb803cfb #16
      Call Trace:
       [<c03d64d9>] ? printk+0xf/0x11
       [<c0140d96>] __lock_acquire+0x7ce/0xb1b
       [<c0141173>] lock_acquire+0x90/0xad
       [<c0130c14>] ? flush_work+0x28/0xb0
       [<c0130c2e>] flush_work+0x42/0xb0
       [<c0130c14>] ? flush_work+0x28/0xb0
       [<f8b84966>] del_conn+0x1c/0x84 [bluetooth]
       [<c0130469>] worker_thread+0x18e/0x25e
       [<c0130424>] ? worker_thread+0x149/0x25e
       [<f8b8494a>] ? del_conn+0x0/0x84 [bluetooth]
       [<c0133843>] ? autoremove_wake_function+0x0/0x33
       [<c01302db>] ? worker_thread+0x0/0x25e
       [<c013355a>] kthread+0x45/0x6b
       [<c0133515>] ? kthread+0x0/0x6b
       [<c01034a7>] kernel_thread_helper+0x7/0x10
      
      Based on a report by Oliver Hartkopp <oliver@hartkopp.net>
      Signed-off-by: NDave Young <hidave.darkstar@gmail.com>
      Tested-by: NOliver Hartkopp <oliver@hartkopp.net>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      4c713189
    • M
      bfin_mac: fix build error due to net_device_ops convert · b63dc8fe
      Mike Frysinger 提交于
      The previous commit "convert to net_device_ops" broke the Blackfin MAC
      driver as it declared the new structure before the function it used:
        CC      drivers/net/bfin_mac.o
      drivers/net/bfin_mac.c:984: error: ‘bfin_mac_close’ undeclared here (not in a function)
      make[1]: *** [drivers/net/bfin_mac.o] Error 1
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b63dc8fe
    • A
      atlx: move modinfo data from atlx.h to atl1.c · 5ad18900
      Alex Chiang 提交于
      Both atl1.c and atl2.c include atlx.h, which defines some modinfo
      stuff. But atl2.c seems like it doesn't want the modinfo data
      from atlx.h, as it defines its own.
      
      Running modinfo on atl2.ko, we get conflicting information:
      
      $ /sbin/modinfo drivers/net/atlx/atl2.ko | egrep "version|description|author"
      version:        2.2.3
      description:    Atheros Fast Ethernet Network Driver
      author:         Atheros Corporation <xiong.huang@atheros.com>, Chris Snook <csnook@redhat.com>
      version:        2.1.3
      author:         Xiong Huang <xiong.huang@atheros.com>, 	Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com>
      
      Move the modinfo data out of atlx.h and into atl1.c to eliminate
      the confusion:
      
      $ /sbin/modinfo drivers/net/atlx/atl1.ko | egrep "version|description|author"
      version:        2.1.3
      author:         Xiong Huang <xiong.huang@atheros.com>, 	Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com>
      description:    Atheros L1 Gigabit Ethernet Driver
      
      $ /sbin/modinfo drivers/net/atlx/atl2.ko | egrep "version|description|author"
      version:        2.2.3
      description:    Atheros Fast Ethernet Network Driver
      author:         Atheros Corporation <xiong.huang@atheros.com>, Chris Snook <csnook@redhat.com>
      Reported-by: NScott Scriven <scott.scriven@hp.com>
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Acked-by: NJay Cliburn <jcliburn@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5ad18900
    • X
      gianfar: fix babbling rx error event bug · 18a36c1a
      Xiaotian Feng 提交于
      Gianfar interrupt handler uses IEVENT_ERR_MASK to check and handle errors.
      Babbling RX error (IEVENT_BABR) should be included in IEVENT_ERROR_MASK.
      Otherwise if BABR is raised, it never gets handled nor cleared, and an
      interrupt storm results. This has been observed to happen on sending a
      burst of ethernet frames to a gianfar based board.
      Signed-off-by: NXiaotian Feng <xiaotian.feng@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      18a36c1a
    • P
      cls_cgroup: read classid atomically in classifier · e65fcfd6
      Paul Menage 提交于
      Avoid reading the unsynchronized value cs->classid multiple times,
      since it could change concurrently from non-zero to zero; this would
      result in the classifier returning a positive result with a bogus
      (zero) classid.
      Signed-off-by: NPaul Menage <menage@google.com>
      Reviewed-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e65fcfd6
  7. 26 5月, 2009 4 次提交
  8. 25 5月, 2009 3 次提交
    • P
      netfilter: nf_ct_dccp: add missing DCCP protocol changes in event cache · b38b1f61
      Pablo Neira Ayuso 提交于
      This patch adds the missing protocol state-change event reporting
      for DCCP.
      
      $ sudo conntrack -E
          [NEW] dccp     33 240 src=192.168.0.2 dst=192.168.1.2 sport=57040 dport=5001 [UNREPLIED] src=192.168.1.2 dst=192.168.1.100 sport=5001 dport=57040
      
      With this patch:
      
      $ sudo conntrack -E
          [NEW] dccp     33 240 REQUEST src=192.168.0.2 dst=192.168.1.2 sport=57040 dport=5001 [UNREPLIED] src=192.168.1.2 dst=192.168.1.100 sport=5001 dport=57040
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      b38b1f61
    • J
      netfilter: nf_ct_tcp: fix accepting invalid RST segments · bfcaa502
      Jozsef Kadlecsik 提交于
      Robert L Mathews discovered that some clients send evil TCP RST segments,
      which are accepted by netfilter conntrack but discarded by the
      destination. Thus the conntrack entry is destroyed but the destination
      retransmits data until timeout.
      
      The same technique, i.e. sending properly crafted RST segments, can easily
      be used to bypass connlimit/connbytes based restrictions (the sample
      script written by Robert can be found in the netfilter mailing list
      archives).
      
      The patch below adds a new flag and new field to struct ip_ct_tcp_state so
      that checking RST segments can be made more strict and thus TCP conntrack
      can catch the invalid ones: the RST segment is accepted only if its
      sequence number higher than or equal to the highest ack we seen from the
      other direction. (The last_ack field cannot be reused because it is used
      to catch resent packets.)
      Signed-off-by: NJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      bfcaa502
    • L
      gianfar: fix BUG under load after introduction of skb recycling · 4e2fd555
      Lennert Buytenhek 提交于
      Since commit 0fd56bb5 ("gianfar:
      Add support for skb recycling"), gianfar puts skbuffs that are in
      the rx ring back onto the recycle list as-is in case there was a
      receive error, but this breaks the following invariant: that all
      skbuffs on the recycle list have skb->data = skb->head + NET_SKB_PAD.
      
      The RXBUF_ALIGNMENT realignment done in gfar_new_skb() will be done
      twice on skbuffs recycled in this way, causing there not to be enough
      room in the skb anymore to receive a full packet, eventually leading
      to an skb_over_panic from gfar_clean_rx_ring() -> skb_put().
      
      Resetting the skb->data pointer to skb->head + NET_SKB_PAD before
      putting the skb back onto the recycle list restores the mentioned
      invariant, and should fix this issue.
      Reported-by: NMichael Guntsche <mike@it-loops.com>
      Tested-by: NMichael Guntsche <mike@it-loops.com>
      Signed-off-by: NLennert Buytenhek <buytenh@wantstofly.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4e2fd555
  9. 22 5月, 2009 5 次提交
  10. 21 5月, 2009 6 次提交