1. 17 1月, 2018 6 次提交
  2. 16 12月, 2017 8 次提交
  3. 15 12月, 2017 1 次提交
  4. 14 12月, 2017 7 次提交
    • E
      tcp: refresh tcp_mstamp from timers callbacks · 4688eb7c
      Eric Dumazet 提交于
      Only the retransmit timer currently refreshes tcp_mstamp
      
      We should do the same for delayed acks and keepalives.
      
      Even if RFC 7323 does not request it, this is consistent to what linux
      did in the past, when TS values were based on jiffies.
      
      Fixes: 385e2070 ("tcp: use tp->tcp_mstamp in output path")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Soheil Hassas Yeganeh <soheil@google.com>
      Cc: Mike Maloney <maloney@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Acked-by: NNeal Cardwell <ncardwell@google.com>
      Acked-by: NSoheil Hassas Yeganeh <soheil@google.com>
      Acked-by: NMike Maloney <maloney@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4688eb7c
    • W
      tcp: fix potential underestimation on rcv_rtt · 9ee11bd0
      Wei Wang 提交于
      When ms timestamp is used, current logic uses 1us in
      tcp_rcv_rtt_update() when the real rcv_rtt is within 1 - 999us.
      This could cause rcv_rtt underestimation.
      Fix it by always using a min value of 1ms if ms timestamp is used.
      
      Fixes: 645f4c6f ("tcp: switch rcv_rtt_est and rcvq_space to high resolution timestamps")
      Signed-off-by: NWei Wang <weiwan@google.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Acked-by: NNeal Cardwell <ncardwell@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9ee11bd0
    • K
      net: igmp: Use correct source address on IGMPv3 reports · a46182b0
      Kevin Cernekee 提交于
      Closing a multicast socket after the final IPv4 address is deleted
      from an interface can generate a membership report that uses the
      source IP from a different interface.  The following test script, run
      from an isolated netns, reproduces the issue:
      
          #!/bin/bash
      
          ip link add dummy0 type dummy
          ip link add dummy1 type dummy
          ip link set dummy0 up
          ip link set dummy1 up
          ip addr add 10.1.1.1/24 dev dummy0
          ip addr add 192.168.99.99/24 dev dummy1
      
          tcpdump -U -i dummy0 &
          socat EXEC:"sleep 2" \
              UDP4-DATAGRAM:239.101.1.68:8889,ip-add-membership=239.0.1.68:10.1.1.1 &
      
          sleep 1
          ip addr del 10.1.1.1/24 dev dummy0
          sleep 5
          kill %tcpdump
      
      RFC 3376 specifies that the report must be sent with a valid IP source
      address from the destination subnet, or from address 0.0.0.0.  Add an
      extra check to make sure this is the case.
      Signed-off-by: NKevin Cernekee <cernekee@chromium.org>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a46182b0
    • J
      tipc: eliminate potential memory leak · c545a945
      Jon Maloy 提交于
      In the function tipc_sk_mcast_rcv() we call refcount_dec(&skb->users)
      on received sk_buffers. Since the reference counter might hit zero at
      this point, we have a potential memory leak.
      
      We fix this by replacing refcount_dec() with kfree_skb().
      Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c545a945
    • P
      net: remove duplicate includes · 83593010
      Pravin Shedge 提交于
      These duplicate includes have been found with scripts/checkincludes.pl but
      they have been removed manually to avoid removing false positives.
      Signed-off-by: NPravin Shedge <pravin.shedge4linux@gmail.com>
      Acked-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      83593010
    • E
      ipv4: igmp: guard against silly MTU values · b5476022
      Eric Dumazet 提交于
      IPv4 stack reacts to changes to small MTU, by disabling itself under
      RTNL.
      
      But there is a window where threads not using RTNL can see a wrong
      device mtu. This can lead to surprises, in igmp code where it is
      assumed the mtu is suitable.
      
      Fix this by reading device mtu once and checking IPv4 minimal MTU.
      
      This patch adds missing IPV4_MIN_MTU define, to not abuse
      ETH_MIN_MTU anymore.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b5476022
    • E
      ipv6: mcast: better catch silly mtu values · b9b312a7
      Eric Dumazet 提交于
      syzkaller reported crashes in IPv6 stack [1]
      
      Xin Long found that lo MTU was set to silly values.
      
      IPv6 stack reacts to changes to small MTU, by disabling itself under
      RTNL.
      
      But there is a window where threads not using RTNL can see a wrong
      device mtu. This can lead to surprises, in mld code where it is assumed
      the mtu is suitable.
      
      Fix this by reading device mtu once and checking IPv6 minimal MTU.
      
      [1]
       skbuff: skb_over_panic: text:0000000010b86b8d len:196 put:20
       head:000000003b477e60 data:000000000e85441e tail:0xd4 end:0xc0 dev:lo
       ------------[ cut here ]------------
       kernel BUG at net/core/skbuff.c:104!
       invalid opcode: 0000 [#1] SMP KASAN
       Dumping ftrace buffer:
          (ftrace buffer empty)
       Modules linked in:
       CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.15.0-rc2-mm1+ #39
       Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
       Google 01/01/2011
       RIP: 0010:skb_panic+0x15c/0x1f0 net/core/skbuff.c:100
       RSP: 0018:ffff8801db307508 EFLAGS: 00010286
       RAX: 0000000000000082 RBX: ffff8801c517e840 RCX: 0000000000000000
       RDX: 0000000000000082 RSI: 1ffff1003b660e61 RDI: ffffed003b660e95
       RBP: ffff8801db307570 R08: 1ffff1003b660e23 R09: 0000000000000000
       R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff85bd4020
       R13: ffffffff84754ed2 R14: 0000000000000014 R15: ffff8801c4e26540
       FS:  0000000000000000(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 0000000000463610 CR3: 00000001c6698000 CR4: 00000000001406e0
       DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
       DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
       Call Trace:
        <IRQ>
        skb_over_panic net/core/skbuff.c:109 [inline]
        skb_put+0x181/0x1c0 net/core/skbuff.c:1694
        add_grhead.isra.24+0x42/0x3b0 net/ipv6/mcast.c:1695
        add_grec+0xa55/0x1060 net/ipv6/mcast.c:1817
        mld_send_cr net/ipv6/mcast.c:1903 [inline]
        mld_ifc_timer_expire+0x4d2/0x770 net/ipv6/mcast.c:2448
        call_timer_fn+0x23b/0x840 kernel/time/timer.c:1320
        expire_timers kernel/time/timer.c:1357 [inline]
        __run_timers+0x7e1/0xb60 kernel/time/timer.c:1660
        run_timer_softirq+0x4c/0xb0 kernel/time/timer.c:1686
        __do_softirq+0x29d/0xbb2 kernel/softirq.c:285
        invoke_softirq kernel/softirq.c:365 [inline]
        irq_exit+0x1d3/0x210 kernel/softirq.c:405
        exiting_irq arch/x86/include/asm/apic.h:540 [inline]
        smp_apic_timer_interrupt+0x16b/0x700 arch/x86/kernel/apic/apic.c:1052
        apic_timer_interrupt+0xa9/0xb0 arch/x86/entry/entry_64.S:920
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: Nsyzbot <syzkaller@googlegroups.com>
      Tested-by: NXin Long <lucien.xin@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b9b312a7
  5. 13 12月, 2017 1 次提交
  6. 12 12月, 2017 4 次提交
  7. 11 12月, 2017 2 次提交
  8. 09 12月, 2017 7 次提交
  9. 08 12月, 2017 4 次提交