1. 06 6月, 2022 1 次提交
  2. 03 6月, 2022 3 次提交
    • E
      net/af_packet: make sure to pull mac header · e9d3f809
      Eric Dumazet 提交于
      GSO assumes skb->head contains link layer headers.
      
      tun device in some case can provide base 14 bytes,
      regardless of VLAN being used or not.
      
      After blamed commit, we can end up setting a network
      header offset of 18+, we better pull the missing
      bytes to avoid a posible crash in GSO.
      
      syzbot report was:
      kernel BUG at include/linux/skbuff.h:2699!
      invalid opcode: 0000 [#1] PREEMPT SMP KASAN
      CPU: 1 PID: 3601 Comm: syz-executor210 Not tainted 5.18.0-syzkaller-11338-g2c5ca23f #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      RIP: 0010:__skb_pull include/linux/skbuff.h:2699 [inline]
      RIP: 0010:skb_mac_gso_segment+0x48f/0x530 net/core/gro.c:136
      Code: 00 48 c7 c7 00 96 d4 8a c6 05 cb d3 45 06 01 e8 26 bb d0 01 e9 2f fd ff ff 49 c7 c4 ea ff ff ff e9 f1 fe ff ff e8 91 84 19 fa <0f> 0b 48 89 df e8 97 44 66 fa e9 7f fd ff ff e8 ad 44 66 fa e9 48
      RSP: 0018:ffffc90002e2f4b8 EFLAGS: 00010293
      RAX: 0000000000000000 RBX: 0000000000000012 RCX: 0000000000000000
      RDX: ffff88805bb58000 RSI: ffffffff8760ed0f RDI: 0000000000000004
      RBP: 0000000000005dbc R08: 0000000000000004 R09: 0000000000000fe0
      R10: 0000000000000fe4 R11: 0000000000000000 R12: 0000000000000fe0
      R13: ffff88807194d780 R14: 1ffff920005c5e9b R15: 0000000000000012
      FS:  000055555730f300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00000000200015c0 CR3: 0000000071ff8000 CR4: 0000000000350ee0
      Call Trace:
       <TASK>
       __skb_gso_segment+0x327/0x6e0 net/core/dev.c:3411
       skb_gso_segment include/linux/netdevice.h:4749 [inline]
       validate_xmit_skb+0x6bc/0xf10 net/core/dev.c:3669
       validate_xmit_skb_list+0xbc/0x120 net/core/dev.c:3719
       sch_direct_xmit+0x3d1/0xbe0 net/sched/sch_generic.c:327
       __dev_xmit_skb net/core/dev.c:3815 [inline]
       __dev_queue_xmit+0x14a1/0x3a00 net/core/dev.c:4219
       packet_snd net/packet/af_packet.c:3071 [inline]
       packet_sendmsg+0x21cb/0x5550 net/packet/af_packet.c:3102
       sock_sendmsg_nosec net/socket.c:714 [inline]
       sock_sendmsg+0xcf/0x120 net/socket.c:734
       ____sys_sendmsg+0x6eb/0x810 net/socket.c:2492
       ___sys_sendmsg+0xf3/0x170 net/socket.c:2546
       __sys_sendmsg net/socket.c:2575 [inline]
       __do_sys_sendmsg net/socket.c:2584 [inline]
       __se_sys_sendmsg net/socket.c:2582 [inline]
       __x64_sys_sendmsg+0x132/0x220 net/socket.c:2582
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x46/0xb0
      RIP: 0033:0x7f4b95da06c9
      Code: 28 c3 e8 4a 15 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
      RSP: 002b:00007ffd7defc4c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
      RAX: ffffffffffffffda RBX: 00007ffd7defc4f0 RCX: 00007f4b95da06c9
      RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000000000003
      RBP: 0000000000000003 R08: bb1414ac00000050 R09: bb1414ac00000050
      R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000000
      R13: 00007ffd7defc4e0 R14: 00007ffd7defc4d8 R15: 00007ffd7defc4d4
       </TASK>
      
      Fixes: dfed913e ("net/af_packet: add VLAN support for AF_PACKET SOCK_RAW GSO")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: Nsyzbot <syzkaller@googlegroups.com>
      Acked-by: NHangbin Liu <liuhangbin@gmail.com>
      Acked-by: NWillem de Bruijn <willemb@google.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      e9d3f809
    • E
      net: CONFIG_DEBUG_NET depends on CONFIG_NET · eb0b39ef
      Eric Dumazet 提交于
      It makes little sense to debug networking stacks
      if networking is not compiled in.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      eb0b39ef
    • H
      tipc: check attribute length for bearer name · 7f36f798
      Hoang Le 提交于
      syzbot reported uninit-value:
      =====================================================
      BUG: KMSAN: uninit-value in string_nocheck lib/vsprintf.c:644 [inline]
      BUG: KMSAN: uninit-value in string+0x4f9/0x6f0 lib/vsprintf.c:725
       string_nocheck lib/vsprintf.c:644 [inline]
       string+0x4f9/0x6f0 lib/vsprintf.c:725
       vsnprintf+0x2222/0x3650 lib/vsprintf.c:2806
       vprintk_store+0x537/0x2150 kernel/printk/printk.c:2158
       vprintk_emit+0x28b/0xab0 kernel/printk/printk.c:2256
       vprintk_default+0x86/0xa0 kernel/printk/printk.c:2283
       vprintk+0x15f/0x180 kernel/printk/printk_safe.c:50
       _printk+0x18d/0x1cf kernel/printk/printk.c:2293
       tipc_enable_bearer net/tipc/bearer.c:371 [inline]
       __tipc_nl_bearer_enable+0x2022/0x22a0 net/tipc/bearer.c:1033
       tipc_nl_bearer_enable+0x6c/0xb0 net/tipc/bearer.c:1042
       genl_family_rcv_msg_doit net/netlink/genetlink.c:731 [inline]
      
      - Do sanity check the attribute length for TIPC_NLA_BEARER_NAME.
      - Do not use 'illegal name' in printing message.
      
      Reported-by: syzbot+e820fdc8ce362f2dea51@syzkaller.appspotmail.com
      Fixes: cb30a633 ("tipc: refactor function tipc_enable_bearer()")
      Acked-by: NJon Maloy <jmaloy@redhat.com>
      Signed-off-by: NHoang Le <hoang.h.le@dektech.com.au>
      Link: https://lore.kernel.org/r/20220602063053.5892-1-hoang.h.le@dektech.com.auSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      7f36f798
  3. 02 6月, 2022 1 次提交
    • D
      ax25: Fix ax25 session cleanup problems · 7d8a3a47
      Duoming Zhou 提交于
      There are session cleanup problems in ax25_release() and
      ax25_disconnect(). If we setup a session and then disconnect,
      the disconnected session is still in "LISTENING" state that
      is shown below.
      
      Active AX.25 sockets
      Dest       Source     Device  State        Vr/Vs    Send-Q  Recv-Q
      DL9SAU-4   DL9SAU-3   ???     LISTENING    000/000  0       0
      DL9SAU-3   DL9SAU-4   ???     LISTENING    000/000  0       0
      
      The first reason is caused by del_timer_sync() in ax25_release().
      The timers of ax25 are used for correct session cleanup. If we use
      ax25_release() to close ax25 sessions and ax25_dev is not null,
      the del_timer_sync() functions in ax25_release() will execute.
      As a result, the sessions could not be cleaned up correctly,
      because the timers have stopped.
      
      In order to solve this problem, this patch adds a device_up flag
      in ax25_dev in order to judge whether the device is up. If there
      are sessions to be cleaned up, the del_timer_sync() in
      ax25_release() will not execute. What's more, we add ax25_cb_del()
      in ax25_kill_by_device(), because the timers have been stopped
      and there are no functions that could delete ax25_cb if we do not
      call ax25_release(). Finally, we reorder the position of
      ax25_list_lock in ax25_cb_del() in order to synchronize among
      different functions that call ax25_cb_del().
      
      The second reason is caused by improper check in ax25_disconnect().
      The incoming ax25 sessions which ax25->sk is null will close
      heartbeat timer, because the check "if(!ax25->sk || ..)" is
      satisfied. As a result, the session could not be cleaned up properly.
      
      In order to solve this problem, this patch changes the improper
      check to "if(ax25->sk && ..)" in ax25_disconnect().
      
      What`s more, the ax25_disconnect() may be called twice, which is
      not necessary. For example, ax25_kill_by_device() calls
      ax25_disconnect() and sets ax25->state to AX25_STATE_0, but
      ax25_release() calls ax25_disconnect() again.
      
      In order to solve this problem, this patch add a check in
      ax25_release(). If the flag of ax25->sk equals to SOCK_DEAD,
      the ax25_disconnect() in ax25_release() should not be executed.
      
      Fixes: 82e31755 ("ax25: Fix UAF bugs in ax25 timers")
      Fixes: 8a367e74 ("ax25: Fix segfault after sock connection timeout")
      Reported-and-tested-by: NThomas Osterried <thomas@osterried.de>
      Signed-off-by: NDuoming Zhou <duoming@zju.edu.cn>
      Link: https://lore.kernel.org/r/20220530152158.108619-1-duoming@zju.edu.cnSigned-off-by: NPaolo Abeni <pabeni@redhat.com>
      7d8a3a47
  4. 01 6月, 2022 10 次提交
  5. 31 5月, 2022 2 次提交
  6. 28 5月, 2022 3 次提交
    • K
      net: nfc: Directly use ida_alloc()/free() · 91179917
      keliu 提交于
      Use ida_alloc()/ida_free() instead of deprecated
      ida_simple_get()/ida_simple_remove() .
      Signed-off-by: Nkeliu <liuke94@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      91179917
    • E
      tcp: fix tcp_mtup_probe_success vs wrong snd_cwnd · 11825765
      Eric Dumazet 提交于
      syzbot got a new report [1] finally pointing to a very old bug,
      added in initial support for MTU probing.
      
      tcp_mtu_probe() has checks about starting an MTU probe if
      tcp_snd_cwnd(tp) >= 11.
      
      But nothing prevents tcp_snd_cwnd(tp) to be reduced later
      and before the MTU probe succeeds.
      
      This bug would lead to potential zero-divides.
      
      Debugging added in commit 40570375 ("tcp: add accessors
      to read/set tp->snd_cwnd") has paid off :)
      
      While we are at it, address potential overflows in this code.
      
      [1]
      WARNING: CPU: 1 PID: 14132 at include/net/tcp.h:1219 tcp_mtup_probe_success+0x366/0x570 net/ipv4/tcp_input.c:2712
      Modules linked in:
      CPU: 1 PID: 14132 Comm: syz-executor.2 Not tainted 5.18.0-syzkaller-07857-gbabf0bb9 #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      RIP: 0010:tcp_snd_cwnd_set include/net/tcp.h:1219 [inline]
      RIP: 0010:tcp_mtup_probe_success+0x366/0x570 net/ipv4/tcp_input.c:2712
      Code: 74 08 48 89 ef e8 da 80 17 f9 48 8b 45 00 65 48 ff 80 80 03 00 00 48 83 c4 30 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 aa b0 c5 f8 <0f> 0b e9 16 fe ff ff 48 8b 4c 24 08 80 e1 07 38 c1 0f 8c c7 fc ff
      RSP: 0018:ffffc900079e70f8 EFLAGS: 00010287
      RAX: ffffffff88c0f7f6 RBX: ffff8880756e7a80 RCX: 0000000000040000
      RDX: ffffc9000c6c4000 RSI: 0000000000031f9e RDI: 0000000000031f9f
      RBP: 0000000000000000 R08: ffffffff88c0f606 R09: ffffc900079e7520
      R10: ffffed101011226d R11: 1ffff1101011226c R12: 1ffff1100eadcf50
      R13: ffff8880756e72c0 R14: 1ffff1100eadcf89 R15: dffffc0000000000
      FS:  00007f643236e700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00007f1ab3f1e2a0 CR3: 0000000064fe7000 CR4: 00000000003506e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
       <TASK>
       tcp_clean_rtx_queue+0x223a/0x2da0 net/ipv4/tcp_input.c:3356
       tcp_ack+0x1962/0x3c90 net/ipv4/tcp_input.c:3861
       tcp_rcv_established+0x7c8/0x1ac0 net/ipv4/tcp_input.c:5973
       tcp_v6_do_rcv+0x57b/0x1210 net/ipv6/tcp_ipv6.c:1476
       sk_backlog_rcv include/net/sock.h:1061 [inline]
       __release_sock+0x1d8/0x4c0 net/core/sock.c:2849
       release_sock+0x5d/0x1c0 net/core/sock.c:3404
       sk_stream_wait_memory+0x700/0xdc0 net/core/stream.c:145
       tcp_sendmsg_locked+0x111d/0x3fc0 net/ipv4/tcp.c:1410
       tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1448
       sock_sendmsg_nosec net/socket.c:714 [inline]
       sock_sendmsg net/socket.c:734 [inline]
       __sys_sendto+0x439/0x5c0 net/socket.c:2119
       __do_sys_sendto net/socket.c:2131 [inline]
       __se_sys_sendto net/socket.c:2127 [inline]
       __x64_sys_sendto+0xda/0xf0 net/socket.c:2127
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x46/0xb0
      RIP: 0033:0x7f6431289109
      Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
      RSP: 002b:00007f643236e168 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
      RAX: ffffffffffffffda RBX: 00007f643139c100 RCX: 00007f6431289109
      RDX: 00000000d0d0c2ac RSI: 0000000020000080 RDI: 000000000000000a
      RBP: 00007f64312e308d R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000
      R13: 00007fff372533af R14: 00007f643236e300 R15: 0000000000022000
      
      Fixes: 5d424d5a ("[TCP]: MTU probing")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: Nsyzbot <syzkaller@googlegroups.com>
      Acked-by: NYuchung Cheng <ycheng@google.com>
      Acked-by: NNeal Cardwell <ncardwell@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      11825765
    • G
      net/smc: fixes for converting from "struct smc_cdc_tx_pend **" to "struct smc_wr_tx_pend_priv *" · e225c9a5
      Guangguan Wang 提交于
      "struct smc_cdc_tx_pend **" can not directly convert
      to "struct smc_wr_tx_pend_priv *".
      
      Fixes: 2bced6ae ("net/smc: put slot when connection is killed")
      Signed-off-by: NGuangguan Wang <guangguan.wang@linux.alibaba.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e225c9a5
  7. 27 5月, 2022 6 次提交
    • P
      netfilter: nf_tables: set element extended ACK reporting support · b53c1166
      Pablo Neira Ayuso 提交于
      Report the element that causes problems via netlink extended ACK for set
      element commands.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      b53c1166
    • F
      netfilter: cttimeout: fix slab-out-of-bounds read in cttimeout_net_exit · aeed55a0
      Florian Westphal 提交于
      syzbot reports:
      BUG: KASAN: slab-out-of-bounds in __list_del_entry_valid+0xcc/0xf0 lib/list_debug.c:42
      [..]
       list_del include/linux/list.h:148 [inline]
       cttimeout_net_exit+0x211/0x540 net/netfilter/nfnetlink_cttimeout.c:617
      
      No reproducer so far. Looking at recent changes in this area
      its clear that the free_head must not be at the end of the
      structure because nf_ct_timeout structure has variable size.
      
      Reported-by: <syzbot+92968395eedbdbd3617d@syzkaller.appspotmail.com>
      Fixes: 78222bac ("netfilter: cttimeout: decouple unlink and free on netns destruction")
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      aeed55a0
    • F
      netfilter: nfnetlink: fix warn in nfnetlink_unbind · ffd219ef
      Florian Westphal 提交于
      syzbot reports following warn:
      WARNING: CPU: 0 PID: 3600 at net/netfilter/nfnetlink.c:703 nfnetlink_unbind+0x357/0x3b0 net/netfilter/nfnetlink.c:694
      
      The syzbot generated program does this:
      
      socket(AF_NETLINK, SOCK_RAW, NETLINK_NETFILTER) = 3
      setsockopt(3, SOL_NETLINK, NETLINK_DROP_MEMBERSHIP, [1], 4) = 0
      
      ... which triggers 'WARN_ON_ONCE(nfnlnet->ctnetlink_listeners == 0)' check.
      
      Instead of counting, just enable reporting for every bind request
      and check if we still have listeners on unbind.
      
      While at it, also add the needed bounds check on nfnl_group2type[]
      access.
      
      Reported-by: <syzbot+4903218f7fba0a2d6226@syzkaller.appspotmail.com>
      Reported-by: <syzbot+afd2d80e495f96049571@syzkaller.appspotmail.com>
      Fixes: 2794cdb0 ("netfilter: nfnetlink: allow to detect if ctnetlink listeners exist")
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      ffd219ef
    • J
      xen: switch gnttab_end_foreign_access() to take a struct page pointer · 49f8b459
      Juergen Gross 提交于
      Instead of a virtual kernel address use a pointer of the associated
      struct page as second parameter of gnttab_end_foreign_access().
      
      Most users have that pointer available already and are creating the
      virtual address from it, risking problems in case the memory is
      located in highmem.
      
      gnttab_end_foreign_access() itself won't need to get the struct page
      from the address again.
      Suggested-by: NJan Beulich <jbeulich@suse.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      Reviewed-by: NJan Beulich <jbeulich@suse.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      49f8b459
    • P
      netfilter: nft_limit: Clone packet limits' cost value · 558254b0
      Phil Sutter 提交于
      When cloning a packet-based limit expression, copy the cost value as
      well. Otherwise the new limit is not functional anymore.
      
      Fixes: 3b9e2ea6 ("netfilter: nft_limit: move stateful fields out of expression data")
      Signed-off-by: NPhil Sutter <phil@nwl.cc>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      558254b0
    • P
      netfilter: nf_tables: disallow non-stateful expression in sets earlier · 52077804
      Pablo Neira Ayuso 提交于
      Since 3e135cd4 ("netfilter: nft_dynset: dynamic stateful expression
      instantiation"), it is possible to attach stateful expressions to set
      elements.
      
      cd5125d8 ("netfilter: nf_tables: split set destruction in deactivate
      and destroy phase") introduces conditional destruction on the object to
      accomodate transaction semantics.
      
      nft_expr_init() calls expr->ops->init() first, then check for
      NFT_STATEFUL_EXPR, this stills allows to initialize a non-stateful
      lookup expressions which points to a set, which might lead to UAF since
      the set is not properly detached from the set->binding for this case.
      Anyway, this combination is non-sense from nf_tables perspective.
      
      This patch fixes this problem by checking for NFT_STATEFUL_EXPR before
      expr->ops->init() is called.
      
      The reporter provides a KASAN splat and a poc reproducer (similar to
      those autogenerated by syzbot to report use-after-free errors). It is
      unknown to me if they are using syzbot or if they use similar automated
      tool to locate the bug that they are reporting.
      
      For the record, this is the KASAN splat.
      
      [   85.431824] ==================================================================
      [   85.432901] BUG: KASAN: use-after-free in nf_tables_bind_set+0x81b/0xa20
      [   85.433825] Write of size 8 at addr ffff8880286f0e98 by task poc/776
      [   85.434756]
      [   85.434999] CPU: 1 PID: 776 Comm: poc Tainted: G        W         5.18.0+ #2
      [   85.436023] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014
      
      Fixes: 0b2d8a7b ("netfilter: nf_tables: add helper functions for expression handling")
      Reported-and-tested-by: NAaron Adams <edg-e@nccgroup.com>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      52077804
  8. 26 5月, 2022 3 次提交
  9. 25 5月, 2022 3 次提交
    • M
      xfrm: do not set IPv4 DF flag when encapsulating IPv6 frames <= 1280 bytes. · 6821ad87
      Maciej Żenczykowski 提交于
      One may want to have DF set on large packets to support discovering
      path mtu and limiting the size of generated packets (hence not
      setting the XFRM_STATE_NOPMTUDISC tunnel flag), while still
      supporting networks that are incapable of carrying even minimal
      sized IPv6 frames (post encapsulation).
      
      Having IPv4 Don't Frag bit set on encapsulated IPv6 frames that
      are not larger than the minimum IPv6 mtu of 1280 isn't useful,
      because the resulting ICMP Fragmentation Required error isn't
      actionable (even assuming you receive it) because IPv6 will not
      drop it's path mtu below 1280 anyway.  While the IPv4 stack
      could prefrag the packets post encap, this requires the ICMP
      error to be successfully delivered and causes a loss of the
      original IPv6 frame (thus requiring a retransmit and latency
      hit).  Luckily with IPv4 if we simply don't set the DF flag,
      we'll just make further fragmenting the packets some other
      router's problems.
      
      We'll still learn the correct IPv4 path mtu through encapsulation
      of larger IPv6 frames.
      
      I'm still not convinced this patch is entirely sufficient to make
      everything happy... but I don't see how it could possibly
      make things worse.
      
      See also recent:
        4ff2980b 'xfrm: fix tunnel model fragmentation behavior'
      and friends
      
      Cc: Lorenzo Colitti <lorenzo@google.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Lina Wang <lina.wang@mediatek.com>
      Cc: Steffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: NMaciej Zenczykowski <maze@google.com>
      Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
      6821ad87
    • M
      Revert "net: af_key: add check for pfkey_broadcast in function pfkey_process" · 9c90c9b3
      Michal Kubecek 提交于
      This reverts commit 4dc2a5a8.
      
      A non-zero return value from pfkey_broadcast() does not necessarily mean
      an error occurred as this function returns -ESRCH when no registered
      listener received the message. In particular, a call with
      BROADCAST_PROMISC_ONLY flag and null one_sk argument can never return
      zero so that this commit in fact prevents processing any PF_KEY message.
      One visible effect is that racoon daemon fails to find encryption
      algorithms like aes and refuses to start.
      
      Excluding -ESRCH return value would fix this but it's not obvious that
      we really want to bail out here and most other callers of
      pfkey_broadcast() also ignore the return value. Also, as pointed out by
      Steffen Klassert, PF_KEY is kind of deprecated and newer userspace code
      should use netlink instead so that we should only disturb the code for
      really important fixes.
      
      v2: add a comment explaining why is the return value ignored
      Signed-off-by: NMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
      9c90c9b3
    • L
      Revert "net/smc: fix listen processing for SMC-Rv2" · 9029ac03
      liuyacan 提交于
      This reverts commit 8c3b8dc5.
      
      Some rollback issue will be fixed in other patches in the future.
      
      Link: https://lore.kernel.org/all/20220523055056.2078994-1-liuyacan@corp.netease.com/
      
      Fixes: 8c3b8dc5 ("net/smc: fix listen processing for SMC-Rv2")
      Signed-off-by: Nliuyacan <liuyacan@corp.netease.com>
      Link: https://lore.kernel.org/r/20220524090230.2140302-1-liuyacan@corp.netease.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      9029ac03
  10. 24 5月, 2022 1 次提交
  11. 23 5月, 2022 7 次提交