[ OK ] Started Getty on tty2. [ OK ] Started Serial Getty on ttyS0. [ OK ] Started Getty on tty1. [ OK ] Reached target Login Prompts. [ OK ] Reached target Multi-User System. [ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... [ OK ] Started Update UTMP about System Runlevel Changes. Starting Load/Save RF Kill Switch Status... [ OK ] Started Load/Save RF Kill Switch Status. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.228' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 33.868531] ================================================================== [ 33.876115] BUG: KASAN: use-after-free in refcount_dec_not_one+0x71/0x1d0 [ 33.883029] Read of size 4 at addr ffff8880a2cd75d8 by task syz-executor584/8248 [ 33.890590] [ 33.892438] CPU: 1 PID: 8248 Comm: syz-executor584 Not tainted 4.19.211-syzkaller #0 [ 33.900399] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.909859] Call Trace: [ 33.912478] dump_stack+0x1fc/0x2ef [ 33.916094] print_address_description.cold+0x54/0x219 [ 33.921360] kasan_report_error.cold+0x8a/0x1b9 [ 33.926022] ? refcount_dec_not_one+0x71/0x1d0 [ 33.930604] kasan_report+0x8f/0xa0 [ 33.934243] ? refcount_dec_not_one+0x71/0x1d0 [ 33.938867] refcount_dec_not_one+0x71/0x1d0 [ 33.943265] ? refcount_dec_and_test_checked+0x20/0x20 [ 33.948526] ? nbd_config_put+0x5da/0x870 [ 33.952658] refcount_dec_and_mutex_lock+0x1c/0x80 [ 33.957574] nbd_genl_connect+0x11ee/0x1630 [ 33.961884] ? nbd_xmit_timeout+0x730/0x730 [ 33.966190] ? __sanitizer_cov_trace_switch+0x4b/0x80 [ 33.971369] ? validate_nla+0x270/0x820 [ 33.975333] ? nla_parse+0x1b2/0x290 [ 33.979032] genl_family_rcv_msg+0x642/0xc40 [ 33.983430] ? genl_rcv+0x40/0x40 [ 33.986863] ? genl_rcv_msg+0x12f/0x160 [ 33.990908] ? mutex_trylock+0x1a0/0x1a0 [ 33.994960] ? __radix_tree_lookup+0x216/0x370 [ 33.999529] genl_rcv_msg+0xbf/0x160 [ 34.003226] netlink_rcv_skb+0x160/0x440 [ 34.007369] ? genl_family_rcv_msg+0xc40/0xc40 [ 34.011933] ? netlink_ack+0xae0/0xae0 [ 34.015810] ? genl_rcv+0x15/0x40 [ 34.019436] genl_rcv+0x24/0x40 [ 34.022710] netlink_unicast+0x4d5/0x690 [ 34.026773] ? netlink_sendskb+0x110/0x110 [ 34.030992] ? _copy_from_iter_full+0x229/0x7c0 [ 34.035641] ? __phys_addr_symbol+0x2c/0x70 [ 34.039956] ? __check_object_size+0x17b/0x3e0 [ 34.044523] netlink_sendmsg+0x6c3/0xc50 [ 34.048568] ? aa_af_perm+0x230/0x230 [ 34.052357] ? nlmsg_notify+0x1f0/0x1f0 [ 34.056315] ? kernel_recvmsg+0x220/0x220 [ 34.060460] ? nlmsg_notify+0x1f0/0x1f0 [ 34.064421] sock_sendmsg+0xc3/0x120 [ 34.068119] ___sys_sendmsg+0x7bb/0x8e0 [ 34.072076] ? copy_msghdr_from_user+0x440/0x440 [ 34.076810] ? netlink_dump+0xc10/0xc10 [ 34.080768] ? nlmsg_notify+0x1f0/0x1f0 [ 34.084735] ? security_socket_recvmsg+0x8f/0xc0 [ 34.089494] ? __sys_recvfrom+0x2cd/0x3a0 [ 34.093629] ? __ia32_sys_send+0x100/0x100 [ 34.097853] ? __fdget+0x1a0/0x230 [ 34.101385] __x64_sys_sendmsg+0x132/0x220 [ 34.105601] ? __sys_sendmsg+0x1b0/0x1b0 [ 34.109653] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 34.115011] ? trace_hardirqs_off_caller+0x6e/0x210 [ 34.120009] ? do_syscall_64+0x21/0x620 [ 34.123962] do_syscall_64+0xf9/0x620 [ 34.127747] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.132917] RIP: 0033:0x7f3fa9899859 [ 34.136610] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 14 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 [ 34.155497] RSP: 002b:00007ffe48e790e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 34.163274] RAX: ffffffffffffffda RBX: 00000000000083d9 RCX: 00007f3fa9899859 [ 34.170543] RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000004 [ 34.177801] RBP: 0000000000000000 R08: 0000000000000000 R09: 00007ffe48e79288 [ 34.185126] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe48e790fc [ 34.192384] R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000 [ 34.199645] [ 34.201256] Allocated by task 8242: [ 34.204869] kmem_cache_alloc_trace+0x12f/0x380 [ 34.209525] nbd_dev_add+0x44/0x890 [ 34.213145] nbd_genl_connect+0x4cc/0x1630 [ 34.217367] genl_family_rcv_msg+0x642/0xc40 [ 34.221872] genl_rcv_msg+0xbf/0x160 [ 34.225566] netlink_rcv_skb+0x160/0x440 [ 34.229628] genl_rcv+0x24/0x40 [ 34.232886] netlink_unicast+0x4d5/0x690 [ 34.236929] netlink_sendmsg+0x6c3/0xc50 [ 34.240972] sock_sendmsg+0xc3/0x120 [ 34.244663] ___sys_sendmsg+0x7bb/0x8e0 [ 34.248617] __x64_sys_sendmsg+0x132/0x220 [ 34.252837] do_syscall_64+0xf9/0x620 [ 34.256715] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.261879] [ 34.263484] Freed by task 8248: [ 34.266751] kfree+0xcc/0x210 [ 34.269861] nbd_put.part.0+0xfe/0x140 [ 34.273732] nbd_config_put+0x6a0/0x870 [ 34.277710] nbd_genl_connect+0x11bb/0x1630 [ 34.282015] genl_family_rcv_msg+0x642/0xc40 [ 34.286402] genl_rcv_msg+0xbf/0x160 [ 34.290096] netlink_rcv_skb+0x160/0x440 [ 34.294137] genl_rcv+0x24/0x40 [ 34.297568] netlink_unicast+0x4d5/0x690 [ 34.301608] netlink_sendmsg+0x6c3/0xc50 [ 34.305649] sock_sendmsg+0xc3/0x120 [ 34.309353] ___sys_sendmsg+0x7bb/0x8e0 [ 34.313346] __x64_sys_sendmsg+0x132/0x220 [ 34.317561] do_syscall_64+0xf9/0x620 [ 34.321349] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.326687] [ 34.328295] The buggy address belongs to the object at ffff8880a2cd7500 [ 34.328295] which belongs to the cache kmalloc-512 of size 512 [ 34.340951] The buggy address is located 216 bytes inside of [ 34.340951] 512-byte region [ffff8880a2cd7500, ffff8880a2cd7700) [ 34.352821] The buggy address belongs to the page: [ 34.357829] page:ffffea00028b35c0 count:1 mapcount:0 mapping:ffff88813bff0940 index:0x0 [ 34.365959] flags: 0xfff00000000100(slab) [ 34.370183] raw: 00fff00000000100 ffffea00028b7d08 ffffea00028b3708 ffff88813bff0940 [ 34.378054] raw: 0000000000000000 ffff8880a2cd7000 0000000100000006 0000000000000000 [ 34.385920] page dumped because: kasan: bad access detected [ 34.391782] [ 34.393387] Memory state around the buggy address: [ 34.398297] ffff8880a2cd7480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 34.405790] ffff8880a2cd7500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.413259] >ffff8880a2cd7580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.420610] ^ [ 34.426825] ffff8880a2cd7600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.434176] ffff8880a2cd7680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.441544] ================================================================== [ 34.448985] Disabling lock debugging due to kernel taint [ 34.454558] Kernel panic - not syncing: panic_on_warn set ... [ 34.454558] [ 34.461946] CPU: 0 PID: 8248 Comm: syz-executor584 Tainted: G B 4.19.211-syzkaller #0 [ 34.471479] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.480837] Call Trace: [ 34.483428] dump_stack+0x1fc/0x2ef [ 34.487151] panic+0x26a/0x50e [ 34.490359] ? __warn_printk+0xf3/0xf3 [ 34.494246] ? preempt_schedule_common+0x45/0xc0 [ 34.498993] ? ___preempt_schedule+0x16/0x18 [ 34.503382] ? trace_hardirqs_on+0x55/0x210 [ 34.507684] kasan_end_report+0x43/0x49 [ 34.511638] kasan_report_error.cold+0xa7/0x1b9 [ 34.516287] ? refcount_dec_not_one+0x71/0x1d0 [ 34.520845] kasan_report+0x8f/0xa0 [ 34.524620] ? refcount_dec_not_one+0x71/0x1d0 [ 34.529190] refcount_dec_not_one+0x71/0x1d0 [ 34.533592] ? refcount_dec_and_test_checked+0x20/0x20 [ 34.538874] ? nbd_config_put+0x5da/0x870 [ 34.543010] refcount_dec_and_mutex_lock+0x1c/0x80 [ 34.547931] nbd_genl_connect+0x11ee/0x1630 [ 34.552244] ? nbd_xmit_timeout+0x730/0x730 [ 34.556549] ? __sanitizer_cov_trace_switch+0x4b/0x80 [ 34.561716] ? validate_nla+0x270/0x820 [ 34.565670] ? nla_parse+0x1b2/0x290 [ 34.569369] genl_family_rcv_msg+0x642/0xc40 [ 34.573758] ? genl_rcv+0x40/0x40 [ 34.577187] ? genl_rcv_msg+0x12f/0x160 [ 34.581138] ? mutex_trylock+0x1a0/0x1a0 [ 34.585182] ? __radix_tree_lookup+0x216/0x370 [ 34.589745] genl_rcv_msg+0xbf/0x160 [ 34.593438] netlink_rcv_skb+0x160/0x440 [ 34.597478] ? genl_family_rcv_msg+0xc40/0xc40 [ 34.602048] ? netlink_ack+0xae0/0xae0 [ 34.605998] ? genl_rcv+0x15/0x40 [ 34.609439] genl_rcv+0x24/0x40 [ 34.612697] netlink_unicast+0x4d5/0x690 [ 34.616739] ? netlink_sendskb+0x110/0x110 [ 34.620950] ? _copy_from_iter_full+0x229/0x7c0 [ 34.625681] ? __phys_addr_symbol+0x2c/0x70 [ 34.629988] ? __check_object_size+0x17b/0x3e0 [ 34.634553] netlink_sendmsg+0x6c3/0xc50 [ 34.638596] ? aa_af_perm+0x230/0x230 [ 34.642385] ? nlmsg_notify+0x1f0/0x1f0 [ 34.646353] ? kernel_recvmsg+0x220/0x220 [ 34.650478] ? nlmsg_notify+0x1f0/0x1f0 [ 34.654436] sock_sendmsg+0xc3/0x120 [ 34.658211] ___sys_sendmsg+0x7bb/0x8e0 [ 34.662162] ? copy_msghdr_from_user+0x440/0x440 [ 34.666892] ? netlink_dump+0xc10/0xc10 [ 34.670844] ? nlmsg_notify+0x1f0/0x1f0 [ 34.674804] ? security_socket_recvmsg+0x8f/0xc0 [ 34.679535] ? __sys_recvfrom+0x2cd/0x3a0 [ 34.683669] ? __ia32_sys_send+0x100/0x100 [ 34.687882] ? __fdget+0x1a0/0x230 [ 34.691398] __x64_sys_sendmsg+0x132/0x220 [ 34.695611] ? __sys_sendmsg+0x1b0/0x1b0 [ 34.699652] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 34.704992] ? trace_hardirqs_off_caller+0x6e/0x210 [ 34.709997] ? do_syscall_64+0x21/0x620 [ 34.713963] do_syscall_64+0xf9/0x620 [ 34.717750] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.722919] RIP: 0033:0x7f3fa9899859 [ 34.726736] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 14 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 [ 34.745613] RSP: 002b:00007ffe48e790e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 34.753295] RAX: ffffffffffffffda RBX: 00000000000083d9 RCX: 00007f3fa9899859 [ 34.760541] RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000004 [ 34.767786] RBP: 0000000000000000 R08: 0000000000000000 R09: 00007ffe48e79288 [ 34.775032] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe48e790fc [ 34.782276] R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000 [ 34.789695] Kernel Offset: disabled [ 34.793334] Rebooting in 86400 seconds..