1. 02 Nov, 2007 16 commits
    • Andy Green's avatar
      Add get_unaligned to ieee80211_get_radiotap_len · 774b4c52
      Andy Green authored
      patch dfe6e81d in mainline.
      
      ieee80211_get_radiotap_len() tries to dereference radiotap length without
      taking care that it is completely unaligned and get_unaligned()
      is required.
      Signed-off-by: default avatarAndy Green <andy@warmcat.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      774b4c52
    • Al Viro's avatar
      libertas: more endianness breakage · 8c7537c7
      Al Viro authored
      based on patch 8362cd41 in mainline.
      
      	domain->header.len is le16 and has just been assigned
      cpu_to_le16(arithmetical expression).  And all fields of adapter->logmsg
      are __le32; not a single 16-bit among them...
      	That's incremental to the previous one
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8c7537c7
    • Al Viro's avatar
      libertas: fix endianness breakage · 4b8e10dc
      Al Viro authored
      patch 57077081 in mainline.
      
      	wep->keytype[] is u8
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      4b8e10dc
    • John W. Linville's avatar
      mac80211: filter locally-originated multicast frames · 54b932c5
      John W. Linville authored
      patch b3316157 in mainline.
      
      In STA mode, the AP will echo our traffic.  This includes multicast
      traffic.
      
      Receiving these frames confuses some protocols and applications,
      notably IPv6 Duplicate Address Detection.
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Acked-by: default avatarMichael Wu <flamingice@sourmilk.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      54b932c5
    • Eric Dumazet's avatar
      Fix TCP initial sequence number selection. · dec0da2c
      Eric Dumazet authored
      changeset 162f6690a65075b49f242d3c8cdb5caaa959a060 in mainline.
      
      TCP V4 sequence numbers are 32bits, and RFC 793 assumed a 250 KHz clock.
      In order to follow network speed increase, we can use a faster clock, but
      we should limit this clock so that the delay between two rollovers is
      greater than MSL (TCP Maximum Segment Lifetime : 2 minutes)
      
      Choosing a 64 nsec clock should be OK, since the rollovers occur every
      274 seconds.
      
      Problem spotted by Denys Fedoryshchenko
      
      [ This bug was introduced by f8595815 ]
      Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      dec0da2c
    • David Miller's avatar
      Fix TCP MD5 on big-endian. · 55d0058f
      David Miller authored
      changeset f8ab18d2 in mainline.
      
      Based upon a report and initial patch by Peter Lieven.
      
      tcp4_md5sig_key and tcp6_md5sig_key need to start with
      the exact same members as tcp_md5sig_key.  Because they
      are both cast to that type by tcp_v{4,6}_md5_do_lookup().
      
      Unfortunately tcp{4,6}_md5sig_key use a u16 for the key
      length instead of a u8, which is what tcp_md5sig_key
      uses.  This just so happens to work by accident on
      little-endian, but on big-endian it doesn't.
      
      Instead of casting, just place tcp_md5sig_key as the first member of
      the address-family specific structures, adjust the access sites, and
      kill off the ugly casts.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      55d0058f
    • Ilpo Järvinen's avatar
      Fix TCP's ->fastpath_cnt_hit handling. · 692767df
      Ilpo Järvinen authored
      changeset 48611c47 in mainline.
      
      When only GSO skb was partially ACKed, no hints are reset,
      therefore fastpath_cnt_hint must be tweaked too or else it can
      corrupt fackets_out. The corruption to occur, one must have
      non-trivial ACK/SACK sequence, so this bug is not very often
      that harmful. There's a fackets_out state reset in TCP because
      fackets_out is known to be inaccurate and that fixes the issue
      eventually anyway.
      
      In case there was also at least one skb that got fully ACKed,
      the fastpath_skb_hint is set to NULL which causes a recount for
      fastpath_cnt_hint (the old value won't be accessed anymore),
      thus it can safely be decremented without additional checking.
      
      Reported by Cedric Le Goater <clg@fr.ibm.com>
      Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      692767df
    • David S. Miller's avatar
      Fix sys_ipc() SEMCTL on sparc64. · e43358c5
      David S. Miller authored
      changeset 6536a6b331d3225921c398eb7c6e4ecedb9b05e0 from mainline
      
      Thanks to Tom Callaway for the excellent bug report and
      test case.
      
      sys_ipc() has several problems, most to due with semaphore
      call handling:
      
      1) 'err' return should be a 'long'
      2) "union semun" is passed in a register on 64-bit compared
         to 32-bit which provides it on the stack and therefore
         by reference
      3) Second and third arguments to SEMCTL are swapped compared
         to 32-bit.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e43358c5
    • David S. Miller's avatar
      Fix zero length socket write() semantics. · 791333ba
      David S. Miller authored
      changeset e79ad711 from mainline.
      
      This fixes kernel bugzilla #5731
      
      It should generate an empty packet for datagram protocols when the
      socket is connected, for one.
      
      The check is doubly-wrong because all that a write() can be is a
      sendmsg() call with a NULL msg_control and a single entry iovec.  No
      special semantics should be assigned to it, therefore the zero length
      check should be removed entirely.
      
      This matches the behavior of BSD and several other systems.
      
      Alan Cox notes that SuSv3 says the behavior of a zero length write on
      non-files is "unspecified", but that's kind of useless since BSD has
      defined this behavior for a quarter century and BSD is essentially
      what application folks code to.
      
      Based upon a patch from Stephen Hemminger.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      791333ba
    • Alexey Dobriyan's avatar
      Fix ROSE module unload oops. · f7c6bfbb
      Alexey Dobriyan authored
      changeset 891e6a93 from mainline.
      
      Commit a3d38402 aka
      "[AX.25]: Fix unchecked rose_add_loopback_neigh uses"
      transformed rose_loopback_neigh var into statically allocated one.
      However, on unload it will be kfree's which can't work.
      
      Steps to reproduce:
      
      	modprobe rose
      	rmmod rose
      
      BUG: unable to handle kernel NULL pointer dereference at virtual address 00000008
       printing eip:
      c014c664
      *pde = 00000000
      Oops: 0000 [#1]
      PREEMPT DEBUG_PAGEALLOC
      Modules linked in: rose ax25 fan ufs loop usbhid rtc snd_intel8x0 snd_ac97_codec ehci_hcd ac97_bus uhci_hcd thermal usbcore button processor evdev sr_mod cdrom
      CPU:    0
      EIP:    0060:[<c014c664>]    Not tainted VLI
      EFLAGS: 00210086   (2.6.23-rc9 #3)
      EIP is at kfree+0x48/0xa1
      eax: 00000556   ebx: c1734aa0   ecx: f6a5e000   edx: f7082000
      esi: 00000000   edi: f9a55d20   ebp: 00200287   esp: f6a5ef28
      ds: 007b   es: 007b   fs: 0000  gs: 0033  ss: 0068
      Process rmmod (pid: 1823, ti=f6a5e000 task=f7082000 task.ti=f6a5e000)
      Stack: f9a55d20 f9a5200c 00000000 00000000 00000000 f6a5e000 f9a5200c f9a55a00
             00000000 bf818cf0 f9a51f3f f9a55a00 00000000 c0132c60 65736f72 00000000
             f69f9630 f69f9528 c014244a f6a4e900 00200246 f7082000 c01025e6 00000000
      Call Trace:
       [<f9a5200c>] rose_rt_free+0x1d/0x49 [rose]
       [<f9a5200c>] rose_rt_free+0x1d/0x49 [rose]
       [<f9a51f3f>] rose_exit+0x4c/0xd5 [rose]
       [<c0132c60>] sys_delete_module+0x15e/0x186
       [<c014244a>] remove_vma+0x40/0x45
       [<c01025e6>] sysenter_past_esp+0x8f/0x99
       [<c012bacf>] trace_hardirqs_on+0x118/0x13b
       [<c01025b6>] sysenter_past_esp+0x5f/0x99
       =======================
      Code: 05 03 1d 80 db 5b c0 8b 03 25 00 40 02 00 3d 00 40 02 00 75 03 8b 5b 0c 8b 73 10 8b 44 24 18 89 44 24 04 9c 5d fa e8 77 df fd ff <8b> 56 08 89 f8 e8 84 f4 fd ff e8 bd 32 06 00 3b 5c 86 60 75 0f
      EIP: [<c014c664>] kfree+0x48/0xa1 SS:ESP 0068:f6a5ef28
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f7c6bfbb
    • Brian Haley's avatar
      Fix ipv6 redirect processing, leads to TAHI failures. · e483eb68
      Brian Haley authored
      changeset bf0b48df from mainline.
      
      When the ICMPv6 Target address is multicast, Linux processes the
      redirect instead of dropping it.  The problem is in this code in
      ndisc_redirect_rcv():
      
               if (ipv6_addr_equal(dest, target)) {
                       on_link = 1;
               } else if (!(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) {
                       ND_PRINTK2(KERN_WARNING
                                  "ICMPv6 Redirect: target address is not
      link-local.\n");
                       return;
               }
      
      This second check will succeed if the Target address is, for example,
      FF02::1 because it has link-local scope.  Instead, it should be checking
      if it's a unicast link-local address, as stated in RFC 2461/4861 Section
      8.1:
      
             - The ICMP Target Address is either a link-local address (when
               redirected to a router) or the same as the ICMP Destination
               Address (when redirected to the on-link destination).
      
      I know this doesn't explicitly say unicast link-local address, but it's
      implied.
      
      This bug is preventing Linux kernels from achieving IPv6 Logo Phase II
      certification because of a recent error that was found in the TAHI test
      suite - Neighbor Disovery suite test 206 (v6LC.2.3.6_G) had the
      multicast address in the Destination field instead of Target field, so
      we were passing the test.  This won't be the case anymore.
      
      The patch below fixes this problem, and also fixes ndisc_send_redirect()
      to not send an invalid redirect with a multicast address in the Target
      field.  I re-ran the TAHI Neighbor Discovery section to make sure Linux
      passes all 245 tests now.
      Signed-off-by: default avatarBrian Haley <brian.haley@hp.com>
      Acked-by: default avatarDavid L Stevens <dlstevens@us.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e483eb68
    • Mitsuru Chinen's avatar
      Fix some cases of missed IPV6 DAD · 3b3ba80b
      Mitsuru Chinen authored
      changeset 0fcace22d38ce9216f5ba52f929a99d284aa7e49 from mainline
      
      To judge the timing for DAD, netif_carrier_ok() is used. However,
      there is a possibility that dev->qdisc stays noop_qdisc even if
      netif_carrier_ok() returns true. In that case, DAD NS is not sent out.
      We need to defer the IPv6 device initialization until a valid qdisc
      is specified.
      Signed-off-by: default avatarMitsuru Chinen <mitch@linux.vnet.ibm.com>
      Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      3b3ba80b
    • John W. Linville's avatar
      Fix ieee80211 handling of bogus hdrlength field · 1902abab
      John W. Linville authored
      changeset 04045f98 from mainline
      
      Reported by Chris Evans <scarybeasts@gmail.com>:
      
      > The summary is that an evil 80211 frame can crash out a victim's
      > machine. It only applies to drivers using the 80211 wireless code, and
      > only then to certain drivers (and even then depends on a card's
      > firmware not dropping a dubious packet). I must confess I'm not
      > keeping track of Linux wireless support, and the different protocol
      > stacks etc.
      >
      > Details are as follows:
      >
      > ieee80211_rx() does not explicitly check that "skb->len >= hdrlen".
      > There are other skb->len checks, but not enough to prevent a subtle
      > off-by-two error if the frame has the IEEE80211_STYPE_QOS_DATA flag
      > set.
      >
      > This leads to integer underflow and crash here:
      >
      > if (frag != 0)
      >    flen -= hdrlen;
      >
      > (flen is subsequently used as a memcpy length parameter).
      
      How about this?
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      1902abab
    • Stephen Hemminger's avatar
      Fix cls_u32 error return handling. · fda48520
      Stephen Hemminger authored
      changeset bf1b803b from mainline.
      Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      fda48520
    • David Miller's avatar
      Fix ESP host instance numbering. · c0d96d06
      David Miller authored
      changeset ff4abd6c in mainline.
      
      The ESP scsi driver does not initialize the host controller
      instance early enough, so the messages in the log confuse
      users.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c0d96d06
    • Thomas Gleixner's avatar
      ACPI: disable lower idle C-states across suspend/resume · f310d0f0
      Thomas Gleixner authored
      changeset b04e7bdb from mainline.
      
      device_suspend() calls ACPI suspend functions, which seems to have undesired
      side effects on lower idle C-states. It took me some time to realize that
      especially the VAIO BIOSes (both Andrews jinxed UP and my elfstruck SMP one)
      show this effect. I'm quite sure that other bug reports against suspend/resume
      about turning the system into a brick have the same root cause.
      
      After fishing in the dark for quite some time, I realized that removing the ACPI
      processor module before suspend (this removes the lower C-state functionality)
      made the problem disappear. Interestingly enough the propability of having a
      bricked box is influenced by various factors (interrupts, size of the ram image,
      ...). Even adding a bunch of printks in the wrong places made the problem go
      away. The previous periodic tick implementation simply pampered over the
      problem, which explains why the dyntick / clockevents changes made this more
      prominent.
      
      We avoid complex functionality during the boot process and we have to do the
      same during suspend/resume. It is a similar scenario and equaly fragile.
      
      Add suspend / resume functions to the ACPI processor code and disable the lower
      idle C-states across suspend/resume. Fall back to the default idle
      implementation (halt) instead.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f310d0f0
  2. 10 Oct, 2007 14 commits
  3. 26 Sep, 2007 10 commits