[ 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. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.63' (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 syzkaller login: [ 29.865571] ================================================================== [ 29.874229] BUG: KASAN: use-after-free in refcount_dec_not_one+0x9a/0xc0 [ 29.881326] Read of size 4 at addr ffff88809a3efe18 by task syz-executor226/8080 [ 29.889943] [ 29.891685] CPU: 1 PID: 8080 Comm: syz-executor226 Not tainted 4.14.232-syzkaller #0 [ 29.900288] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.910464] Call Trace: [ 29.913602] dump_stack+0x1b2/0x281 [ 29.917383] print_address_description.cold+0x54/0x1d3 [ 29.922936] kasan_report_error.cold+0x8a/0x191 [ 29.928172] ? refcount_dec_not_one+0x9a/0xc0 [ 29.932680] __asan_report_load4_noabort+0x68/0x70 [ 29.937869] ? refcount_dec_not_one+0x9a/0xc0 [ 29.942532] refcount_dec_not_one+0x9a/0xc0 [ 29.946928] refcount_dec_and_mutex_lock+0x1a/0x60 [ 29.951935] nbd_genl_connect+0xf94/0x1400 [ 29.956159] ? nbd_xmit_timeout+0x500/0x500 [ 29.960768] ? validate_nla+0x192/0x5e0 [ 29.965281] ? nla_parse+0x157/0x1f0 [ 29.969092] genl_family_rcv_msg+0x572/0xb20 [ 29.973612] ? genl_rcv+0x40/0x40 [ 29.977631] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.983584] ? trace_hardirqs_on+0x10/0x10 [ 29.987896] ? sock_sendmsg+0xb5/0x100 [ 29.992088] genl_rcv_msg+0xaf/0x140 [ 29.996792] netlink_rcv_skb+0x125/0x390 [ 30.001132] ? genl_family_rcv_msg+0xb20/0xb20 [ 30.005939] ? netlink_ack+0x9a0/0x9a0 [ 30.010369] ? lock_acquire+0x170/0x3f0 [ 30.014536] genl_rcv+0x24/0x40 [ 30.018242] netlink_unicast+0x437/0x610 [ 30.022597] ? netlink_sendskb+0xd0/0xd0 [ 30.026963] ? __check_object_size+0x179/0x230 [ 30.031727] netlink_sendmsg+0x62e/0xb80 [ 30.035779] ? nlmsg_notify+0x170/0x170 [ 30.040421] ? kernel_recvmsg+0x210/0x210 [ 30.045204] ? security_socket_sendmsg+0x83/0xb0 [ 30.050586] ? nlmsg_notify+0x170/0x170 [ 30.055135] sock_sendmsg+0xb5/0x100 [ 30.059213] ___sys_sendmsg+0x6c8/0x800 [ 30.063413] ? copy_msghdr_from_user+0x3b0/0x3b0 [ 30.068912] ? netlink_dump+0xad0/0xad0 [ 30.073254] ? nlmsg_notify+0x170/0x170 [ 30.077511] ? security_socket_recvmsg+0x8b/0xc0 [ 30.082489] ? SyS_recvfrom+0x27f/0x340 [ 30.086919] ? SyS_send+0x40/0x40 [ 30.090531] ? vm_insert_page+0x7c0/0x7c0 [ 30.094912] ? __fdget+0x167/0x1f0 [ 30.099041] ? sockfd_lookup_light+0xb2/0x160 [ 30.103532] __sys_sendmsg+0xa3/0x120 [ 30.107387] ? SyS_shutdown+0x160/0x160 [ 30.111919] ? up_read+0x17/0x30 [ 30.115963] ? __do_page_fault+0x159/0xad0 [ 30.120875] SyS_sendmsg+0x27/0x40 [ 30.124409] ? __sys_sendmsg+0x120/0x120 [ 30.128480] do_syscall_64+0x1d5/0x640 [ 30.133038] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 30.138597] RIP: 0033:0x4407e9 [ 30.141862] RSP: 002b:00007fff9763d998 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 30.149850] RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00000000004407e9 [ 30.157106] RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000003 [ 30.164698] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 30.171981] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000007372 [ 30.179599] R13: 00007fff9763d9ac R14: 00007fff9763d9c0 R15: 00007fff9763d9b0 [ 30.187516] [ 30.189590] Allocated by task 8061: [ 30.193335] kasan_kmalloc+0xeb/0x160 [ 30.198012] kmem_cache_alloc_trace+0x131/0x3d0 [ 30.203013] nbd_dev_add+0x7c/0x800 [ 30.206749] nbd_genl_connect+0x3a4/0x1400 [ 30.211105] genl_family_rcv_msg+0x572/0xb20 [ 30.215742] genl_rcv_msg+0xaf/0x140 [ 30.219730] netlink_rcv_skb+0x125/0x390 [ 30.223781] genl_rcv+0x24/0x40 [ 30.227490] netlink_unicast+0x437/0x610 [ 30.231576] netlink_sendmsg+0x62e/0xb80 [ 30.235624] sock_sendmsg+0xb5/0x100 [ 30.239428] ___sys_sendmsg+0x6c8/0x800 [ 30.243893] __sys_sendmsg+0xa3/0x120 [ 30.247784] SyS_sendmsg+0x27/0x40 [ 30.251618] do_syscall_64+0x1d5/0x640 [ 30.255697] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 30.260876] [ 30.262578] Freed by task 8080: [ 30.266029] kasan_slab_free+0xc3/0x1a0 [ 30.270110] kfree+0xc9/0x250 [ 30.273226] nbd_put.part.0+0x100/0x140 [ 30.277329] nbd_config_put+0x62a/0x810 [ 30.281667] nbd_genl_connect+0xf6c/0x1400 [ 30.286344] genl_family_rcv_msg+0x572/0xb20 [ 30.290925] genl_rcv_msg+0xaf/0x140 [ 30.294887] netlink_rcv_skb+0x125/0x390 [ 30.299075] genl_rcv+0x24/0x40 [ 30.302534] netlink_unicast+0x437/0x610 [ 30.307068] netlink_sendmsg+0x62e/0xb80 [ 30.311334] sock_sendmsg+0xb5/0x100 [ 30.315407] ___sys_sendmsg+0x6c8/0x800 [ 30.319570] __sys_sendmsg+0xa3/0x120 [ 30.323571] SyS_sendmsg+0x27/0x40 [ 30.327484] do_syscall_64+0x1d5/0x640 [ 30.331520] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 30.337505] [ 30.339302] The buggy address belongs to the object at ffff88809a3efd40 [ 30.339302] which belongs to the cache kmalloc-512 of size 512 [ 30.353271] The buggy address is located 216 bytes inside of [ 30.353271] 512-byte region [ffff88809a3efd40, ffff88809a3eff40) [ 30.365439] The buggy address belongs to the page: [ 30.370672] page:ffffea000268fbc0 count:1 mapcount:0 mapping:ffff88809a3ef0c0 index:0xffff88809a3ef840 [ 30.381253] flags: 0xfff00000000100(slab) [ 30.385888] raw: 00fff00000000100 ffff88809a3ef0c0 ffff88809a3ef840 0000000100000005 [ 30.393855] raw: ffffea000268fa60 ffffea0002c5eb60 ffff88813fe80940 0000000000000000 [ 30.401894] page dumped because: kasan: bad access detected [ 30.407654] [ 30.409261] Memory state around the buggy address: [ 30.414526] ffff88809a3efd00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 30.422043] ffff88809a3efd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.429757] >ffff88809a3efe00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.437107] ^ [ 30.441692] ffff88809a3efe80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.449753] ffff88809a3eff00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 30.457277] ================================================================== [ 30.465313] Disabling lock debugging due to kernel taint [ 30.472107] Kernel panic - not syncing: panic_on_warn set ... [ 30.472107] [ 30.479823] CPU: 1 PID: 8080 Comm: syz-executor226 Tainted: G B 4.14.232-syzkaller #0 [ 30.489128] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.498851] Call Trace: [ 30.501585] dump_stack+0x1b2/0x281 [ 30.510902] panic+0x1f9/0x42d [ 30.514669] ? add_taint.cold+0x16/0x16 [ 30.519054] ? ___preempt_schedule+0x16/0x18 [ 30.524510] kasan_end_report+0x43/0x49 [ 30.528558] kasan_report_error.cold+0xa7/0x191 [ 30.533718] ? refcount_dec_not_one+0x9a/0xc0 [ 30.538219] __asan_report_load4_noabort+0x68/0x70 [ 30.543827] ? refcount_dec_not_one+0x9a/0xc0 [ 30.548867] refcount_dec_not_one+0x9a/0xc0 [ 30.553267] refcount_dec_and_mutex_lock+0x1a/0x60 [ 30.558967] nbd_genl_connect+0xf94/0x1400 [ 30.563698] ? nbd_xmit_timeout+0x500/0x500 [ 30.568356] ? validate_nla+0x192/0x5e0 [ 30.572441] ? nla_parse+0x157/0x1f0 [ 30.576340] genl_family_rcv_msg+0x572/0xb20 [ 30.580923] ? genl_rcv+0x40/0x40 [ 30.584450] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 30.589896] ? trace_hardirqs_on+0x10/0x10 [ 30.594127] ? sock_sendmsg+0xb5/0x100 [ 30.597999] genl_rcv_msg+0xaf/0x140 [ 30.601823] netlink_rcv_skb+0x125/0x390 [ 30.606526] ? genl_family_rcv_msg+0xb20/0xb20 [ 30.616548] ? netlink_ack+0x9a0/0x9a0 [ 30.620982] ? lock_acquire+0x170/0x3f0 [ 30.625340] genl_rcv+0x24/0x40 [ 30.628629] netlink_unicast+0x437/0x610 [ 30.633047] ? netlink_sendskb+0xd0/0xd0 [ 30.637603] ? __check_object_size+0x179/0x230 [ 30.642781] netlink_sendmsg+0x62e/0xb80 [ 30.647087] ? nlmsg_notify+0x170/0x170 [ 30.651239] ? kernel_recvmsg+0x210/0x210 [ 30.655815] ? security_socket_sendmsg+0x83/0xb0 [ 30.660776] ? nlmsg_notify+0x170/0x170 [ 30.664735] sock_sendmsg+0xb5/0x100 [ 30.668542] ___sys_sendmsg+0x6c8/0x800 [ 30.672780] ? copy_msghdr_from_user+0x3b0/0x3b0 [ 30.677788] ? netlink_dump+0xad0/0xad0 [ 30.684293] ? nlmsg_notify+0x170/0x170 [ 30.689642] ? security_socket_recvmsg+0x8b/0xc0 [ 30.694827] ? SyS_recvfrom+0x27f/0x340 [ 30.699112] ? SyS_send+0x40/0x40 [ 30.702824] ? vm_insert_page+0x7c0/0x7c0 [ 30.707376] ? __fdget+0x167/0x1f0 [ 30.711176] ? sockfd_lookup_light+0xb2/0x160 [ 30.715829] __sys_sendmsg+0xa3/0x120 [ 30.719714] ? SyS_shutdown+0x160/0x160 [ 30.723949] ? up_read+0x17/0x30 [ 30.727590] ? __do_page_fault+0x159/0xad0 [ 30.731957] SyS_sendmsg+0x27/0x40 [ 30.735677] ? __sys_sendmsg+0x120/0x120 [ 30.740141] do_syscall_64+0x1d5/0x640 [ 30.744036] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 30.749437] RIP: 0033:0x4407e9 [ 30.753369] RSP: 002b:00007fff9763d998 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 30.761432] RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00000000004407e9 [ 30.768920] RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000003 [ 30.776830] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 30.784102] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000007372 [ 30.791898] R13: 00007fff9763d9ac R14: 00007fff9763d9c0 R15: 00007fff9763d9b0 [ 30.800666] Kernel Offset: disabled [ 30.804374] Rebooting in 86400 seconds..