[ OK ] Found device /dev/ttyS0. [ OK ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch. [ OK ] Started Serial Getty on ttyS0. [ 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.1.67' (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 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.121197] ================================================================== [ 29.128842] BUG: KASAN: use-after-free in refcount_dec_not_one+0x9a/0xc0 [ 29.135680] Read of size 4 at addr ffff8880a94ee358 by task syz-executor229/8274 [ 29.143211] [ 29.144836] CPU: 1 PID: 8274 Comm: syz-executor229 Not tainted 4.14.291-syzkaller #0 [ 29.152710] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 [ 29.162044] Call Trace: [ 29.164624] dump_stack+0x1b2/0x281 [ 29.168248] print_address_description.cold+0x54/0x1d3 [ 29.173519] kasan_report_error.cold+0x8a/0x191 [ 29.178166] ? refcount_dec_not_one+0x9a/0xc0 [ 29.182647] __asan_report_load4_noabort+0x68/0x70 [ 29.187580] ? refcount_dec_not_one+0x9a/0xc0 [ 29.192064] refcount_dec_not_one+0x9a/0xc0 [ 29.196367] refcount_dec_and_mutex_lock+0x1a/0x60 [ 29.201278] nbd_genl_connect+0xce1/0x13e0 [ 29.205497] ? nbd_xmit_timeout+0x500/0x500 [ 29.209797] ? validate_nla+0x192/0x5e0 [ 29.213755] ? nla_parse+0x157/0x1f0 [ 29.217482] genl_family_rcv_msg+0x572/0xb20 [ 29.221871] ? genl_rcv+0x40/0x40 [ 29.225319] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.230748] ? __kmalloc_node_track_caller+0x4c/0x70 [ 29.235834] ? trace_hardirqs_on+0x10/0x10 [ 29.240055] genl_rcv_msg+0xaf/0x140 [ 29.243746] netlink_rcv_skb+0x125/0x390 [ 29.247787] ? genl_family_rcv_msg+0xb20/0xb20 [ 29.252346] ? netlink_ack+0x9a0/0x9a0 [ 29.256222] ? lock_acquire+0x170/0x3f0 [ 29.260175] genl_rcv+0x24/0x40 [ 29.263434] netlink_unicast+0x437/0x610 [ 29.267475] ? netlink_sendskb+0xd0/0xd0 [ 29.271512] ? __check_object_size+0x179/0x230 [ 29.276075] netlink_sendmsg+0x648/0xbc0 [ 29.280125] ? nlmsg_notify+0x1b0/0x1b0 [ 29.284089] ? kernel_recvmsg+0x210/0x210 [ 29.288231] ? security_socket_sendmsg+0x83/0xb0 [ 29.293138] ? nlmsg_notify+0x1b0/0x1b0 [ 29.297088] sock_sendmsg+0xb5/0x100 [ 29.300782] ___sys_sendmsg+0x6c8/0x800 [ 29.304734] ? copy_msghdr_from_user+0x3b0/0x3b0 [ 29.309465] ? netlink_dump+0xb90/0xb90 [ 29.313415] ? nlmsg_notify+0x1b0/0x1b0 [ 29.317370] ? security_socket_recvmsg+0x8b/0xc0 [ 29.322120] ? SyS_recvfrom+0x27f/0x340 [ 29.326085] ? SyS_send+0x40/0x40 [ 29.329514] ? vm_insert_page+0x7c0/0x7c0 [ 29.333641] ? __fdget+0x167/0x1f0 [ 29.337157] ? sockfd_lookup_light+0xb2/0x160 [ 29.341627] __sys_sendmsg+0xa3/0x120 [ 29.345413] ? SyS_shutdown+0x160/0x160 [ 29.349374] ? up_read+0x17/0x30 [ 29.352717] ? __do_page_fault+0x159/0xad0 [ 29.356945] SyS_sendmsg+0x27/0x40 [ 29.360484] ? __sys_sendmsg+0x120/0x120 [ 29.364521] do_syscall_64+0x1d5/0x640 [ 29.368400] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.373575] RIP: 0033:0x7f9390ca4919 [ 29.377265] RSP: 002b:00007ffe22e5fd68 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 29.384952] RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007f9390ca4919 [ 29.392206] RDX: 0000000000000000 RSI: 0000000020000380 RDI: 0000000000000003 [ 29.399454] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 29.406702] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000702a [ 29.413949] R13: 00007ffe22e5fd7c R14: 00007ffe22e5fd90 R15: 00007ffe22e5fd80 [ 29.421214] [ 29.422819] Allocated by task 8264: [ 29.426425] kasan_kmalloc+0xeb/0x160 [ 29.430200] kmem_cache_alloc_trace+0x131/0x3d0 [ 29.434857] nbd_dev_add+0x7c/0x800 [ 29.438457] nbd_genl_connect+0x3a4/0x13e0 [ 29.442670] genl_family_rcv_msg+0x572/0xb20 [ 29.447067] genl_rcv_msg+0xaf/0x140 [ 29.450755] netlink_rcv_skb+0x125/0x390 [ 29.454787] genl_rcv+0x24/0x40 [ 29.458041] netlink_unicast+0x437/0x610 [ 29.462089] netlink_sendmsg+0x648/0xbc0 [ 29.466129] sock_sendmsg+0xb5/0x100 [ 29.469816] ___sys_sendmsg+0x6c8/0x800 [ 29.473764] __sys_sendmsg+0xa3/0x120 [ 29.477536] SyS_sendmsg+0x27/0x40 [ 29.481052] do_syscall_64+0x1d5/0x640 [ 29.484932] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.490092] [ 29.491699] Freed by task 8274: [ 29.494952] kasan_slab_free+0xc3/0x1a0 [ 29.498913] kfree+0xc9/0x250 [ 29.501997] nbd_put.part.0+0x100/0x140 [ 29.505944] nbd_config_put+0x51c/0x6c0 [ 29.509899] nbd_genl_connect+0xcb9/0x13e0 [ 29.514108] genl_family_rcv_msg+0x572/0xb20 [ 29.518488] genl_rcv_msg+0xaf/0x140 [ 29.522191] netlink_rcv_skb+0x125/0x390 [ 29.526224] genl_rcv+0x24/0x40 [ 29.529479] netlink_unicast+0x437/0x610 [ 29.533516] netlink_sendmsg+0x648/0xbc0 [ 29.537551] sock_sendmsg+0xb5/0x100 [ 29.541251] ___sys_sendmsg+0x6c8/0x800 [ 29.545200] __sys_sendmsg+0xa3/0x120 [ 29.549001] SyS_sendmsg+0x27/0x40 [ 29.552522] do_syscall_64+0x1d5/0x640 [ 29.556396] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.561563] [ 29.563173] The buggy address belongs to the object at ffff8880a94ee280 [ 29.563173] which belongs to the cache kmalloc-512 of size 512 [ 29.575812] The buggy address is located 216 bytes inside of [ 29.575812] 512-byte region [ffff8880a94ee280, ffff8880a94ee480) [ 29.587666] The buggy address belongs to the page: [ 29.592573] page:ffffea0002a53b80 count:1 mapcount:0 mapping:ffff8880a94ee000 index:0x0 [ 29.600702] flags: 0xfff00000000100(slab) [ 29.606908] raw: 00fff00000000100 ffff8880a94ee000 0000000000000000 0000000100000006 [ 29.614775] raw: ffffea00027904a0 ffff88813fe64748 ffff88813fe74940 0000000000000000 [ 29.622628] page dumped because: kasan: bad access detected [ 29.628307] [ 29.629909] Memory state around the buggy address: [ 29.634810] ffff8880a94ee200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.642142] ffff8880a94ee280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.649483] >ffff8880a94ee300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.656814] ^ [ 29.663023] ffff8880a94ee380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.670356] ffff8880a94ee400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.677685] ================================================================== [ 29.685014] Disabling lock debugging due to kernel taint [ 29.691636] Kernel panic - not syncing: panic_on_warn set ... [ 29.691636] [ 29.698999] CPU: 1 PID: 8274 Comm: syz-executor229 Tainted: G B 4.14.291-syzkaller #0 [ 29.708078] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 [ 29.717418] Call Trace: [ 29.720001] dump_stack+0x1b2/0x281 [ 29.723618] panic+0x1f9/0x42d [ 29.726798] ? add_taint.cold+0x16/0x16 [ 29.730750] ? ___preempt_schedule+0x16/0x18 [ 29.735188] kasan_end_report+0x43/0x49 [ 29.739139] kasan_report_error.cold+0xa7/0x191 [ 29.743783] ? refcount_dec_not_one+0x9a/0xc0 [ 29.748253] __asan_report_load4_noabort+0x68/0x70 [ 29.753159] ? refcount_dec_not_one+0x9a/0xc0 [ 29.757628] refcount_dec_not_one+0x9a/0xc0 [ 29.761926] refcount_dec_and_mutex_lock+0x1a/0x60 [ 29.766833] nbd_genl_connect+0xce1/0x13e0 [ 29.771042] ? nbd_xmit_timeout+0x500/0x500 [ 29.775340] ? validate_nla+0x192/0x5e0 [ 29.779286] ? nla_parse+0x157/0x1f0 [ 29.782976] genl_family_rcv_msg+0x572/0xb20 [ 29.787366] ? genl_rcv+0x40/0x40 [ 29.790795] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.796220] ? __kmalloc_node_track_caller+0x4c/0x70 [ 29.801321] ? trace_hardirqs_on+0x10/0x10 [ 29.805530] genl_rcv_msg+0xaf/0x140 [ 29.809218] netlink_rcv_skb+0x125/0x390 [ 29.813254] ? genl_family_rcv_msg+0xb20/0xb20 [ 29.817808] ? netlink_ack+0x9a0/0x9a0 [ 29.821681] ? lock_acquire+0x170/0x3f0 [ 29.825636] genl_rcv+0x24/0x40 [ 29.828904] netlink_unicast+0x437/0x610 [ 29.832938] ? netlink_sendskb+0xd0/0xd0 [ 29.836982] ? __check_object_size+0x179/0x230 [ 29.841537] netlink_sendmsg+0x648/0xbc0 [ 29.845571] ? nlmsg_notify+0x1b0/0x1b0 [ 29.849535] ? kernel_recvmsg+0x210/0x210 [ 29.853657] ? security_socket_sendmsg+0x83/0xb0 [ 29.858394] ? nlmsg_notify+0x1b0/0x1b0 [ 29.862341] sock_sendmsg+0xb5/0x100 [ 29.866028] ___sys_sendmsg+0x6c8/0x800 [ 29.869975] ? copy_msghdr_from_user+0x3b0/0x3b0 [ 29.874717] ? netlink_dump+0xb90/0xb90 [ 29.878671] ? nlmsg_notify+0x1b0/0x1b0 [ 29.882624] ? security_socket_recvmsg+0x8b/0xc0 [ 29.887359] ? SyS_recvfrom+0x27f/0x340 [ 29.891311] ? SyS_send+0x40/0x40 [ 29.894751] ? vm_insert_page+0x7c0/0x7c0 [ 29.898897] ? __fdget+0x167/0x1f0 [ 29.902415] ? sockfd_lookup_light+0xb2/0x160 [ 29.906890] __sys_sendmsg+0xa3/0x120 [ 29.910686] ? SyS_shutdown+0x160/0x160 [ 29.914640] ? up_read+0x17/0x30 [ 29.917981] ? __do_page_fault+0x159/0xad0 [ 29.922202] SyS_sendmsg+0x27/0x40 [ 29.925737] ? __sys_sendmsg+0x120/0x120 [ 29.929777] do_syscall_64+0x1d5/0x640 [ 29.933647] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.938813] RIP: 0033:0x7f9390ca4919 [ 29.942510] RSP: 002b:00007ffe22e5fd68 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 29.950192] RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007f9390ca4919 [ 29.957465] RDX: 0000000000000000 RSI: 0000000020000380 RDI: 0000000000000003 [ 29.964713] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 29.971960] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000702a [ 29.979208] R13: 00007ffe22e5fd7c R14: 00007ffe22e5fd90 R15: 00007ffe22e5fd80 [ 29.986560] Kernel Offset: disabled [ 29.990169] Rebooting in 86400 seconds..