1. 13 Nov, 2013 27 commits
  2. 04 Nov, 2013 13 commits
    • Greg Kroah-Hartman's avatar
      Linux 3.4.68 · 575e5ec3
      Greg Kroah-Hartman authored
      575e5ec3
    • Enrico Mioso's avatar
      usb: serial: option: blacklist Olivetti Olicard200 · f99343bd
      Enrico Mioso authored
      commit fd8573f5 upstream.
      
      Interface 6 of this device speaks QMI as per tests done by us.
      Credits go to Antonella for providing the hardware.
      Signed-off-by: default avatarEnrico Mioso <mrkiko.rs@gmail.com>
      Signed-off-by: default avatarAntonella Pellizzari <anto.pellizzari83@gmail.com>
      Tested-by: default avatarDan Williams <dcbw@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f99343bd
    • Greg Kroah-Hartman's avatar
      USB: serial: option: add support for Inovia SEW858 device · 9598aad1
      Greg Kroah-Hartman authored
      commit f4c19b8e upstream.
      
      This patch adds the device id for the Inovia SEW858 device to the option driver.
      Reported-by: default avatarPavel Parkhomenko <ra85551@gmail.com>
      Tested-by: default avatarPavel Parkhomenko <ra85551@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9598aad1
    • Diego Elio Pettenò's avatar
      USB: serial: ti_usb_3410_5052: add Abbott strip port ID to combined table as well. · d588c4db
      Diego Elio Pettenò authored
      commit c9d09dc7 upstream.
      
      Without this change, the USB cable for Freestyle Option and compatible
      glucometers will not be detected by the driver.
      Signed-off-by: default avatarDiego Elio Pettenò <flameeyes@flameeyes.eu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d588c4db
    • Johannes Berg's avatar
      wireless: radiotap: fix parsing buffer overrun · 5b81d479
      Johannes Berg authored
      commit f5563318 upstream.
      
      When parsing an invalid radiotap header, the parser can overrun
      the buffer that is passed in because it doesn't correctly check
       1) the minimum radiotap header size
       2) the space for extended bitmaps
      
      The first issue doesn't affect any in-kernel user as they all
      check the minimum size before calling the radiotap function.
      The second issue could potentially affect the kernel if an skb
      is passed in that consists only of the radiotap header with a
      lot of extended bitmaps that extend past the SKB. In that case
      a read-only buffer overrun by at most 4 bytes is possible.
      
      Fix this by adding the appropriate checks to the parser.
      Reported-by: default avatarEvan Huus <eapache@gmail.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5b81d479
    • Fengguang Wu's avatar
      writeback: fix negative bdi max pause · 60c6aa3a
      Fengguang Wu authored
      commit e3b6c655 upstream.
      
      Toralf runs trinity on UML/i386.  After some time it hangs and the last
      message line is
      
      	BUG: soft lockup - CPU#0 stuck for 22s! [trinity-child0:1521]
      
      It's found that pages_dirtied becomes very large.  More than 1000000000
      pages in this case:
      
      	period = HZ * pages_dirtied / task_ratelimit;
      	BUG_ON(pages_dirtied > 2000000000);
      	BUG_ON(pages_dirtied > 1000000000);      <---------
      
      UML debug printf shows that we got negative pause here:
      
      	ick: pause : -984
      	ick: pages_dirtied : 0
      	ick: task_ratelimit: 0
      
      	 pause:
      	+       if (pause < 0)  {
      	+               extern int printf(char *, ...);
      	+               printf("ick : pause : %li\n", pause);
      	+               printf("ick: pages_dirtied : %lu\n", pages_dirtied);
      	+               printf("ick: task_ratelimit: %lu\n", task_ratelimit);
      	+               BUG_ON(1);
      	+       }
      	        trace_balance_dirty_pages(bdi,
      
      Since pause is bounded by [min_pause, max_pause] where min_pause is also
      bounded by max_pause.  It's suspected and demonstrated that the
      max_pause calculation goes wrong:
      
      	ick: pause : -717
      	ick: min_pause : -177
      	ick: max_pause : -717
      	ick: pages_dirtied : 14
      	ick: task_ratelimit: 0
      
      The problem lies in the two "long = unsigned long" assignments in
      bdi_max_pause() which might go negative if the highest bit is 1, and the
      min_t(long, ...) check failed to protect it falling under 0.  Fix all of
      them by using "unsigned long" throughout the function.
      Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Reported-by: default avatarToralf Förster <toralf.foerster@gmx.de>
      Tested-by: default avatarToralf Förster <toralf.foerster@gmx.de>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      60c6aa3a
    • Mikulas Patocka's avatar
      dm snapshot: fix data corruption · df6516ad
      Mikulas Patocka authored
      commit e9c6a182 upstream.
      
      This patch fixes a particular type of data corruption that has been
      encountered when loading a snapshot's metadata from disk.
      
      When we allocate a new chunk in persistent_prepare, we increment
      ps->next_free and we make sure that it doesn't point to a metadata area
      by further incrementing it if necessary.
      
      When we load metadata from disk on device activation, ps->next_free is
      positioned after the last used data chunk. However, if this last used
      data chunk is followed by a metadata area, ps->next_free is positioned
      erroneously to the metadata area. A newly-allocated chunk is placed at
      the same location as the metadata area, resulting in data or metadata
      corruption.
      
      This patch changes the code so that ps->next_free skips the metadata
      area when metadata are loaded in function read_exceptions.
      
      The patch also moves a piece of code from persistent_prepare_exception
      to a separate function skip_metadata to avoid code duplication.
      
      CVE-2013-4299
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: Mike Snitzer <snitzer@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      df6516ad
    • Eric Sandeen's avatar
      ext3: return 32/64-bit dir name hash according to usage type · 6f4f3714
      Eric Sandeen authored
      commit d7dab39b upstream.
      
      This is based on commit d1f5273e
      ext4: return 32/64-bit dir name hash according to usage type
      by Fan Yong <yong.fan@whamcloud.com>
      
      Traditionally ext2/3/4 has returned a 32-bit hash value from llseek()
      to appease NFSv2, which can only handle a 32-bit cookie for seekdir()
      and telldir().  However, this causes problems if there are 32-bit hash
      collisions, since the NFSv2 server can get stuck resending the same
      entries from the directory repeatedly.
      
      Allow ext3 to return a full 64-bit hash (both major and minor) for
      telldir to decrease the chance of hash collisions.
      
      This patch does implement a new ext3_dir_llseek op, because with 64-bit
      hashes, nfs will attempt to seek to a hash "offset" which is much
      larger than ext3's s_maxbytes.  So for dx dirs, we call
      generic_file_llseek_size() with the appropriate max hash value as the
      maximum seekable size.  Otherwise we just pass through to
      generic_file_llseek().
      Patch-updated-by: default avatarBernd Schubert <bernd.schubert@itwm.fraunhofer.de>
      Patch-updated-by: default avatarEric Sandeen <sandeen@redhat.com>
      (blame us if something is not correct)
      Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Cc: Benjamin LaHaise <bcrl@kvack.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6f4f3714
    • Mariusz Ceier's avatar
      davinci_emac.c: Fix IFF_ALLMULTI setup · 6fdea2fb
      Mariusz Ceier authored
      [ Upstream commit d69e0f7e ]
      
      When IFF_ALLMULTI flag is set on interface and IFF_PROMISC isn't,
      emac_dev_mcast_set should only enable RX of multicasts and reset
      MACHASH registers.
      
      It does this, but afterwards it either sets up multicast MACs
      filtering or disables RX of multicasts and resets MACHASH registers
      again, rendering IFF_ALLMULTI flag useless.
      
      This patch fixes emac_dev_mcast_set, so that multicast MACs filtering and
      disabling of RX of multicasts are skipped when IFF_ALLMULTI flag is set.
      
      Tested with kernel 2.6.37.
      Signed-off-by: default avatarMariusz Ceier <mceier+kernel@gmail.com>
      Acked-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6fdea2fb
    • Hannes Frederic Sowa's avatar
      inet: fix possible memory corruption with UDP_CORK and UFO · 478e9a72
      Hannes Frederic Sowa authored
      [ This is a simplified -stable version of a set of upstream commits. ]
      
      This is a replacement patch only for stable which does fix the problems
      handled by the following two commits in -net:
      
      "ip_output: do skb ufo init for peeked non ufo skb as well" (e93b7d74)
      "ip6_output: do skb ufo init for peeked non ufo skb as well" (c547dbf5)
      
      Three frames are written on a corked udp socket for which the output
      netdevice has UFO enabled.  If the first and third frame are smaller than
      the mtu and the second one is bigger, we enqueue the second frame with
      skb_append_datato_frags without initializing the gso fields. This leads
      to the third frame appended regulary and thus constructing an invalid skb.
      
      This fixes the problem by always using skb_append_datato_frags as soon
      as the first frag got enqueued to the skb without marking the packet
      as SKB_GSO_UDP.
      
      The problem with only two frames for ipv6 was fixed by "ipv6: udp
      packets following an UFO enqueued packet need also be handled by UFO"
      (2811ebac).
      
      Cc: Jiri Pirko <jiri@resnulli.us>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      478e9a72
    • Seif Mazareeb's avatar
      net: fix cipso packet validation when !NETLABEL · 2b5f6d11
      Seif Mazareeb authored
      [ Upstream commit f2e5ddcc ]
      
      When CONFIG_NETLABEL is disabled, the cipso_v4_validate() function could loop
      forever in the main loop if opt[opt_iter +1] == 0, this will causing a kernel
      crash in an SMP system, since the CPU executing this function will
      stall /not respond to IPIs.
      
      This problem can be reproduced by running the IP Stack Integrity Checker
      (http://isic.sourceforge.net) using the following command on a Linux machine
      connected to DUT:
      
      "icmpsic -s rand -d <DUT IP address> -r 123456"
      wait (1-2 min)
      Signed-off-by: default avatarSeif Mazareeb <seif@marvell.com>
      Acked-by: default avatarPaul Moore <paul@paul-moore.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2b5f6d11
    • Daniel Borkmann's avatar
      net: unix: inherit SOCK_PASS{CRED, SEC} flags from socket to fix race · 4dde1cb0
      Daniel Borkmann authored
      [ Upstream commit 90c6bd34 ]
      
      In the case of credentials passing in unix stream sockets (dgram
      sockets seem not affected), we get a rather sparse race after
      commit 16e57262 ("af_unix: dont send SCM_CREDENTIALS by default").
      
      We have a stream server on receiver side that requests credential
      passing from senders (e.g. nc -U). Since we need to set SO_PASSCRED
      on each spawned/accepted socket on server side to 1 first (as it's
      not inherited), it can happen that in the time between accept() and
      setsockopt() we get interrupted, the sender is being scheduled and
      continues with passing data to our receiver. At that time SO_PASSCRED
      is neither set on sender nor receiver side, hence in cmsg's
      SCM_CREDENTIALS we get eventually pid:0, uid:65534, gid:65534
      (== overflow{u,g}id) instead of what we actually would like to see.
      
      On the sender side, here nc -U, the tests in maybe_add_creds()
      invoked through unix_stream_sendmsg() would fail, as at that exact
      time, as mentioned, the sender has neither SO_PASSCRED on his side
      nor sees it on the server side, and we have a valid 'other' socket
      in place. Thus, sender believes it would just look like a normal
      connection, not needing/requesting SO_PASSCRED at that time.
      
      As reverting 16e57262 would not be an option due to the significant
      performance regression reported when having creds always passed,
      one way/trade-off to prevent that would be to set SO_PASSCRED on
      the listener socket and allow inheriting these flags to the spawned
      socket on server side in accept(). It seems also logical to do so
      if we'd tell the listener socket to pass those flags onwards, and
      would fix the race.
      
      Before, strace:
      
      recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"blub\n", 4096}],
              msg_controllen=32, {cmsg_len=28, cmsg_level=SOL_SOCKET,
              cmsg_type=SCM_CREDENTIALS{pid=0, uid=65534, gid=65534}},
              msg_flags=0}, 0) = 5
      
      After, strace:
      
      recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"blub\n", 4096}],
              msg_controllen=32, {cmsg_len=28, cmsg_level=SOL_SOCKET,
              cmsg_type=SCM_CREDENTIALS{pid=11580, uid=1000, gid=1000}},
              msg_flags=0}, 0) = 5
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4dde1cb0
    • Salva Peiró's avatar
      wanxl: fix info leak in ioctl · 79379b96
      Salva Peiró authored
      [ Upstream commit 2b13d06c ]
      
      The wanxl_ioctl() code fails to initialize the two padding bytes of
      struct sync_serial_settings after the ->loopback member. Add an explicit
      memset(0) before filling the structure to avoid the info leak.
      Signed-off-by: default avatarSalva Peiró <speiro@ai2.upv.es>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      79379b96