07 Dec, 2020

1 commit

  • Guillaume noticed that: for segments udp_queue_rcv_one_skb() returns the
    proto, and it should pass "ret" unmodified to ip_protocol_deliver_rcu().
    Otherwize, with a negtive value passed, it will underflow inet_protos.

    This can be reproduced with IPIP FOU:

    # ip fou add port 5555 ipproto 4
    # ethtool -K eth1 rx-gro-list on

    Fixes: cf329aa42b66 ("udp: cope with UDP GRO packet misdirection")
    Reported-by: Guillaume Nault
    Signed-off-by: Xin Long
    Signed-off-by: David S. Miller

    Xin Long
     

25 Aug, 2020

1 commit


31 Jul, 2020

1 commit

  • When BPF sk lookup invokes reuseport handling for the selected socket, it
    should ignore the fact that reuseport group can contain connected UDP
    sockets. With BPF sk lookup this is not relevant as we are not scoring
    sockets to find the best match, which might be a connected UDP socket.

    Fix it by unconditionally accepting the socket selected by reuseport.

    This fixes the following two failures reported by test_progs.

    # ./test_progs -t sk_lookup
    ...
    #73/14 UDP IPv4 redir and reuseport with conns:FAIL
    ...
    #73/20 UDP IPv6 redir and reuseport with conns:FAIL
    ...

    Fixes: a57066b1a019 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
    Reported-by: Alexei Starovoitov
    Signed-off-by: Jakub Sitnicki
    Signed-off-by: Daniel Borkmann
    Link: https://lore.kernel.org/bpf/20200726120228.1414348-1-jakub@cloudflare.com

    Jakub Sitnicki
     

26 Jul, 2020

3 commits

  • This patch refactored target bpf_iter_init_seq_priv_t callback
    function to accept additional information. This will be needed
    in later patches for map element targets since a particular
    map should be passed to traverse elements for that particular
    map. In the future, other information may be passed to target
    as well, e.g., pid, cgroup id, etc. to customize the iterator.

    Signed-off-by: Yonghong Song
    Signed-off-by: Alexei Starovoitov
    Link: https://lore.kernel.org/bpf/20200723184110.590156-1-yhs@fb.com

    Yonghong Song
     
  • There is no functionality change for this patch.
    Struct bpf_iter_reg is used to register a bpf_iter target,
    which includes information for both prog_load, link_create
    and seq_file creation.

    This patch puts fields related seq_file creation into
    a different structure. This will be useful for map
    elements iterator where one iterator covers different
    map types and different map types may have different
    seq_ops, init/fini private_data function and
    private_data size.

    Signed-off-by: Yonghong Song
    Signed-off-by: Alexei Starovoitov
    Link: https://lore.kernel.org/bpf/20200723184109.590030-1-yhs@fb.com

    Yonghong Song
     
  • The UDP reuseport conflict was a little bit tricky.

    The net-next code, via bpf-next, extracted the reuseport handling
    into a helper so that the BPF sk lookup code could invoke it.

    At the same time, the logic for reuseport handling of unconnected
    sockets changed via commit efc6b6f6c3113e8b203b9debfb72d81e0f3dcace
    which changed the logic to carry on the reuseport result into the
    rest of the lookup loop if we do not return immediately.

    This requires moving the reuseport_has_conns() logic into the callers.

    While we are here, get rid of inline directives as they do not belong
    in foo.c files.

    The other changes were cases of more straightforward overlapping
    modifications.

    Signed-off-by: David S. Miller

    David S. Miller
     

25 Jul, 2020

2 commits


23 Jul, 2020

1 commit

  • Alexei Starovoitov says:

    ====================
    pull-request: bpf-next 2020-07-21

    The following pull-request contains BPF updates for your *net-next* tree.

    We've added 46 non-merge commits during the last 6 day(s) which contain
    a total of 68 files changed, 4929 insertions(+), 526 deletions(-).

    The main changes are:

    1) Run BPF program on socket lookup, from Jakub.

    2) Introduce cpumap, from Lorenzo.

    3) s390 JIT fixes, from Ilya.

    4) teach riscv JIT to emit compressed insns, from Luke.

    5) use build time computed BTF ids in bpf iter, from Yonghong.
    ====================

    Purely independent overlapping changes in both filter.h and xdp.h

    Signed-off-by: David S. Miller

    David S. Miller
     

22 Jul, 2020

3 commits

  • We can't use IS_UDPLITE to replace udp_sk->pcflag when UDPLITE_RECV_CC is
    checked.

    Fixes: b2bf1e2659b1 ("[UDP]: Clean up for IS_UDPLITE macro")
    Signed-off-by: Miaohe Lin
    Signed-off-by: David S. Miller

    Miaohe Lin
     
  • Currently, SO_REUSEPORT does not work well if connected sockets are in a
    UDP reuseport group.

    Then reuseport_has_conns() returns true and the result of
    reuseport_select_sock() is discarded. Also, unconnected sockets have the
    same score, hence only does the first unconnected socket in udp_hslot
    always receive all packets sent to unconnected sockets.

    So, the result of reuseport_select_sock() should be used for load
    balancing.

    The noteworthy point is that the unconnected sockets placed after
    connected sockets in sock_reuseport.socks will receive more packets than
    others because of the algorithm in reuseport_select_sock().

    index | connected | reciprocal_scale | result
    ---------------------------------------------
    0 | no | 20% | 40%
    1 | no | 20% | 20%
    2 | yes | 20% | 0%
    3 | no | 20% | 40%
    4 | yes | 20% | 0%

    If most of the sockets are connected, this can be a problem, but it still
    works better than now.

    Fixes: acdcecc61285 ("udp: correct reuseport selection with connected sockets")
    CC: Willem de Bruijn
    Reviewed-by: Benjamin Herrenschmidt
    Signed-off-by: Kuniyuki Iwashima
    Acked-by: Willem de Bruijn
    Signed-off-by: David S. Miller

    Kuniyuki Iwashima
     
  • One additional field btf_id is added to struct
    bpf_ctx_arg_aux to store the precomputed btf_ids.
    The btf_id is computed at build time with
    BTF_ID_LIST or BTF_ID_LIST_GLOBAL macro definitions.
    All existing bpf iterators are changed to used
    pre-compute btf_ids.

    Signed-off-by: Yonghong Song
    Signed-off-by: Alexei Starovoitov
    Link: https://lore.kernel.org/bpf/20200720163403.1393551-1-yhs@fb.com

    Yonghong Song
     

20 Jul, 2020

1 commit


18 Jul, 2020

2 commits

  • Following INET/TCP socket lookup changes, modify UDP socket lookup to let
    BPF program select a receiving socket before searching for a socket by
    destination address and port as usual.

    Lookup of connected sockets that match packet 4-tuple is unaffected by this
    change. BPF program runs, and potentially overrides the lookup result, only
    if a 4-tuple match was not found.

    Suggested-by: Marek Majkowski
    Signed-off-by: Jakub Sitnicki
    Signed-off-by: Alexei Starovoitov
    Acked-by: Andrii Nakryiko
    Link: https://lore.kernel.org/bpf/20200717103536.397595-9-jakub@cloudflare.com

    Jakub Sitnicki
     
  • Prepare for calling into reuseport from __udp4_lib_lookup as well.

    Signed-off-by: Jakub Sitnicki
    Signed-off-by: Alexei Starovoitov
    Acked-by: Andrii Nakryiko
    Link: https://lore.kernel.org/bpf/20200717103536.397595-8-jakub@cloudflare.com

    Jakub Sitnicki
     

14 Jul, 2020

1 commit

  • Simple fixes which require no deep knowledge of the code.

    Cc: Paul Moore
    Cc: Alexey Kuznetsov
    Cc: Eric Dumazet
    Signed-off-by: Andrew Lunn
    Acked-by: Paul Moore
    Signed-off-by: David S. Miller

    Andrew Lunn
     

25 Jun, 2020

2 commits

  • The bpf iterator for udp is implemented. Both udp4 and udp6
    sockets will be traversed. It is up to bpf program to
    filter for udp4 or udp6 only, or both families of sockets.

    Signed-off-by: Yonghong Song
    Signed-off-by: Alexei Starovoitov
    Acked-by: Martin KaFai Lau
    Link: https://lore.kernel.org/bpf/20200623230813.3988404-1-yhs@fb.com

    Yonghong Song
     
  • Similar to tcp_iter_state, a new field bpf_seq_afinfo is
    added to udp_iter_state to provide bpf udp iterator
    afinfo.

    This does not change /proc/net/{udp, udp6} behavior. But
    it enables bpf iterator to avoid get afinfo from PDE_DATA
    and iterate through all udp and udp6 sockets in one pass.

    Signed-off-by: Yonghong Song
    Signed-off-by: Alexei Starovoitov
    Acked-by: Martin KaFai Lau
    Link: https://lore.kernel.org/bpf/20200623230812.3988347-1-yhs@fb.com

    Yonghong Song
     

28 Apr, 2020

1 commit


31 Mar, 2020

2 commits


30 Mar, 2020

1 commit

  • The SKB_SGO_CB_OFFSET should be SKB_GSO_CB_OFFSET which means the
    offset of the GSO in skb cb. This patch fixes the typo.

    Fixes: 9207f9d45b0a ("net: preserve IP control block during GSO segmentation")
    Signed-off-by: Cambda Zhu
    Signed-off-by: David S. Miller

    Cambda Zhu
     

13 Mar, 2020

1 commit

  • Convert the various uses of fallthrough comments to fallthrough;

    Done via script
    Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/

    And by hand:

    net/ipv6/ip6_fib.c has a fallthrough comment outside of an #ifdef block
    that causes gcc to emit a warning if converted in-place.

    So move the new fallthrough; inside the containing #ifdef/#endif too.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

29 Feb, 2020

1 commit

  • The only users for such argument are the UDP protocol and the UNIX
    socket family. We can safely reclaim the accounted memory directly
    from the UDP code and, after the previous patch, we can do scm
    stats accounting outside the datagram helpers.

    Overall this cleans up a bit some datagram-related helpers, and
    avoids an indirect call per packet in the UDP receive path.

    v1 -> v2:
    - call scm_stat_del() only when not peeking - Kirill
    - fix build issue with CONFIG_INET_ESPINTCP

    Signed-off-by: Paolo Abeni
    Reviewed-by: Kirill Tkhai
    Reviewed-by: Willem de Bruijn
    Signed-off-by: David S. Miller

    Paolo Abeni
     

20 Feb, 2020

1 commit

  • As of the below commit, udp sockets bound to a specific address can
    coexist with one bound to the any addr for the same port.

    The commit also phased out the use of socket hashing based only on
    port (hslot), in favor of always hashing on {addr, port} (hslot2).

    The change broke the following behavior with disconnect (AF_UNSPEC):

    server binds to 0.0.0.0:1337
    server connects to 127.0.0.1:80
    server disconnects
    client connects to 127.0.0.1:1337
    client sends "hello"
    server reads "hello" // times out, packet did not find sk

    On connect the server acquires a specific source addr suitable for
    routing to its destination. On disconnect it reverts to the any addr.

    The connect call triggers a rehash to a different hslot2. On
    disconnect, add the same to return to the original hslot2.

    Skip this step if the socket is going to be unhashed completely.

    Fixes: 4cdeeee9252a ("net: udp: prefer listeners bound to an address")
    Reported-by: Pavel Roskin
    Signed-off-by: Willem de Bruijn
    Reviewed-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Willem de Bruijn
     

26 Jan, 2020

1 commit


23 Jan, 2020

1 commit

  • This reverts commit 0d4a6608f68c7532dcbfec2ea1150c9761767d03.

    Williem reported that after commit 0d4a6608f68c ("udp: do rmem bulk
    free even if the rx sk queue is empty") the memory allocated by
    an almost idle system with many UDP sockets can grow a lot.

    For stable kernel keep the solution as simple as possible and revert
    the offending commit.

    Reported-by: Willem de Bruijn
    Diagnosed-by: Eric Dumazet
    Fixes: 0d4a6608f68c ("udp: do rmem bulk free even if the rx sk queue is empty")
    Signed-off-by: Paolo Abeni
    Acked-by: Willem de Bruijn
    Signed-off-by: David S. Miller

    Paolo Abeni
     

21 Jan, 2020

1 commit

  • Steffen Klassert says:

    ====================
    pull request (net-next): ipsec-next 2020-01-21

    1) Add support for TCP encapsulation of IKE and ESP messages,
    as defined by RFC 8229. Patchset from Sabrina Dubroca.

    Please note that there is a merge conflict in:

    net/unix/af_unix.c

    between commit:

    3c32da19a858 ("unix: Show number of pending scm files of receive queue in fdinfo")

    from the net-next tree and commit:

    b50b0580d27b ("net: add queue argument to __skb_wait_for_more_packets and __skb_{,try_}recv_datagram")

    from the ipsec-next tree.

    The conflict can be solved as done in linux-next.

    Please pull or let me know if there are problems.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

15 Jan, 2020

1 commit


25 Dec, 2019

1 commit

  • When the size of the receive buffer for a socket is close to 2^31 when
    computing if we have enough space in the buffer to copy a packet from
    the queue to the buffer we might hit an integer overflow.

    When an user set net.core.rmem_default to a value close to 2^31 UDP
    packets are dropped because of this overflow. This can be visible, for
    instance, with failure to resolve hostnames.

    This can be fixed by casting sk_rcvbuf (which is an int) to unsigned
    int, similarly to how it is done in TCP.

    Signed-off-by: Antonio Messina
    Signed-off-by: David S. Miller

    Antonio Messina
     

09 Dec, 2019

1 commit


23 Nov, 2019

2 commits

  • Minor conflict in drivers/s390/net/qeth_l2_main.c, kept the lock
    from commit c8183f548902 ("s390/qeth: fix potential deadlock on
    workqueue flush"), removed the code which was removed by commit
    9897d583b015 ("s390/qeth: consolidate some duplicated HW cmd code").

    Signed-off-by: Jakub Kicinski

    Jakub Kicinski
     
  • Once udp stack has set the UDP_SKB_IS_STATELESS flag, later skb free
    assumes all skb head state has been dropped already.

    This will leak the extension memory in case the skb has extensions other
    than the ipsec secpath, e.g. bridge nf data.

    To fix this, set the UDP_SKB_IS_STATELESS flag only if we don't have
    extensions or if the extension space can be free'd.

    Fixes: 895b5c9f206eb7d25dc1360a ("netfilter: drop bridge nf reset from nf_reset")
    Cc: Paolo Abeni
    Reported-by: Byron Stanoszek
    Signed-off-by: Florian Westphal
    Acked-by: Paolo Abeni
    Signed-off-by: David S. Miller

    Florian Westphal
     

14 Nov, 2019

1 commit


31 Oct, 2019

1 commit

  • This socket field can be read and written by concurrent cpus.

    Use READ_ONCE() and WRITE_ONCE() annotations to document this,
    and avoid some compiler 'optimizations'.

    KCSAN reported :

    BUG: KCSAN: data-race in tcp_v4_rcv / tcp_v4_rcv

    write to 0xffff88812220763c of 4 bytes by interrupt on cpu 0:
    sk_incoming_cpu_update include/net/sock.h:953 [inline]
    tcp_v4_rcv+0x1b3c/0x1bb0 net/ipv4/tcp_ipv4.c:1934
    ip_protocol_deliver_rcu+0x4d/0x420 net/ipv4/ip_input.c:204
    ip_local_deliver_finish+0x110/0x140 net/ipv4/ip_input.c:231
    NF_HOOK include/linux/netfilter.h:305 [inline]
    NF_HOOK include/linux/netfilter.h:299 [inline]
    ip_local_deliver+0x133/0x210 net/ipv4/ip_input.c:252
    dst_input include/net/dst.h:442 [inline]
    ip_rcv_finish+0x121/0x160 net/ipv4/ip_input.c:413
    NF_HOOK include/linux/netfilter.h:305 [inline]
    NF_HOOK include/linux/netfilter.h:299 [inline]
    ip_rcv+0x18f/0x1a0 net/ipv4/ip_input.c:523
    __netif_receive_skb_one_core+0xa7/0xe0 net/core/dev.c:5010
    __netif_receive_skb+0x37/0xf0 net/core/dev.c:5124
    process_backlog+0x1d3/0x420 net/core/dev.c:5955
    napi_poll net/core/dev.c:6392 [inline]
    net_rx_action+0x3ae/0xa90 net/core/dev.c:6460
    __do_softirq+0x115/0x33f kernel/softirq.c:292
    do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1082
    do_softirq.part.0+0x6b/0x80 kernel/softirq.c:337
    do_softirq kernel/softirq.c:329 [inline]
    __local_bh_enable_ip+0x76/0x80 kernel/softirq.c:189

    read to 0xffff88812220763c of 4 bytes by interrupt on cpu 1:
    sk_incoming_cpu_update include/net/sock.h:952 [inline]
    tcp_v4_rcv+0x181a/0x1bb0 net/ipv4/tcp_ipv4.c:1934
    ip_protocol_deliver_rcu+0x4d/0x420 net/ipv4/ip_input.c:204
    ip_local_deliver_finish+0x110/0x140 net/ipv4/ip_input.c:231
    NF_HOOK include/linux/netfilter.h:305 [inline]
    NF_HOOK include/linux/netfilter.h:299 [inline]
    ip_local_deliver+0x133/0x210 net/ipv4/ip_input.c:252
    dst_input include/net/dst.h:442 [inline]
    ip_rcv_finish+0x121/0x160 net/ipv4/ip_input.c:413
    NF_HOOK include/linux/netfilter.h:305 [inline]
    NF_HOOK include/linux/netfilter.h:299 [inline]
    ip_rcv+0x18f/0x1a0 net/ipv4/ip_input.c:523
    __netif_receive_skb_one_core+0xa7/0xe0 net/core/dev.c:5010
    __netif_receive_skb+0x37/0xf0 net/core/dev.c:5124
    process_backlog+0x1d3/0x420 net/core/dev.c:5955
    napi_poll net/core/dev.c:6392 [inline]
    net_rx_action+0x3ae/0xa90 net/core/dev.c:6460
    __do_softirq+0x115/0x33f kernel/softirq.c:292
    run_ksoftirqd+0x46/0x60 kernel/softirq.c:603
    smpboot_thread_fn+0x37d/0x4a0 kernel/smpboot.c:165

    Reported by Kernel Concurrency Sanitizer on:
    CPU: 1 PID: 16 Comm: ksoftirqd/1 Not tainted 5.4.0-rc3+ #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011

    Signed-off-by: Eric Dumazet
    Reported-by: syzbot
    Signed-off-by: David S. Miller

    Eric Dumazet
     

29 Oct, 2019

3 commits

  • KCSAN reported a data-race in udp_set_dev_scratch() [1]

    The issue here is that we must not write over skb fields
    if skb is shared. A similar issue has been fixed in commit
    89c22d8c3b27 ("net: Fix skb csum races when peeking")

    While we are at it, use a helper only dealing with
    udp_skb_scratch(skb)->csum_unnecessary, as this allows
    udp_set_dev_scratch() to be called once and thus inlined.

    [1]
    BUG: KCSAN: data-race in udp_set_dev_scratch / udpv6_recvmsg

    write to 0xffff888120278317 of 1 bytes by task 10411 on cpu 1:
    udp_set_dev_scratch+0xea/0x200 net/ipv4/udp.c:1308
    __first_packet_length+0x147/0x420 net/ipv4/udp.c:1556
    first_packet_length+0x68/0x2a0 net/ipv4/udp.c:1579
    udp_poll+0xea/0x110 net/ipv4/udp.c:2720
    sock_poll+0xed/0x250 net/socket.c:1256
    vfs_poll include/linux/poll.h:90 [inline]
    do_select+0x7d0/0x1020 fs/select.c:534
    core_sys_select+0x381/0x550 fs/select.c:677
    do_pselect.constprop.0+0x11d/0x160 fs/select.c:759
    __do_sys_pselect6 fs/select.c:784 [inline]
    __se_sys_pselect6 fs/select.c:769 [inline]
    __x64_sys_pselect6+0x12e/0x170 fs/select.c:769
    do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
    entry_SYSCALL_64_after_hwframe+0x44/0xa9

    read to 0xffff888120278317 of 1 bytes by task 10413 on cpu 0:
    udp_skb_csum_unnecessary include/net/udp.h:358 [inline]
    udpv6_recvmsg+0x43e/0xe90 net/ipv6/udp.c:310
    inet6_recvmsg+0xbb/0x240 net/ipv6/af_inet6.c:592
    sock_recvmsg_nosec+0x5c/0x70 net/socket.c:871
    ___sys_recvmsg+0x1a0/0x3e0 net/socket.c:2480
    do_recvmmsg+0x19a/0x5c0 net/socket.c:2601
    __sys_recvmmsg+0x1ef/0x200 net/socket.c:2680
    __do_sys_recvmmsg net/socket.c:2703 [inline]
    __se_sys_recvmmsg net/socket.c:2696 [inline]
    __x64_sys_recvmmsg+0x89/0xb0 net/socket.c:2696
    do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
    entry_SYSCALL_64_after_hwframe+0x44/0xa9

    Reported by Kernel Concurrency Sanitizer on:
    CPU: 0 PID: 10413 Comm: syz-executor.0 Not tainted 5.4.0-rc3+ #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011

    Fixes: 2276f58ac589 ("udp: use a separate rx queue for packet reception")
    Signed-off-by: Eric Dumazet
    Reported-by: syzbot
    Cc: Paolo Abeni
    Reviewed-by: Paolo Abeni
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Many poll() handlers are lockless. Using skb_queue_empty_lockless()
    instead of skb_queue_empty() is more appropriate.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • syzbot reported a data-race [1].

    We should use skb_queue_empty_lockless() to document that we are
    not ensuring a mutual exclusion and silence KCSAN.

    [1]
    BUG: KCSAN: data-race in __skb_recv_udp / __udp_enqueue_schedule_skb

    write to 0xffff888122474b50 of 8 bytes by interrupt on cpu 0:
    __skb_insert include/linux/skbuff.h:1852 [inline]
    __skb_queue_before include/linux/skbuff.h:1958 [inline]
    __skb_queue_tail include/linux/skbuff.h:1991 [inline]
    __udp_enqueue_schedule_skb+0x2c1/0x410 net/ipv4/udp.c:1470
    __udp_queue_rcv_skb net/ipv4/udp.c:1940 [inline]
    udp_queue_rcv_one_skb+0x7bd/0xc70 net/ipv4/udp.c:2057
    udp_queue_rcv_skb+0xb5/0x400 net/ipv4/udp.c:2074
    udp_unicast_rcv_skb.isra.0+0x7e/0x1c0 net/ipv4/udp.c:2233
    __udp4_lib_rcv+0xa44/0x17c0 net/ipv4/udp.c:2300
    udp_rcv+0x2b/0x40 net/ipv4/udp.c:2470
    ip_protocol_deliver_rcu+0x4d/0x420 net/ipv4/ip_input.c:204
    ip_local_deliver_finish+0x110/0x140 net/ipv4/ip_input.c:231
    NF_HOOK include/linux/netfilter.h:305 [inline]
    NF_HOOK include/linux/netfilter.h:299 [inline]
    ip_local_deliver+0x133/0x210 net/ipv4/ip_input.c:252
    dst_input include/net/dst.h:442 [inline]
    ip_rcv_finish+0x121/0x160 net/ipv4/ip_input.c:413
    NF_HOOK include/linux/netfilter.h:305 [inline]
    NF_HOOK include/linux/netfilter.h:299 [inline]
    ip_rcv+0x18f/0x1a0 net/ipv4/ip_input.c:523
    __netif_receive_skb_one_core+0xa7/0xe0 net/core/dev.c:5010
    __netif_receive_skb+0x37/0xf0 net/core/dev.c:5124
    process_backlog+0x1d3/0x420 net/core/dev.c:5955

    read to 0xffff888122474b50 of 8 bytes by task 8921 on cpu 1:
    skb_queue_empty include/linux/skbuff.h:1494 [inline]
    __skb_recv_udp+0x18d/0x500 net/ipv4/udp.c:1653
    udp_recvmsg+0xe1/0xb10 net/ipv4/udp.c:1712
    inet_recvmsg+0xbb/0x250 net/ipv4/af_inet.c:838
    sock_recvmsg_nosec+0x5c/0x70 net/socket.c:871
    ___sys_recvmsg+0x1a0/0x3e0 net/socket.c:2480
    do_recvmmsg+0x19a/0x5c0 net/socket.c:2601
    __sys_recvmmsg+0x1ef/0x200 net/socket.c:2680
    __do_sys_recvmmsg net/socket.c:2703 [inline]
    __se_sys_recvmmsg net/socket.c:2696 [inline]
    __x64_sys_recvmmsg+0x89/0xb0 net/socket.c:2696
    do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
    entry_SYSCALL_64_after_hwframe+0x44/0xa9

    Reported by Kernel Concurrency Sanitizer on:
    CPU: 1 PID: 8921 Comm: syz-executor.4 Not tainted 5.4.0-rc3+ #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011

    Signed-off-by: Eric Dumazet
    Reported-by: syzbot
    Signed-off-by: David S. Miller

    Eric Dumazet
     

09 Oct, 2019

1 commit


03 Oct, 2019

1 commit

  • Prior to this change an application sending 1 even
    if the application has enabled segmentation. I've also updated the
    relevant udpgso selftests.

    Fixes: bec1f6f69736 ("udp: generate gso with UDP_SEGMENT")
    Signed-off-by: Josh Hunt
    Reviewed-by: Willem de Bruijn
    Reviewed-by: Alexander Duyck
    Signed-off-by: David S. Miller

    Josh Hunt