[ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... Starting Load/Save RF Kill Switch Status... [ OK ] Started Update UTMP about System Runlevel Changes. [ OK ] Started Load/Save RF Kill Switch Status. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.149' (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 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: [ 84.716628] ================================================================== [ 84.724067] BUG: KASAN: use-after-free in refcount_dec_not_one+0x9a/0xc0 [ 84.730884] Read of size 4 at addr ffff8880a179f5d8 by task syz-executor657/8187 [ 84.738389] [ 84.739996] CPU: 0 PID: 8187 Comm: syz-executor657 Not tainted 4.14.266-syzkaller #0 [ 84.747863] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 84.757192] Call Trace: [ 84.759764] dump_stack+0x1b2/0x281 [ 84.763379] print_address_description.cold+0x54/0x1d3 [ 84.768633] kasan_report_error.cold+0x8a/0x191 [ 84.773296] ? refcount_dec_not_one+0x9a/0xc0 [ 84.777796] __asan_report_load4_noabort+0x68/0x70 [ 84.782719] ? refcount_dec_not_one+0x9a/0xc0 [ 84.787201] refcount_dec_not_one+0x9a/0xc0 [ 84.791511] refcount_dec_and_mutex_lock+0x1a/0x60 [ 84.796424] nbd_genl_connect+0xf94/0x1400 [ 84.800652] ? nbd_xmit_timeout+0x500/0x500 [ 84.804954] ? validate_nla+0x192/0x5e0 [ 84.808904] ? nla_parse+0x157/0x1f0 [ 84.812599] genl_family_rcv_msg+0x572/0xb20 [ 84.817098] ? genl_rcv+0x40/0x40 [ 84.820547] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 84.826082] ? trace_hardirqs_on+0x10/0x10 [ 84.830290] ? sock_sendmsg+0xb5/0x100 [ 84.834157] genl_rcv_msg+0xaf/0x140 [ 84.837847] netlink_rcv_skb+0x125/0x390 [ 84.841885] ? genl_family_rcv_msg+0xb20/0xb20 [ 84.846848] ? netlink_ack+0x9a0/0x9a0 [ 84.850715] ? lock_acquire+0x170/0x3f0 [ 84.854700] genl_rcv+0x24/0x40 [ 84.857970] netlink_unicast+0x437/0x610 [ 84.862035] ? netlink_sendskb+0xd0/0xd0 [ 84.866081] ? __check_object_size+0x179/0x230 [ 84.870641] netlink_sendmsg+0x648/0xbc0 [ 84.874685] ? nlmsg_notify+0x1b0/0x1b0 [ 84.878633] ? kernel_recvmsg+0x210/0x210 [ 84.882760] ? security_socket_sendmsg+0x83/0xb0 [ 84.887496] ? nlmsg_notify+0x1b0/0x1b0 [ 84.891451] sock_sendmsg+0xb5/0x100 [ 84.895147] ___sys_sendmsg+0x6c8/0x800 [ 84.899102] ? copy_msghdr_from_user+0x3b0/0x3b0 [ 84.903842] ? netlink_dump+0xad0/0xad0 [ 84.907794] ? nlmsg_notify+0x1b0/0x1b0 [ 84.911747] ? security_socket_recvmsg+0x8b/0xc0 [ 84.916478] ? SyS_recvfrom+0x27f/0x340 [ 84.920426] ? SyS_send+0x40/0x40 [ 84.923850] ? vm_insert_page+0x7c0/0x7c0 [ 84.927975] ? __fdget+0x167/0x1f0 [ 84.931488] ? sockfd_lookup_light+0xb2/0x160 [ 84.935961] __sys_sendmsg+0xa3/0x120 [ 84.939741] ? SyS_shutdown+0x160/0x160 [ 84.943696] ? up_read+0x17/0x30 [ 84.947039] ? __do_page_fault+0x159/0xad0 [ 84.951249] SyS_sendmsg+0x27/0x40 [ 84.954765] ? __sys_sendmsg+0x120/0x120 [ 84.958799] do_syscall_64+0x1d5/0x640 [ 84.962667] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 84.967833] RIP: 0033:0x7fecbf724949 [ 84.971536] RSP: 002b:00007fffdfb6bc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 84.979241] RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007fecbf724949 [ 84.986489] RDX: 0000000000000000 RSI: 0000000020000380 RDI: 0000000000000003 [ 84.993760] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 85.001106] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000001496d [ 85.008354] R13: 00007fffdfb6bc8c R14: 00007fffdfb6bca0 R15: 00007fffdfb6bc90 [ 85.015609] [ 85.017214] Allocated by task 8175: [ 85.020819] kasan_kmalloc+0xeb/0x160 [ 85.024601] kmem_cache_alloc_trace+0x131/0x3d0 [ 85.029251] nbd_dev_add+0x7c/0x800 [ 85.032853] nbd_genl_connect+0x3a4/0x1400 [ 85.037084] genl_family_rcv_msg+0x572/0xb20 [ 85.041469] genl_rcv_msg+0xaf/0x140 [ 85.045158] netlink_rcv_skb+0x125/0x390 [ 85.049204] genl_rcv+0x24/0x40 [ 85.052464] netlink_unicast+0x437/0x610 [ 85.056498] netlink_sendmsg+0x648/0xbc0 [ 85.060550] sock_sendmsg+0xb5/0x100 [ 85.064235] ___sys_sendmsg+0x6c8/0x800 [ 85.068181] __sys_sendmsg+0xa3/0x120 [ 85.071967] SyS_sendmsg+0x27/0x40 [ 85.075496] do_syscall_64+0x1d5/0x640 [ 85.079357] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 85.084518] [ 85.086135] Freed by task 8187: [ 85.089387] kasan_slab_free+0xc3/0x1a0 [ 85.093343] kfree+0xc9/0x250 [ 85.096431] nbd_put.part.0+0x100/0x140 [ 85.100402] nbd_config_put+0x62a/0x810 [ 85.104354] nbd_genl_connect+0xf6c/0x1400 [ 85.108581] genl_family_rcv_msg+0x572/0xb20 [ 85.112971] genl_rcv_msg+0xaf/0x140 [ 85.116663] netlink_rcv_skb+0x125/0x390 [ 85.120699] genl_rcv+0x24/0x40 [ 85.123961] netlink_unicast+0x437/0x610 [ 85.128011] netlink_sendmsg+0x648/0xbc0 [ 85.132058] sock_sendmsg+0xb5/0x100 [ 85.135752] ___sys_sendmsg+0x6c8/0x800 [ 85.139709] __sys_sendmsg+0xa3/0x120 [ 85.143495] SyS_sendmsg+0x27/0x40 [ 85.147560] do_syscall_64+0x1d5/0x640 [ 85.151439] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 85.156611] [ 85.158217] The buggy address belongs to the object at ffff8880a179f500 [ 85.158217] which belongs to the cache kmalloc-512 of size 512 [ 85.170856] The buggy address is located 216 bytes inside of [ 85.170856] 512-byte region [ffff8880a179f500, ffff8880a179f700) [ 85.182712] The buggy address belongs to the page: [ 85.187626] page:ffffea000285e7c0 count:1 mapcount:0 mapping:ffff8880a179f000 index:0x0 [ 85.195746] flags: 0xfff00000000100(slab) [ 85.199870] raw: 00fff00000000100 ffff8880a179f000 0000000000000000 0000000100000006 [ 85.207726] raw: ffffea00027898a0 ffffea0002a747e0 ffff88813fe74940 0000000000000000 [ 85.215601] page dumped because: kasan: bad access detected [ 85.221301] [ 85.222902] Memory state around the buggy address: [ 85.227819] ffff8880a179f480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 85.235255] ffff8880a179f500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 85.242592] >ffff8880a179f580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 85.249933] ^ [ 85.256140] ffff8880a179f600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 85.263485] ffff8880a179f680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 85.270819] ================================================================== [ 85.278163] Disabling lock debugging due to kernel taint [ 85.286939] Kernel panic - not syncing: panic_on_warn set ... [ 85.286939] [ 85.294300] CPU: 1 PID: 8187 Comm: syz-executor657 Tainted: G B 4.14.266-syzkaller #0 [ 85.303377] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 85.312717] Call Trace: [ 85.315295] dump_stack+0x1b2/0x281 [ 85.318910] panic+0x1f9/0x42d [ 85.322100] ? add_taint.cold+0x16/0x16 [ 85.326055] ? ___preempt_schedule+0x16/0x18 [ 85.330435] kasan_end_report+0x43/0x49 [ 85.334378] kasan_report_error.cold+0xa7/0x191 [ 85.339032] ? refcount_dec_not_one+0x9a/0xc0 [ 85.343496] __asan_report_load4_noabort+0x68/0x70 [ 85.348398] ? refcount_dec_not_one+0x9a/0xc0 [ 85.352868] refcount_dec_not_one+0x9a/0xc0 [ 85.357162] refcount_dec_and_mutex_lock+0x1a/0x60 [ 85.362064] nbd_genl_connect+0xf94/0x1400 [ 85.366274] ? nbd_xmit_timeout+0x500/0x500 [ 85.370569] ? validate_nla+0x192/0x5e0 [ 85.374515] ? nla_parse+0x157/0x1f0 [ 85.378561] genl_family_rcv_msg+0x572/0xb20 [ 85.382949] ? genl_rcv+0x40/0x40 [ 85.386380] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 85.391812] ? trace_hardirqs_on+0x10/0x10 [ 85.396020] ? sock_sendmsg+0xb5/0x100 [ 85.399885] genl_rcv_msg+0xaf/0x140 [ 85.403590] netlink_rcv_skb+0x125/0x390 [ 85.407635] ? genl_family_rcv_msg+0xb20/0xb20 [ 85.412190] ? netlink_ack+0x9a0/0x9a0 [ 85.416308] ? lock_acquire+0x170/0x3f0 [ 85.420254] genl_rcv+0x24/0x40 [ 85.423513] netlink_unicast+0x437/0x610 [ 85.427547] ? netlink_sendskb+0xd0/0xd0 [ 85.431579] ? __check_object_size+0x179/0x230 [ 85.436135] netlink_sendmsg+0x648/0xbc0 [ 85.440174] ? nlmsg_notify+0x1b0/0x1b0 [ 85.444131] ? kernel_recvmsg+0x210/0x210 [ 85.448264] ? security_socket_sendmsg+0x83/0xb0 [ 85.453058] ? nlmsg_notify+0x1b0/0x1b0 [ 85.457022] sock_sendmsg+0xb5/0x100 [ 85.460721] ___sys_sendmsg+0x6c8/0x800 [ 85.464671] ? copy_msghdr_from_user+0x3b0/0x3b0 [ 85.469401] ? netlink_dump+0xad0/0xad0 [ 85.473366] ? nlmsg_notify+0x1b0/0x1b0 [ 85.477331] ? security_socket_recvmsg+0x8b/0xc0 [ 85.482065] ? SyS_recvfrom+0x27f/0x340 [ 85.486014] ? SyS_send+0x40/0x40 [ 85.489443] ? vm_insert_page+0x7c0/0x7c0 [ 85.493563] ? __fdget+0x167/0x1f0 [ 85.497077] ? sockfd_lookup_light+0xb2/0x160 [ 85.501546] __sys_sendmsg+0xa3/0x120 [ 85.505321] ? SyS_shutdown+0x160/0x160 [ 85.509271] ? up_read+0x17/0x30 [ 85.512613] ? __do_page_fault+0x159/0xad0 [ 85.516821] SyS_sendmsg+0x27/0x40 [ 85.520348] ? __sys_sendmsg+0x120/0x120 [ 85.524381] do_syscall_64+0x1d5/0x640 [ 85.528244] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 85.533408] RIP: 0033:0x7fecbf724949 [ 85.537092] RSP: 002b:00007fffdfb6bc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 85.544771] RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007fecbf724949 [ 85.552015] RDX: 0000000000000000 RSI: 0000000020000380 RDI: 0000000000000003 [ 85.559262] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 85.566508] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000001496d [ 85.573750] R13: 00007fffdfb6bc8c R14: 00007fffdfb6bca0 R15: 00007fffdfb6bc90 [ 85.581167] Kernel Offset: disabled [ 85.584775] Rebooting in 86400 seconds..