[ OK ] Started Getty on tty2. [ OK ] Reached target Login Prompts. [ OK ] Started OpenBSD Secure Shell server. [ OK ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch. [ OK ] Reached target Multi-User System. [ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... Starting Load/Save RF Kill Switch Status... [ OK ] Started Load/Save RF Kill Switch Status. [ OK ] Started Update UTMP about System Runlevel Changes. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.113' (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 syzkaller login: [ 28.101082] ================================================================== [ 28.108519] BUG: KASAN: use-after-free in refcount_dec_not_one+0x9a/0xc0 [ 28.115333] Read of size 4 at addr ffff8880b3f2fb98 by task syz-executor283/8097 [ 28.122841] [ 28.124462] CPU: 1 PID: 8097 Comm: syz-executor283 Not tainted 4.14.278-syzkaller #0 [ 28.132312] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.141640] Call Trace: [ 28.144212] dump_stack+0x1b2/0x281 [ 28.147828] print_address_description.cold+0x54/0x1d3 [ 28.153089] kasan_report_error.cold+0x8a/0x191 [ 28.157742] ? refcount_dec_not_one+0x9a/0xc0 [ 28.162214] __asan_report_load4_noabort+0x68/0x70 [ 28.167120] ? refcount_dec_not_one+0x9a/0xc0 [ 28.171590] refcount_dec_not_one+0x9a/0xc0 [ 28.175887] refcount_dec_and_mutex_lock+0x1a/0x60 [ 28.180798] nbd_genl_connect+0xf94/0x1400 [ 28.185010] ? nbd_xmit_timeout+0x500/0x500 [ 28.189311] ? validate_nla+0x192/0x5e0 [ 28.193258] ? nla_parse+0x157/0x1f0 [ 28.196948] genl_family_rcv_msg+0x572/0xb20 [ 28.201331] ? genl_rcv+0x40/0x40 [ 28.204762] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 28.210191] ? __kmalloc_node_track_caller+0x4c/0x70 [ 28.215268] ? trace_hardirqs_on+0x10/0x10 [ 28.219510] genl_rcv_msg+0xaf/0x140 [ 28.223209] netlink_rcv_skb+0x125/0x390 [ 28.227258] ? genl_family_rcv_msg+0xb20/0xb20 [ 28.231829] ? netlink_ack+0x9a0/0x9a0 [ 28.235702] ? lock_acquire+0x170/0x3f0 [ 28.239664] genl_rcv+0x24/0x40 [ 28.242932] netlink_unicast+0x437/0x610 [ 28.247325] ? netlink_sendskb+0xd0/0xd0 [ 28.251371] ? __check_object_size+0x179/0x230 [ 28.255928] netlink_sendmsg+0x648/0xbc0 [ 28.259965] ? nlmsg_notify+0x1b0/0x1b0 [ 28.263922] ? kernel_recvmsg+0x210/0x210 [ 28.268044] ? security_socket_sendmsg+0x83/0xb0 [ 28.272771] ? nlmsg_notify+0x1b0/0x1b0 [ 28.276724] sock_sendmsg+0xb5/0x100 [ 28.280414] ___sys_sendmsg+0x6c8/0x800 [ 28.284363] ? copy_msghdr_from_user+0x3b0/0x3b0 [ 28.289180] ? netlink_dump+0xb90/0xb90 [ 28.293129] ? nlmsg_notify+0x1b0/0x1b0 [ 28.297078] ? security_socket_recvmsg+0x8b/0xc0 [ 28.301816] ? SyS_recvfrom+0x27f/0x340 [ 28.305770] ? SyS_send+0x40/0x40 [ 28.309199] ? vm_insert_page+0x7c0/0x7c0 [ 28.313321] ? __fdget+0x167/0x1f0 [ 28.316834] ? sockfd_lookup_light+0xb2/0x160 [ 28.321310] __sys_sendmsg+0xa3/0x120 [ 28.325090] ? SyS_shutdown+0x160/0x160 [ 28.329050] ? up_read+0x17/0x30 [ 28.332401] ? __do_page_fault+0x159/0xad0 [ 28.336610] SyS_sendmsg+0x27/0x40 [ 28.340122] ? __sys_sendmsg+0x120/0x120 [ 28.344154] do_syscall_64+0x1d5/0x640 [ 28.348017] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.353181] RIP: 0033:0x7fb11eae5919 [ 28.356865] RSP: 002b:00007ffdb08f6278 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 28.364547] RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007fb11eae5919 [ 28.371793] RDX: 0000000000000000 RSI: 0000000020000380 RDI: 0000000000000003 [ 28.379036] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 28.386278] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000006c5f [ 28.393524] R13: 00007ffdb08f628c R14: 00007ffdb08f62a0 R15: 00007ffdb08f6290 [ 28.400775] [ 28.402377] Allocated by task 8083: [ 28.405990] kasan_kmalloc+0xeb/0x160 [ 28.409775] kmem_cache_alloc_trace+0x131/0x3d0 [ 28.414420] nbd_dev_add+0x7c/0x800 [ 28.418017] nbd_genl_connect+0x3a4/0x1400 [ 28.422227] genl_family_rcv_msg+0x572/0xb20 [ 28.426607] genl_rcv_msg+0xaf/0x140 [ 28.430291] netlink_rcv_skb+0x125/0x390 [ 28.434331] genl_rcv+0x24/0x40 [ 28.437583] netlink_unicast+0x437/0x610 [ 28.441621] netlink_sendmsg+0x648/0xbc0 [ 28.445657] sock_sendmsg+0xb5/0x100 [ 28.449349] ___sys_sendmsg+0x6c8/0x800 [ 28.453297] __sys_sendmsg+0xa3/0x120 [ 28.457071] SyS_sendmsg+0x27/0x40 [ 28.460584] do_syscall_64+0x1d5/0x640 [ 28.464447] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.469603] [ 28.471201] Freed by task 8097: [ 28.474459] kasan_slab_free+0xc3/0x1a0 [ 28.478407] kfree+0xc9/0x250 [ 28.481487] nbd_put.part.0+0x100/0x140 [ 28.485448] nbd_config_put+0x62a/0x810 [ 28.489397] nbd_genl_connect+0xf6c/0x1400 [ 28.493611] genl_family_rcv_msg+0x572/0xb20 [ 28.498006] genl_rcv_msg+0xaf/0x140 [ 28.501703] netlink_rcv_skb+0x125/0x390 [ 28.505747] genl_rcv+0x24/0x40 [ 28.509007] netlink_unicast+0x437/0x610 [ 28.513037] netlink_sendmsg+0x648/0xbc0 [ 28.517068] sock_sendmsg+0xb5/0x100 [ 28.520756] ___sys_sendmsg+0x6c8/0x800 [ 28.524702] __sys_sendmsg+0xa3/0x120 [ 28.528477] SyS_sendmsg+0x27/0x40 [ 28.531992] do_syscall_64+0x1d5/0x640 [ 28.535852] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.541009] [ 28.542609] The buggy address belongs to the object at ffff8880b3f2fac0 [ 28.542609] which belongs to the cache kmalloc-512 of size 512 [ 28.555235] The buggy address is located 216 bytes inside of [ 28.555235] 512-byte region [ffff8880b3f2fac0, ffff8880b3f2fcc0) [ 28.567082] The buggy address belongs to the page: [ 28.571982] page:ffffea0002cfcbc0 count:1 mapcount:0 mapping:ffff8880b3f2f0c0 index:0x0 [ 28.580103] flags: 0xfff00000000100(slab) [ 28.584228] raw: 00fff00000000100 ffff8880b3f2f0c0 0000000000000000 0000000100000006 [ 28.592082] raw: ffffea0002cc70e0 ffffea00025fdf20 ffff88813fe74940 0000000000000000 [ 28.599930] page dumped because: kasan: bad access detected [ 28.605618] [ 28.607216] Memory state around the buggy address: [ 28.612118] ffff8880b3f2fa80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 28.619448] ffff8880b3f2fb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.626791] >ffff8880b3f2fb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.634121] ^ [ 28.638239] ffff8880b3f2fc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.645838] ffff8880b3f2fc80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 28.653165] ================================================================== [ 28.660492] Disabling lock debugging due to kernel taint [ 28.667357] Kernel panic - not syncing: panic_on_warn set ... [ 28.667357] [ 28.674721] CPU: 1 PID: 8097 Comm: syz-executor283 Tainted: G B 4.14.278-syzkaller #0 [ 28.683803] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.693141] Call Trace: [ 28.695717] dump_stack+0x1b2/0x281 [ 28.699331] panic+0x1f9/0x42d [ 28.702510] ? add_taint.cold+0x16/0x16 [ 28.706470] ? ___preempt_schedule+0x16/0x18 [ 28.710852] kasan_end_report+0x43/0x49 [ 28.714797] kasan_report_error.cold+0xa7/0x191 [ 28.719451] ? refcount_dec_not_one+0x9a/0xc0 [ 28.723928] __asan_report_load4_noabort+0x68/0x70 [ 28.728832] ? refcount_dec_not_one+0x9a/0xc0 [ 28.733297] refcount_dec_not_one+0x9a/0xc0 [ 28.737591] refcount_dec_and_mutex_lock+0x1a/0x60 [ 28.742491] nbd_genl_connect+0xf94/0x1400 [ 28.746700] ? nbd_xmit_timeout+0x500/0x500 [ 28.750993] ? validate_nla+0x192/0x5e0 [ 28.754939] ? nla_parse+0x157/0x1f0 [ 28.758627] genl_family_rcv_msg+0x572/0xb20 [ 28.763007] ? genl_rcv+0x40/0x40 [ 28.766450] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 28.771886] ? __kmalloc_node_track_caller+0x4c/0x70 [ 28.776969] ? trace_hardirqs_on+0x10/0x10 [ 28.781179] genl_rcv_msg+0xaf/0x140 [ 28.784867] netlink_rcv_skb+0x125/0x390 [ 28.788900] ? genl_family_rcv_msg+0xb20/0xb20 [ 28.793452] ? netlink_ack+0x9a0/0x9a0 [ 28.797315] ? lock_acquire+0x170/0x3f0 [ 28.801261] genl_rcv+0x24/0x40 [ 28.804511] netlink_unicast+0x437/0x610 [ 28.808542] ? netlink_sendskb+0xd0/0xd0 [ 28.812574] ? __check_object_size+0x179/0x230 [ 28.817126] netlink_sendmsg+0x648/0xbc0 [ 28.821160] ? nlmsg_notify+0x1b0/0x1b0 [ 28.825108] ? kernel_recvmsg+0x210/0x210 [ 28.829314] ? security_socket_sendmsg+0x83/0xb0 [ 28.834042] ? nlmsg_notify+0x1b0/0x1b0 [ 28.837987] sock_sendmsg+0xb5/0x100 [ 28.841671] ___sys_sendmsg+0x6c8/0x800 [ 28.845616] ? copy_msghdr_from_user+0x3b0/0x3b0 [ 28.850344] ? netlink_dump+0xb90/0xb90 [ 28.854291] ? nlmsg_notify+0x1b0/0x1b0 [ 28.858247] ? security_socket_recvmsg+0x8b/0xc0 [ 28.862981] ? SyS_recvfrom+0x27f/0x340 [ 28.866928] ? SyS_send+0x40/0x40 [ 28.870355] ? vm_insert_page+0x7c0/0x7c0 [ 28.874474] ? __fdget+0x167/0x1f0 [ 28.877986] ? sockfd_lookup_light+0xb2/0x160 [ 28.882456] __sys_sendmsg+0xa3/0x120 [ 28.886227] ? SyS_shutdown+0x160/0x160 [ 28.890179] ? up_read+0x17/0x30 [ 28.893516] ? __do_page_fault+0x159/0xad0 [ 28.897730] SyS_sendmsg+0x27/0x40 [ 28.901260] ? __sys_sendmsg+0x120/0x120 [ 28.905296] do_syscall_64+0x1d5/0x640 [ 28.909162] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.914324] RIP: 0033:0x7fb11eae5919 [ 28.918008] RSP: 002b:00007ffdb08f6278 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 28.925773] RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007fb11eae5919 [ 28.933193] RDX: 0000000000000000 RSI: 0000000020000380 RDI: 0000000000000003 [ 28.940433] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 28.947685] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000006c5f [ 28.954925] R13: 00007ffdb08f628c R14: 00007ffdb08f62a0 R15: 00007ffdb08f6290 [ 28.962355] Kernel Offset: disabled [ 28.965966] Rebooting in 86400 seconds..