bisecting cause commit starting from 9f68e3655aae6d49d6ba05dd263f99f33c2567af building syzkaller on c30117b2ace7866719409f4c11bf5433062b8169 testing commit 9f68e3655aae6d49d6ba05dd263f99f33c2567af with gcc (GCC) 8.1.0 kernel signature: bf904ab9b0f3006269281fd904915ec81cbd71bb195adb642cff90c23209b68d all runs: crashed: possible deadlock in wg_set_device testing release v5.5 testing commit d5226fa6dbae0569ee43ecfc08bdcd6770fc4755 with gcc (GCC) 8.1.0 kernel signature: ad042c5d3e1cae02b42cdd7ced33257533a4cedd2f5c6e3662e8a0f165e03746 all runs: OK # git bisect start 9f68e3655aae6d49d6ba05dd263f99f33c2567af d5226fa6dbae0569ee43ecfc08bdcd6770fc4755 Bisecting: 3686 revisions left to test after this (roughly 12 steps) [fb95aae6e67c4e319a24b3eea32032d4246a5335] Merge tag 'sound-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound testing commit fb95aae6e67c4e319a24b3eea32032d4246a5335 with gcc (GCC) 8.1.0 kernel signature: f7210dc9c2b7a405da43357e0242dbb8cadda914a76b4bb190b6658223acd027 all runs: crashed: possible deadlock in wg_set_device # git bisect bad fb95aae6e67c4e319a24b3eea32032d4246a5335 Bisecting: 2267 revisions left to test after this (roughly 11 steps) [f76e4c167ea2212e23c15ee7e601a865e822c291] net: phy: add default ARCH_BCM_IPROC for MDIO_BCM_IPROC testing commit f76e4c167ea2212e23c15ee7e601a865e822c291 with gcc (GCC) 8.1.0 kernel signature: 5e2dcda2042390533df978e7db2385c98a23045cc6984b1a924f12a20e0eda42 all runs: crashed: possible deadlock in wg_set_device # git bisect bad f76e4c167ea2212e23c15ee7e601a865e822c291 Bisecting: 810 revisions left to test after this (roughly 10 steps) [f41aa387a7896c193b384c5fb531cd2cb9e00128] Merge branch 'selftest-makefile-cleanup' testing commit f41aa387a7896c193b384c5fb531cd2cb9e00128 with gcc (GCC) 8.1.0 kernel signature: 3f9e997234f298655df029b526aebdc2201f25eceafaaf80da57895b32ba85a8 run #0: basic kernel testing failed: failed to copy test binary to VM: failed to run ["scp" "-P" "22" "-F" "/dev/null" "-o" "UserKnownHostsFile=/dev/null" "-o" "BatchMode=yes" "-o" "IdentitiesOnly=yes" "-o" "StrictHostKeyChecking=no" "-o" "ConnectTimeout=10" "-i" "/syzkaller/jobs/linux/workdir/image/key" "/syzkaller/jobs/linux/workdir/repro.prog" "root@10.128.10.27:./repro.prog"]: exit status 1 Warning: Permanently added '10.128.10.27' (ECDSA) to the list of known hosts. /syzkaller/jobs/linux/workdir/repro.prog: Broken pipe run #1: crashed: possible deadlock in wg_set_device run #2: crashed: possible deadlock in wg_set_device run #3: crashed: possible deadlock in wg_set_device run #4: crashed: possible deadlock in wg_set_device run #5: crashed: possible deadlock in wg_set_device run #6: crashed: possible deadlock in wg_set_device run #7: crashed: possible deadlock in wg_set_device run #8: crashed: possible deadlock in wg_set_device run #9: crashed: possible deadlock in wg_set_device # git bisect bad f41aa387a7896c193b384c5fb531cd2cb9e00128 Bisecting: 404 revisions left to test after this (roughly 9 steps) [9f6cff995e98258b6b81cc864532f633e5b3a081] Merge branch 'Simplify-IPv6-route-offload-API' testing commit 9f6cff995e98258b6b81cc864532f633e5b3a081 with gcc (GCC) 8.1.0 kernel signature: 983e352c292391e0a3f6293c406f695a06506d9644687dad87205592020c8b91 all runs: crashed: possible deadlock in wg_set_device # git bisect bad 9f6cff995e98258b6b81cc864532f633e5b3a081 Bisecting: 202 revisions left to test after this (roughly 8 steps) [206f54b66cbf6f71e9e86f50f60ffdf7f565c3b7] net: bcmgenet: Utilize bcmgenet_set_features() during resume/open testing commit 206f54b66cbf6f71e9e86f50f60ffdf7f565c3b7 with gcc (GCC) 8.1.0 kernel signature: 990432988790a6e1c81cab13f7bb7a600c840c310c8b4035f2608853da730f08 all runs: crashed: possible deadlock in wg_set_device # git bisect bad 206f54b66cbf6f71e9e86f50f60ffdf7f565c3b7 Bisecting: 101 revisions left to test after this (roughly 7 steps) [a8674f753e36f566d6c1d992ab85323d784281d9] ipv4: Notify newly added route if should be offloaded testing commit a8674f753e36f566d6c1d992ab85323d784281d9 with gcc (GCC) 8.1.0 kernel signature: bc9e12efe520e02bd5e05a2c27991842a9c67e423ec32d3cf1bcc9170b9f60d5 all runs: crashed: possible deadlock in wg_set_device # git bisect bad a8674f753e36f566d6c1d992ab85323d784281d9 Bisecting: 49 revisions left to test after this (roughly 6 steps) [bea0f4a5115aaf6f59c6d2125f52ff149874b6d2] Merge branch 'sfp-slow-to-probe-copper' testing commit bea0f4a5115aaf6f59c6d2125f52ff149874b6d2 with gcc (GCC) 8.1.0 kernel signature: 66a35414cb54805e8482d0edcbc9115b1d8abed1ee46e336719ec6f3b9096c93 all runs: crashed: possible deadlock in wg_set_device # git bisect bad bea0f4a5115aaf6f59c6d2125f52ff149874b6d2 Bisecting: 24 revisions left to test after this (roughly 5 steps) [bb9d8454bb0fed028558d1e66b12d50db5e43e06] Merge branch 'tipc-introduce-variable-window-congestion-control' testing commit bb9d8454bb0fed028558d1e66b12d50db5e43e06 with gcc (GCC) 8.1.0 kernel signature: be57f133649e68740ba1e43f4e64c0390d4f93fe69e49bc9362ef636a5ec2ace all runs: crashed: possible deadlock in wg_set_device # git bisect bad bb9d8454bb0fed028558d1e66b12d50db5e43e06 Bisecting: 12 revisions left to test after this (roughly 4 steps) [e70ac628289766bc2c81a0db161368b69da774fd] qed: remove redundant assignments to rc testing commit e70ac628289766bc2c81a0db161368b69da774fd with gcc (GCC) 8.1.0 kernel signature: 9bdae014bbc51be8e566aab38cf7e647f073b32b5e67b2a97e9457e41d2034b6 all runs: crashed: possible deadlock in wg_set_device # git bisect bad e70ac628289766bc2c81a0db161368b69da774fd Bisecting: 6 revisions left to test after this (roughly 3 steps) [3cd9d35ee5f7a23203443f1a0d3c344f034c0dc7] dt-bindings: net: bluetooth: Minor fix in broadcom-bluetooth testing commit 3cd9d35ee5f7a23203443f1a0d3c344f034c0dc7 with gcc (GCC) 8.1.0 kernel signature: c6fd50467caaf7ee7a2cf71f3138ac4d26542b8e82bd964d31d9eb0c13dc946b all runs: OK # git bisect good 3cd9d35ee5f7a23203443f1a0d3c344f034c0dc7 Bisecting: 3 revisions left to test after this (roughly 2 steps) [7ecacafc240638148567742cca41aa7144b4fe1e] Bluetooth: btusb: Disable runtime suspend on Realtek devices testing commit 7ecacafc240638148567742cca41aa7144b4fe1e with gcc (GCC) 8.1.0 kernel signature: da1c2cabdd39e8e83806408349f8ce4eecd0d1a7174e86b7715edfa839f79f23 all runs: OK # git bisect good 7ecacafc240638148567742cca41aa7144b4fe1e Bisecting: 1 revision left to test after this (roughly 1 step) [4a63ef710cc3e79ce58b46b122118e415a44b3db] Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next testing commit 4a63ef710cc3e79ce58b46b122118e415a44b3db with gcc (GCC) 8.1.0 kernel signature: 296a5ab934f617f8e3d169a6062e269efe45d8e2da0911676bde371d986e6f64 all runs: crashed: possible deadlock in wg_set_device # git bisect bad 4a63ef710cc3e79ce58b46b122118e415a44b3db Bisecting: 0 revisions left to test after this (roughly 0 steps) [e7096c131e5161fa3b8e52a650d7719d2857adfd] net: WireGuard secure network tunnel testing commit e7096c131e5161fa3b8e52a650d7719d2857adfd with gcc (GCC) 8.1.0 kernel signature: bab51bd14badacf4a02e24c11ccaa015dae1cdb73eff95a2d22768dd22e6d3cb all runs: crashed: possible deadlock in wg_set_device # git bisect bad e7096c131e5161fa3b8e52a650d7719d2857adfd e7096c131e5161fa3b8e52a650d7719d2857adfd is the first bad commit commit e7096c131e5161fa3b8e52a650d7719d2857adfd Author: Jason A. Donenfeld Date: Mon Dec 9 00:27:34 2019 +0100 net: WireGuard secure network tunnel WireGuard is a layer 3 secure networking tunnel made specifically for the kernel, that aims to be much simpler and easier to audit than IPsec. Extensive documentation and description of the protocol and considerations, along with formal proofs of the cryptography, are available at: * https://www.wireguard.com/ * https://www.wireguard.com/papers/wireguard.pdf This commit implements WireGuard as a simple network device driver, accessible in the usual RTNL way used by virtual network drivers. It makes use of the udp_tunnel APIs, GRO, GSO, NAPI, and the usual set of networking subsystem APIs. It has a somewhat novel multicore queueing system designed for maximum throughput and minimal latency of encryption operations, but it is implemented modestly using workqueues and NAPI. Configuration is done via generic Netlink, and following a review from the Netlink maintainer a year ago, several high profile userspace tools have already implemented the API. This commit also comes with several different tests, both in-kernel tests and out-of-kernel tests based on network namespaces, taking profit of the fact that sockets used by WireGuard intentionally stay in the namespace the WireGuard interface was originally created, exactly like the semantics of userspace tun devices. See wireguard.com/netns/ for pictures and examples. The source code is fairly short, but rather than combining everything into a single file, WireGuard is developed as cleanly separable files, making auditing and comprehension easier. Things are laid out as follows: * noise.[ch], cookie.[ch], messages.h: These implement the bulk of the cryptographic aspects of the protocol, and are mostly data-only in nature, taking in buffers of bytes and spitting out buffers of bytes. They also handle reference counting for their various shared pieces of data, like keys and key lists. * ratelimiter.[ch]: Used as an integral part of cookie.[ch] for ratelimiting certain types of cryptographic operations in accordance with particular WireGuard semantics. * allowedips.[ch], peerlookup.[ch]: The main lookup structures of WireGuard, the former being trie-like with particular semantics, an integral part of the design of the protocol, and the latter just being nice helper functions around the various hashtables we use. * device.[ch]: Implementation of functions for the netdevice and for rtnl, responsible for maintaining the life of a given interface and wiring it up to the rest of WireGuard. * peer.[ch]: Each interface has a list of peers, with helper functions available here for creation, destruction, and reference counting. * socket.[ch]: Implementation of functions related to udp_socket and the general set of kernel socket APIs, for sending and receiving ciphertext UDP packets, and taking care of WireGuard-specific sticky socket routing semantics for the automatic roaming. * netlink.[ch]: Userspace API entry point for configuring WireGuard peers and devices. The API has been implemented by several userspace tools and network management utility, and the WireGuard project distributes the basic wg(8) tool. * queueing.[ch]: Shared function on the rx and tx path for handling the various queues used in the multicore algorithms. * send.c: Handles encrypting outgoing packets in parallel on multiple cores, before sending them in order on a single core, via workqueues and ring buffers. Also handles sending handshake and cookie messages as part of the protocol, in parallel. * receive.c: Handles decrypting incoming packets in parallel on multiple cores, before passing them off in order to be ingested via the rest of the networking subsystem with GRO via the typical NAPI poll function. Also handles receiving handshake and cookie messages as part of the protocol, in parallel. * timers.[ch]: Uses the timer wheel to implement protocol particular event timeouts, and gives a set of very simple event-driven entry point functions for callers. * main.c, version.h: Initialization and deinitialization of the module. * selftest/*.h: Runtime unit tests for some of the most security sensitive functions. * tools/testing/selftests/wireguard/netns.sh: Aforementioned testing script using network namespaces. This commit aims to be as self-contained as possible, implementing WireGuard as a standalone module not needing much special handling or coordination from the network subsystem. I expect for future optimizations to the network stack to positively improve WireGuard, and vice-versa, but for the time being, this exists as intentionally standalone. We introduce a menu option for CONFIG_WIREGUARD, as well as providing a verbose debug log and self-tests via CONFIG_WIREGUARD_DEBUG. Signed-off-by: Jason A. Donenfeld Cc: David Miller Cc: Greg KH Cc: Linus Torvalds Cc: Herbert Xu Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller MAINTAINERS | 8 + drivers/net/Kconfig | 41 ++ drivers/net/Makefile | 1 + drivers/net/wireguard/Makefile | 18 + drivers/net/wireguard/allowedips.c | 381 ++++++++++++ drivers/net/wireguard/allowedips.h | 59 ++ drivers/net/wireguard/cookie.c | 236 ++++++++ drivers/net/wireguard/cookie.h | 59 ++ drivers/net/wireguard/device.c | 458 +++++++++++++++ drivers/net/wireguard/device.h | 73 +++ drivers/net/wireguard/main.c | 64 +++ drivers/net/wireguard/messages.h | 128 +++++ drivers/net/wireguard/netlink.c | 642 +++++++++++++++++++++ drivers/net/wireguard/netlink.h | 12 + drivers/net/wireguard/noise.c | 828 +++++++++++++++++++++++++++ drivers/net/wireguard/noise.h | 137 +++++ drivers/net/wireguard/peer.c | 240 ++++++++ drivers/net/wireguard/peer.h | 83 +++ drivers/net/wireguard/peerlookup.c | 221 +++++++ drivers/net/wireguard/peerlookup.h | 64 +++ drivers/net/wireguard/queueing.c | 53 ++ drivers/net/wireguard/queueing.h | 197 +++++++ drivers/net/wireguard/ratelimiter.c | 223 ++++++++ drivers/net/wireguard/ratelimiter.h | 19 + drivers/net/wireguard/receive.c | 595 +++++++++++++++++++ drivers/net/wireguard/selftest/allowedips.c | 683 ++++++++++++++++++++++ drivers/net/wireguard/selftest/counter.c | 104 ++++ drivers/net/wireguard/selftest/ratelimiter.c | 226 ++++++++ drivers/net/wireguard/send.c | 413 +++++++++++++ drivers/net/wireguard/socket.c | 437 ++++++++++++++ drivers/net/wireguard/socket.h | 44 ++ drivers/net/wireguard/timers.c | 243 ++++++++ drivers/net/wireguard/timers.h | 31 + drivers/net/wireguard/version.h | 1 + include/uapi/linux/wireguard.h | 196 +++++++ tools/testing/selftests/wireguard/netns.sh | 537 +++++++++++++++++ 36 files changed, 7755 insertions(+) create mode 100644 drivers/net/wireguard/Makefile create mode 100644 drivers/net/wireguard/allowedips.c create mode 100644 drivers/net/wireguard/allowedips.h create mode 100644 drivers/net/wireguard/cookie.c create mode 100644 drivers/net/wireguard/cookie.h create mode 100644 drivers/net/wireguard/device.c create mode 100644 drivers/net/wireguard/device.h create mode 100644 drivers/net/wireguard/main.c create mode 100644 drivers/net/wireguard/messages.h create mode 100644 drivers/net/wireguard/netlink.c create mode 100644 drivers/net/wireguard/netlink.h create mode 100644 drivers/net/wireguard/noise.c create mode 100644 drivers/net/wireguard/noise.h create mode 100644 drivers/net/wireguard/peer.c create mode 100644 drivers/net/wireguard/peer.h create mode 100644 drivers/net/wireguard/peerlookup.c create mode 100644 drivers/net/wireguard/peerlookup.h create mode 100644 drivers/net/wireguard/queueing.c create mode 100644 drivers/net/wireguard/queueing.h create mode 100644 drivers/net/wireguard/ratelimiter.c create mode 100644 drivers/net/wireguard/ratelimiter.h create mode 100644 drivers/net/wireguard/receive.c create mode 100644 drivers/net/wireguard/selftest/allowedips.c create mode 100644 drivers/net/wireguard/selftest/counter.c create mode 100644 drivers/net/wireguard/selftest/ratelimiter.c create mode 100644 drivers/net/wireguard/send.c create mode 100644 drivers/net/wireguard/socket.c create mode 100644 drivers/net/wireguard/socket.h create mode 100644 drivers/net/wireguard/timers.c create mode 100644 drivers/net/wireguard/timers.h create mode 100644 drivers/net/wireguard/version.h create mode 100644 include/uapi/linux/wireguard.h create mode 100755 tools/testing/selftests/wireguard/netns.sh parent commit e42617b825f8073569da76dc4510bfa019b1c35a wasn't tested testing commit e42617b825f8073569da76dc4510bfa019b1c35a with gcc (GCC) 8.1.0 kernel signature: 5a71d22241cb04cfaa742560d092e0905adfbc2d1a09168779f154241d7b7a91 culprit signature: bab51bd14badacf4a02e24c11ccaa015dae1cdb73eff95a2d22768dd22e6d3cb parent signature: 5a71d22241cb04cfaa742560d092e0905adfbc2d1a09168779f154241d7b7a91 revisions tested: 15, total time: 3h9m24.834945735s (build: 1h51m19.201874008s, test: 1h14m26.431073719s) first bad commit: e7096c131e5161fa3b8e52a650d7719d2857adfd net: WireGuard secure network tunnel cc: ["davem@davemloft.net" "jason@zx2c4.com"] crash: possible deadlock in wg_set_device ====================================================== WARNING: possible circular locking dependency detected 5.5.0-rc1-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/8366 is trying to acquire lock: ffff88807dded528 ((wq_completion)wg-kex-wireguard0){+.+.}, at: flush_workqueue+0xcf/0x13d0 kernel/workqueue.c:2772 but task is already holding lock: ffff888096610e80 (&wg->static_identity.lock){++++}, at: wg_set_device+0xcd8/0x1180 drivers/net/wireguard/netlink.c:567 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&wg->static_identity.lock){++++}: down_read+0x95/0x430 kernel/locking/rwsem.c:1495 wg_noise_handshake_create_initiation+0xc9/0x620 drivers/net/wireguard/noise.c:499 wg_packet_send_handshake_initiation+0x14a/0x200 drivers/net/wireguard/send.c:34 wg_packet_handshake_send_worker+0x14/0x20 drivers/net/wireguard/send.c:51 process_one_work+0x856/0x1630 kernel/workqueue.c:2264 worker_thread+0x85/0xb60 kernel/workqueue.c:2410 kthread+0x331/0x3f0 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 -> #1 ((work_completion)(&peer->transmit_handshake_work)){+.+.}: process_one_work+0x7f0/0x1630 kernel/workqueue.c:2240 worker_thread+0x85/0xb60 kernel/workqueue.c:2410 kthread+0x331/0x3f0 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 -> #0 ((wq_completion)wg-kex-wireguard0){+.+.}: check_prev_add kernel/locking/lockdep.c:2476 [inline] check_prevs_add kernel/locking/lockdep.c:2581 [inline] validate_chain kernel/locking/lockdep.c:2971 [inline] __lock_acquire+0x2899/0x4ef0 kernel/locking/lockdep.c:3955 lock_acquire+0x194/0x410 kernel/locking/lockdep.c:4485 flush_workqueue+0xf2/0x13d0 kernel/workqueue.c:2775 peer_remove_after_dead+0x152/0x210 drivers/net/wireguard/peer.c:141 wg_peer_remove+0x209/0x2e0 drivers/net/wireguard/peer.c:176 wg_set_device+0xd96/0x1180 drivers/net/wireguard/netlink.c:575 genl_family_rcv_msg_doit net/netlink/genetlink.c:672 [inline] genl_family_rcv_msg net/netlink/genetlink.c:717 [inline] genl_rcv_msg+0x5d9/0x10e0 net/netlink/genetlink.c:734 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2477 genl_rcv+0x23/0x40 net/netlink/genetlink.c:745 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x45e/0x6a0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x7b0/0xcb0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:659 ____sys_sendmsg+0x603/0x950 net/socket.c:2330 ___sys_sendmsg+0xe4/0x160 net/socket.c:2384 __sys_sendmsg+0xd9/0x180 net/socket.c:2417 __do_sys_sendmsg net/socket.c:2426 [inline] __se_sys_sendmsg net/socket.c:2424 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2424 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: (wq_completion)wg-kex-wireguard0 --> (work_completion)(&peer->transmit_handshake_work) --> &wg->static_identity.lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&wg->static_identity.lock); lock((work_completion)(&peer->transmit_handshake_work)); lock(&wg->static_identity.lock); lock((wq_completion)wg-kex-wireguard0); *** DEADLOCK *** 5 locks held by syz-executor.0/8366: #0: ffffffff89893568 (cb_lock){++++}, at: genl_rcv+0x14/0x40 net/netlink/genetlink.c:744 #1: ffffffff89893620 (genl_mutex){+.+.}, at: genl_lock net/netlink/genetlink.c:33 [inline] #1: ffffffff89893620 (genl_mutex){+.+.}, at: genl_rcv_msg+0x663/0x10e0 net/netlink/genetlink.c:732 #2: ffffffff89846a60 (rtnl_mutex){+.+.}, at: rtnl_lock+0x12/0x20 net/core/rtnetlink.c:72 #3: ffff8880966110a0 (&wg->device_update_lock){+.+.}, at: wg_set_device+0x249/0x1180 drivers/net/wireguard/netlink.c:510 #4: ffff888096610e80 (&wg->static_identity.lock){++++}, at: wg_set_device+0xcd8/0x1180 drivers/net/wireguard/netlink.c:567 stack backtrace: CPU: 1 PID: 8366 Comm: syz-executor.0 Not tainted 5.5.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x12d/0x187 lib/dump_stack.c:118 print_circular_bug.isra.39.cold.58+0x15a/0x169 kernel/locking/lockdep.c:1685 check_noncircular+0x349/0x400 kernel/locking/lockdep.c:1809 check_prev_add kernel/locking/lockdep.c:2476 [inline] check_prevs_add kernel/locking/lockdep.c:2581 [inline] validate_chain kernel/locking/lockdep.c:2971 [inline] __lock_acquire+0x2899/0x4ef0 kernel/locking/lockdep.c:3955 lock_acquire+0x194/0x410 kernel/locking/lockdep.c:4485 flush_workqueue+0xf2/0x13d0 kernel/workqueue.c:2775 peer_remove_after_dead+0x152/0x210 drivers/net/wireguard/peer.c:141 wg_peer_remove+0x209/0x2e0 drivers/net/wireguard/peer.c:176 wg_set_device+0xd96/0x1180 drivers/net/wireguard/netlink.c:575 genl_family_rcv_msg_doit net/netlink/genetlink.c:672 [inline] genl_family_rcv_msg net/netlink/genetlink.c:717 [inline] genl_rcv_msg+0x5d9/0x10e0 net/netlink/genetlink.c:734 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2477 genl_rcv+0x23/0x40 net/netlink/genetlink.c:745 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x45e/0x6a0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x7b0/0xcb0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:659 ____sys_sendmsg+0x603/0x950 net/socket.c:2330 ___sys_sendmsg+0xe4/0x160 net/socket.c:2384 __sys_sendmsg+0xd9/0x180 net/socket.c:2417 __do_sys_sendmsg net/socket.c:2426 [inline] __se_sys_sendmsg net/socket.c:2424 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2424 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45b399 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f1a83434c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f1a834356d4 RCX: 000000000045b399 RDX: 0000000000000000 RSI: 0000000020001340 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000009ba R14: 00000000004cb2b8 R15: 000000000075bf2c