syzbot


WARNING in nbd_dev_add

Status: fixed on 2021/11/10 00:50
Reported-by: syzbot+9b658439133becd38da1@syzkaller.appspotmail.com
Fix commit: b1a811633f73 block: nbd: add sanity check for first_minor
First crash: 707d, last: 447d

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: WARNING in nbd_dev_add (log)
Repro: C syz .config
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 WARNING in nbd_dev_add C 161 10d 706d 0/1 upstream: reported C repro on 2021/02/22 12:25
upstream WARNING in nbd_dev_add (2) 4 443d 441d 22/24 fixed on 2022/03/08 16:11

Sample crash report:
RBP: 00007f78d547b5b0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f78d547b640
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
------------[ cut here ]------------
WARNING: CPU: 1 PID: 6528 at block/genhd.c:537 device_add_disk+0x825/0xe70 block/genhd.c:537
Modules linked in:
CPU: 1 PID: 6528 Comm: syz-executor605 Not tainted 5.15.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:device_add_disk+0x825/0xe70 block/genhd.c:537
Code: c0 0f 85 66 05 00 00 48 8b 04 24 89 18 4c 89 e7 e8 00 96 fb ff 4c 89 e7 e8 c8 92 03 00 45 31 f6 e9 c9 fe ff ff e8 8b 48 83 fd <0f> 0b e9 b3 fe ff ff e8 7f 48 83 fd 0f 0b 41 be ea ff ff ff e9 ab
RSP: 0018:ffffc90002c0f190 EFLAGS: 00010293
RAX: ffffffff84004115 RBX: 000000000000002b RCX: ffff888018e7b900
RDX: 0000000000000000 RSI: 00000000ffffffef RDI: 0000000000000000
RBP: ffff8880114a5280 R08: ffffffff84003fc1 R09: ffffed10173a64a2
R10: ffffed10173a64a2 R11: 0000000000000000 R12: ffff8880159f9000
R13: 00000000ffffffef R14: 1ffff11002b3f200 R15: 1ffff11002b3f201
FS:  0000555557319300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff25ab3b000 CR3: 000000006f96f000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 add_disk include/linux/genhd.h:221 [inline]
 nbd_dev_add+0x730/0x940 drivers/block/nbd.c:1765
 nbd_genl_connect+0xa66/0x1f50 drivers/block/nbd.c:1889
 genl_family_rcv_msg_doit net/netlink/genetlink.c:731 [inline]
 genl_family_rcv_msg net/netlink/genetlink.c:775 [inline]
 genl_rcv_msg+0x1032/0x1480 net/netlink/genetlink.c:792
 netlink_rcv_skb+0x200/0x470 net/netlink/af_netlink.c:2510
 genl_rcv+0x24/0x40 net/netlink/genetlink.c:803
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x814/0x9f0 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0xa29/0xe50 net/netlink/af_netlink.c:1935
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg net/socket.c:724 [inline]
 ____sys_sendmsg+0x5b9/0x910 net/socket.c:2409
 ___sys_sendmsg net/socket.c:2463 [inline]
 __sys_sendmsg+0x36f/0x450 net/socket.c:2492
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f78d54b7b49
Code: 28 c3 e8 5a 14 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:00007ffc82274848 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f78d54b7b49
RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000000000003
RBP: 00007f78d547b5b0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f78d547b640
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

Crashes (131):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kasan-gce-smack-root 2021/10/16 23:33 upstream 304040fb4909 0c5d9412 .config console log report syz C WARNING in nbd_dev_add
ci-upstream-kasan-gce-root 2021/09/22 16:44 upstream 92477dd1faa6 169724fe .config console log report syz C WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/04/14 02:01 net 61aaa1aa9a8f a184b83e .config console log report syz C WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/02/27 09:57 net eee7ede695cf 4c37c133 .config console log report syz C WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/02/25 03:47 net 6fbd15c09691 fcc6d71b .config console log report syz C WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/04/14 01:06 net-next 8ef7adc6beb2 a184b83e .config console log report syz C WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/02/27 09:47 net-next d310ec03a34e 4c37c133 .config console log report syz C WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/02/25 07:20 net-next d310ec03a34e fcc6d71b .config console log report syz C WARNING in nbd_dev_add
ci-upstream-kasan-gce-selinux-root 2021/11/08 15:07 upstream 6b75d88fa81b d29682f1 .config console log report info WARNING in nbd_dev_add
ci-upstream-kasan-gce-root 2021/11/04 07:08 upstream ce840177930f 4c1be0be .config console log report info WARNING in nbd_dev_add
ci-qemu-upstream 2021/11/02 23:41 upstream bfc484fe6abb 17f3edd2 .config console log report info WARNING in nbd_dev_add
ci-upstream-kasan-gce-selinux-root 2021/10/29 01:04 upstream 411a44c24a56 be531bb4 .config console log report info WARNING in nbd_dev_add
ci-upstream-kasan-gce-root 2021/10/20 08:16 upstream d9abdee5fd5a 466b7db1 .config console log report info WARNING in nbd_dev_add
ci-upstream-kasan-gce-root 2021/10/17 04:44 upstream 304040fb4909 0c5d9412 .config console log report info WARNING in nbd_dev_add
ci-upstream-kasan-gce-root 2021/09/30 08:42 upstream 02d5e016800d be530f6c .config console log report info WARNING in nbd_dev_add
ci-upstream-kasan-gce-root 2021/09/26 19:27 upstream a3b397b4fffb 8cac236e .config console log report info WARNING in nbd_dev_add
ci-upstream-kasan-gce-selinux-root 2021/09/01 08:33 upstream 9c849ce86e0f 7eb7e152 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/11/08 21:40 net c45231a7668d d29682f1 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/11/08 00:54 net 08fcdfa6e3ae 4c1be0be .config console log report info WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/11/07 04:32 net 70bf363d7adb 4c1be0be .config console log report info WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/11/05 23:18 net a46a5036e7d2 4c1be0be .config console log report info WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/11/05 09:33 net 436014e860d3 4c1be0be .config console log report info WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/11/04 09:48 net 92f62485b371 4c1be0be .config console log report info WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/10/26 21:54 net 759635760a80 d50eb50a .config console log report info WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/09/28 07:37 net 3b1b6e82fb5e 78494d16 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/09/27 15:12 net 763716a55cb1 78494d16 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/09/27 01:31 net b193e15ac69d 78494d16 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/09/03 17:17 net 57f780f1c433 f62a5829 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/08/28 16:05 net 0d55649d2ad7 be2c130d .config console log report info WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/08/16 18:38 net 19d1532a1876 33c26cb7 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/08/09 13:22 net 3125f26c5148 6972b106 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-this-kasan-gce 2021/02/21 20:15 net 3af409ca278d a659b3f1 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/11/07 08:02 net-next cc0356d6a02e 4c1be0be .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/11/05 18:00 net-next cc0356d6a02e 4c1be0be .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/11/03 12:39 net-next cc0356d6a02e 17f3edd2 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/11/02 12:41 net-next 047304d0bfa5 098b5d53 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/10/31 11:43 net-next ae0393500e3b 098b5d53 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/10/30 05:59 net-next 28131d896d6d 098b5d53 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/10/28 10:41 net-next 911e3a46fb38 be531bb4 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/10/27 07:18 net-next 06338ceff925 d50eb50a .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/10/25 03:11 net-next 4d98bb0d7ec2 282f03fb .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/10/22 18:11 net-next ab98bbee072c 55f90bc6 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/10/12 07:10 net-next ff7f0e4e7930 838e7e2c .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/10/10 04:38 net-next 7932d53162dc 838e7e2c .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/10/01 05:53 net-next 69508d43334e 1d849ab4 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/09/23 15:13 net-next 68a81bb2eebd 8cac236e .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/09/18 04:10 net-next 5ef8a0291513 70b76c1d .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/09/17 04:50 net-next 561bed688bff 5b989942 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/09/07 04:40 net-next 27151f177827 6ca60148 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/08/19 09:41 net-next 19b8ece42c56 a2fe1cb5 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/08/13 11:15 net-next bed5a942e27e 3fd2ea69 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/08/12 06:03 net-next 88be32634905 6972b106 .config console log report info WARNING in nbd_dev_add
ci-upstream-net-kasan-gce 2021/08/11 10:06 net-next d3432bf10f17 6972b106 .config console log report info WARNING in nbd_dev_add
ci-upstream-linux-next-kasan-gce-root 2021/10/19 21:58 linux-next 60e8840126bd 466b7db1 .config console log report info WARNING in nbd_dev_add
ci-upstream-linux-next-kasan-gce-root 2021/09/27 20:08 linux-next bf5b1e621a51 78494d16 .config console log report info WARNING in nbd_dev_add
ci-upstream-linux-next-kasan-gce-root 2021/09/25 04:34 linux-next 5a5d008887b4 8cac236e .config console log report info WARNING in nbd_dev_add
* Struck through repros no longer work on HEAD.