syzbot


linux-next test error: WARNING in set_peer

Status: upstream: reported on 2022/09/13 19:51
Reported-by: syzbot+a448cda4dba2dac50de5@syzkaller.appspotmail.com
Fix commit: 26c013108c12 wireguard: netlink: avoid variable-sized memcpy on sockaddr
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 139d, last: 131d

Sample crash report:
netdevsim netdevsim0 netdevsim1: renamed from eth1
netdevsim netdevsim0 netdevsim2: renamed from eth2
netdevsim netdevsim0 netdevsim3: renamed from eth3
------------[ cut here ]------------
memcpy: detected field-spanning write (size 28) of single field "&endpoint.addr" at drivers/net/wireguard/netlink.c:446 (size 16)
WARNING: CPU: 1 PID: 3610 at drivers/net/wireguard/netlink.c:446 set_peer+0x991/0x10c0 drivers/net/wireguard/netlink.c:446
Modules linked in:
CPU: 1 PID: 3610 Comm: syz-executor.0 Not tainted 6.0.0-rc6-next-20220920-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
RIP: 0010:set_peer+0x991/0x10c0 drivers/net/wireguard/netlink.c:446
Code: 00 e8 a3 b4 ad fc b9 10 00 00 00 48 c7 c2 60 68 72 8a be 1c 00 00 00 48 c7 c7 c0 68 72 8a c6 05 92 6c fc 08 01 e8 1c fb 77 04 <0f> 0b e9 03 04 00 00 e8 73 b4 ad fc 89 ee 44 89 ef e8 b9 b0 ad fc
RSP: 0018:ffffc900042af540 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffffc900042af6d8 RCX: 0000000000000000
RDX: ffff888025f90000 RSI: ffffffff81620448 RDI: fffff52000855e9a
RBP: ffffc900042af5e8 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000000 R11: 7720676e696e6e6d R12: 000000000000001c
R13: 0000000000000000 R14: ffff88801cbae104 R15: ffff888017370960
FS:  0000555556586400(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe21ced32c0 CR3: 000000006eb07000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 wg_set_device+0x8d7/0x11b0 drivers/net/wireguard/netlink.c:589
 genl_family_rcv_msg_doit+0x228/0x320 net/netlink/genetlink.c:731
 genl_family_rcv_msg net/netlink/genetlink.c:778 [inline]
 genl_rcv_msg+0x3b7/0x630 net/netlink/genetlink.c:795
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2540
 genl_rcv+0x24/0x40 net/netlink/genetlink.c:806
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x543/0x7f0 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x917/0xe10 net/netlink/af_netlink.c:1921
 sock_sendmsg_nosec net/socket.c:714 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:734
 __sys_sendto+0x236/0x340 net/socket.c:2117
 __do_sys_sendto net/socket.c:2129 [inline]
 __se_sys_sendto net/socket.c:2125 [inline]
 __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2125
 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+0x63/0xcd
RIP: 0033:0x7fe21be3c1cc
Code: fa fa ff ff 44 8b 4c 24 2c 4c 8b 44 24 20 89 c5 44 8b 54 24 28 48 8b 54 24 18 b8 2c 00 00 00 48 8b 74 24 10 8b 7c 24 08 0f 05 <48> 3d 00 f0 ff ff 77 34 89 ef 48 89 44 24 08 e8 20 fb ff ff 48 8b
RSP: 002b:00007fffd0f3d1b0 EFLAGS: 00000293 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007fe21ced4320 RCX: 00007fe21be3c1cc
RDX: 0000000000000170 RSI: 00007fe21ced4370 RDI: 0000000000000005
RBP: 0000000000000000 R08: 00007fffd0f3d204 R09: 000000000000000c
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000
R13: 00007fe21ced4370 R14: 0000000000000005 R15: 0000000000000000
 </TASK>

Crashes (39):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-linux-next-kasan-gce-root 2022/09/20 19:57 linux-next ef08d387bbbc c4b8ccfd .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/20 19:57 linux-next ef08d387bbbc c4b8ccfd .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/20 19:57 linux-next ef08d387bbbc c4b8ccfd .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/20 08:57 linux-next ef08d387bbbc 7c41a9ba .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/20 08:57 linux-next ef08d387bbbc 7c41a9ba .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/20 08:56 linux-next ef08d387bbbc 7c41a9ba .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/20 07:45 linux-next 4c9ca5b1597e 7c41a9ba .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/20 07:45 linux-next 4c9ca5b1597e 7c41a9ba .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/20 07:45 linux-next 4c9ca5b1597e 7c41a9ba .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/19 10:13 linux-next 4c9ca5b1597e dd9a85ff .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/19 10:13 linux-next 4c9ca5b1597e dd9a85ff .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/19 10:12 linux-next 4c9ca5b1597e dd9a85ff .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/16 07:31 linux-next d5538ab91d3a dd9a85ff .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/16 07:31 linux-next d5538ab91d3a dd9a85ff .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/16 07:31 linux-next d5538ab91d3a dd9a85ff .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/15 08:22 linux-next 6ce5d01e7011 dd9a85ff .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/15 08:22 linux-next 6ce5d01e7011 dd9a85ff .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/15 08:22 linux-next 6ce5d01e7011 dd9a85ff .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/15 07:12 linux-next f117c0118730 dd9a85ff .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/15 07:12 linux-next f117c0118730 dd9a85ff .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/15 07:11 linux-next f117c0118730 dd9a85ff .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/14 07:39 linux-next f117c0118730 b884348d .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/14 07:39 linux-next f117c0118730 b884348d .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/14 07:39 linux-next f117c0118730 b884348d .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/13 20:20 linux-next 0caac1da9949 b884348d .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/13 20:19 linux-next 0caac1da9949 b884348d .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/13 20:19 linux-next 0caac1da9949 b884348d .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/13 10:39 linux-next 0caac1da9949 a08652b0 .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/13 10:39 linux-next 0caac1da9949 a08652b0 .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/13 10:39 linux-next 0caac1da9949 a08652b0 .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/13 07:50 linux-next 044b771be9c5 a08652b0 .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/13 07:50 linux-next 044b771be9c5 a08652b0 .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/13 07:50 linux-next 044b771be9c5 a08652b0 .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/12 16:45 linux-next 044b771be9c5 f371ed7e .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/12 16:45 linux-next 044b771be9c5 f371ed7e .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/12 16:45 linux-next 044b771be9c5 f371ed7e .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/12 10:37 linux-next 044b771be9c5 356d8217 .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/12 10:36 linux-next 044b771be9c5 356d8217 .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
ci-upstream-linux-next-kasan-gce-root 2022/09/12 10:36 linux-next 044b771be9c5 356d8217 .config console log report [disk image] [vmlinux] linux-next test error: WARNING in set_peer
* Struck through repros no longer work on HEAD.