1. 25 Dec, 2017 37 commits
  2. 20 Dec, 2017 3 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.9.71 · b632d710
      Greg Kroah-Hartman authored
      b632d710
    • Miaoqing Pan's avatar
      ath9k: fix tx99 potential info leak · ed70a221
      Miaoqing Pan authored
      
      [ Upstream commit ee0a4718 ]
      
      When the user sets count to zero the string buffer would remain
      completely uninitialized which causes the kernel to parse its
      own stack data, potentially leading to an info leak. In addition
      to that, the string might be not terminated properly when the
      user data does not contain a 0-terminator.
      Signed-off-by: default avatarMiaoqing Pan <miaoqing@codeaurora.org>
      Reviewed-by: default avatarChristoph Böhmwalder <christoph@boehmwalder.at>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ed70a221
    • Matteo Croce's avatar
      icmp: don't fail on fragment reassembly time exceeded · 8f23eb16
      Matteo Croce authored
      
      [ Upstream commit 258bbb1b ]
      
      The ICMP implementation currently replies to an ICMP time exceeded message
      (type 11) with an ICMP host unreachable message (type 3, code 1).
      
      However, time exceeded messages can either represent "time to live exceeded
      in transit" (code 0) or "fragment reassembly time exceeded" (code 1).
      
      Unconditionally replying to "fragment reassembly time exceeded" with
      host unreachable messages might cause unjustified connection resets
      which are now easily triggered as UFO has been removed, because, in turn,
      sending large buffers triggers IP fragmentation.
      
      The issue can be easily reproduced by running a lot of UDP streams
      which is likely to trigger IP fragmentation:
      
        # start netserver in the test namespace
        ip netns add test
        ip netns exec test netserver
      
        # create a VETH pair
        ip link add name veth0 type veth peer name veth0 netns test
        ip link set veth0 up
        ip -n test link set veth0 up
      
        for i in $(seq 20 29); do
            # assign addresses to both ends
            ip addr add dev veth0 192.168.$i.1/24
            ip -n test addr add dev veth0 192.168.$i.2/24
      
            # start the traffic
            netperf -L 192.168.$i.1 -H 192.168.$i.2 -t UDP_STREAM -l 0 &
        done
      
        # wait
        send_data: data send error: No route to host (errno 113)
        netperf: send_omni: send_data failed: No route to host
      
      We need to differentiate instead: if fragment reassembly time exceeded
      is reported, we need to silently drop the packet,
      if time to live exceeded is reported, maintain the current behaviour.
      In both cases increment the related error count "icmpInTimeExcds".
      
      While at it, fix a typo in a comment, and convert the if statement
      into a switch to mate it more readable.
      Signed-off-by: default avatarMatteo Croce <mcroce@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8f23eb16