[ OK ] Started Getty on tty2. [ OK ] Started Getty on tty1. [ 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.0.122' (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 syzkaller login: [ 33.265279] ================================================================== [ 33.272731] BUG: KASAN: use-after-free in refcount_dec_not_one+0x71/0x1d0 [ 33.279647] Read of size 4 at addr ffff8880a148aad8 by task syz-executor271/8225 [ 33.287160] [ 33.288781] CPU: 0 PID: 8225 Comm: syz-executor271 Not tainted 4.19.211-syzkaller #0 [ 33.296639] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.305972] Call Trace: [ 33.308546] dump_stack+0x1fc/0x2ef [ 33.312162] print_address_description.cold+0x54/0x219 [ 33.317446] kasan_report_error.cold+0x8a/0x1b9 [ 33.322099] ? refcount_dec_not_one+0x71/0x1d0 [ 33.326664] kasan_report+0x8f/0xa0 [ 33.330314] ? refcount_dec_not_one+0x71/0x1d0 [ 33.334879] refcount_dec_not_one+0x71/0x1d0 [ 33.339270] ? refcount_dec_and_test_checked+0x20/0x20 [ 33.344530] ? nbd_config_put+0x5da/0x870 [ 33.348665] refcount_dec_and_mutex_lock+0x1c/0x80 [ 33.353578] nbd_genl_connect+0x11ee/0x1630 [ 33.357884] ? nbd_xmit_timeout+0x730/0x730 [ 33.362188] ? __sanitizer_cov_trace_switch+0x4b/0x80 [ 33.367358] ? validate_nla+0x270/0x820 [ 33.371316] ? nla_parse+0x1b2/0x290 [ 33.375013] genl_family_rcv_msg+0x642/0xc40 [ 33.379418] ? genl_rcv+0x40/0x40 [ 33.382860] ? genl_rcv_msg+0x12f/0x160 [ 33.386832] ? mutex_trylock+0x1a0/0x1a0 [ 33.390878] ? __radix_tree_lookup+0x216/0x370 [ 33.395445] genl_rcv_msg+0xbf/0x160 [ 33.399148] netlink_rcv_skb+0x160/0x440 [ 33.403369] ? genl_family_rcv_msg+0xc40/0xc40 [ 33.408052] ? netlink_ack+0xae0/0xae0 [ 33.411926] ? genl_rcv+0x15/0x40 [ 33.415370] genl_rcv+0x24/0x40 [ 33.418643] netlink_unicast+0x4d5/0x690 [ 33.422687] ? netlink_sendskb+0x110/0x110 [ 33.426909] ? _copy_from_iter_full+0x229/0x7c0 [ 33.431560] ? __phys_addr_symbol+0x2c/0x70 [ 33.435863] ? __check_object_size+0x17b/0x3e0 [ 33.440425] netlink_sendmsg+0x6c3/0xc50 [ 33.444470] ? aa_af_perm+0x230/0x230 [ 33.448251] ? nlmsg_notify+0x1f0/0x1f0 [ 33.452205] ? kernel_recvmsg+0x220/0x220 [ 33.456338] ? nlmsg_notify+0x1f0/0x1f0 [ 33.462116] sock_sendmsg+0xc3/0x120 [ 33.465809] ___sys_sendmsg+0x7bb/0x8e0 [ 33.469765] ? copy_msghdr_from_user+0x440/0x440 [ 33.474499] ? netlink_dump+0xc10/0xc10 [ 33.478451] ? nlmsg_notify+0x1f0/0x1f0 [ 33.482433] ? security_socket_recvmsg+0x8f/0xc0 [ 33.487190] ? __sys_recvfrom+0x2cd/0x3a0 [ 33.491321] ? __ia32_sys_send+0x100/0x100 [ 33.495546] ? __fdget+0x1a0/0x230 [ 33.499067] __x64_sys_sendmsg+0x132/0x220 [ 33.503290] ? __sys_sendmsg+0x1b0/0x1b0 [ 33.507343] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 33.512694] ? trace_hardirqs_off_caller+0x6e/0x210 [ 33.517694] ? do_syscall_64+0x21/0x620 [ 33.521655] do_syscall_64+0xf9/0x620 [ 33.525436] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.530602] RIP: 0033:0x7f5ff75fab69 [ 33.534297] 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 [ 33.553176] RSP: 002b:00007ffff70317c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 33.560863] RAX: ffffffffffffffda RBX: 00007ffff7031810 RCX: 00007f5ff75fab69 [ 33.568111] RDX: 0000000000000000 RSI: 0000000020000380 RDI: 0000000000000003 [ 33.575359] RBP: 0000000000000000 R08: 0000000000000000 R09: 00007f5ff766eec0 [ 33.582608] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffff7031800 [ 33.589869] R13: 00000000000081af R14: 00007ffff70317fc R15: 431bde82d7b634db [ 33.597129] [ 33.598735] Allocated by task 8220: [ 33.602350] kmem_cache_alloc_trace+0x12f/0x380 [ 33.607003] nbd_dev_add+0x44/0x890 [ 33.610608] nbd_genl_connect+0x4cc/0x1630 [ 33.614825] genl_family_rcv_msg+0x642/0xc40 [ 33.619220] genl_rcv_msg+0xbf/0x160 [ 33.622914] netlink_rcv_skb+0x160/0x440 [ 33.626955] genl_rcv+0x24/0x40 [ 33.630214] netlink_unicast+0x4d5/0x690 [ 33.634251] netlink_sendmsg+0x6c3/0xc50 [ 33.638293] sock_sendmsg+0xc3/0x120 [ 33.641986] ___sys_sendmsg+0x7bb/0x8e0 [ 33.645953] __x64_sys_sendmsg+0x132/0x220 [ 33.650171] do_syscall_64+0xf9/0x620 [ 33.653954] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.659116] [ 33.660725] Freed by task 8225: [ 33.663989] kfree+0xcc/0x210 [ 33.667087] nbd_put.part.0+0xfe/0x140 [ 33.670960] nbd_config_put+0x6a0/0x870 [ 33.674919] nbd_genl_connect+0x11bb/0x1630 [ 33.679228] genl_family_rcv_msg+0x642/0xc40 [ 33.683628] genl_rcv_msg+0xbf/0x160 [ 33.687321] netlink_rcv_skb+0x160/0x440 [ 33.691360] genl_rcv+0x24/0x40 [ 33.694620] netlink_unicast+0x4d5/0x690 [ 33.698657] netlink_sendmsg+0x6c3/0xc50 [ 33.702713] sock_sendmsg+0xc3/0x120 [ 33.706463] ___sys_sendmsg+0x7bb/0x8e0 [ 33.710424] __x64_sys_sendmsg+0x132/0x220 [ 33.714643] do_syscall_64+0xf9/0x620 [ 33.718429] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.723598] [ 33.725210] The buggy address belongs to the object at ffff8880a148aa00 [ 33.725210] which belongs to the cache kmalloc-512 of size 512 [ 33.737856] The buggy address is located 216 bytes inside of [ 33.737856] 512-byte region [ffff8880a148aa00, ffff8880a148ac00) [ 33.749720] The buggy address belongs to the page: [ 33.754636] page:ffffea0002852280 count:1 mapcount:0 mapping:ffff88813bff0940 index:0x0 [ 33.762760] flags: 0xfff00000000100(slab) [ 33.766900] raw: 00fff00000000100 ffffea0002a54f88 ffffea00025cd708 ffff88813bff0940 [ 33.774773] raw: 0000000000000000 ffff8880a148a000 0000000100000006 0000000000000000 [ 33.782656] page dumped because: kasan: bad access detected [ 33.788341] [ 33.789946] Memory state around the buggy address: [ 33.794856] ffff8880a148a980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.802195] ffff8880a148aa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.809537] >ffff8880a148aa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.816870] ^ [ 33.823081] ffff8880a148ab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.830419] ffff8880a148ab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.837921] ================================================================== [ 33.845266] Disabling lock debugging due to kernel taint [ 33.851198] Kernel panic - not syncing: panic_on_warn set ... [ 33.851198] [ 33.858571] CPU: 0 PID: 8225 Comm: syz-executor271 Tainted: G B 4.19.211-syzkaller #0 [ 33.867831] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.877176] Call Trace: [ 33.879853] dump_stack+0x1fc/0x2ef [ 33.883487] panic+0x26a/0x50e [ 33.886678] ? __warn_printk+0xf3/0xf3 [ 33.890565] ? preempt_schedule_common+0x45/0xc0 [ 33.895322] ? ___preempt_schedule+0x16/0x18 [ 33.899735] ? trace_hardirqs_on+0x55/0x210 [ 33.904051] kasan_end_report+0x43/0x49 [ 33.908007] kasan_report_error.cold+0xa7/0x1b9 [ 33.912755] ? refcount_dec_not_one+0x71/0x1d0 [ 33.917314] kasan_report+0x8f/0xa0 [ 33.920920] ? refcount_dec_not_one+0x71/0x1d0 [ 33.925570] refcount_dec_not_one+0x71/0x1d0 [ 33.929962] ? refcount_dec_and_test_checked+0x20/0x20 [ 33.935324] ? nbd_config_put+0x5da/0x870 [ 33.939457] refcount_dec_and_mutex_lock+0x1c/0x80 [ 33.944366] nbd_genl_connect+0x11ee/0x1630 [ 33.948667] ? nbd_xmit_timeout+0x730/0x730 [ 33.952968] ? __sanitizer_cov_trace_switch+0x4b/0x80 [ 33.958138] ? validate_nla+0x270/0x820 [ 33.962137] ? nla_parse+0x1b2/0x290 [ 33.965828] genl_family_rcv_msg+0x642/0xc40 [ 33.970215] ? genl_rcv+0x40/0x40 [ 33.973643] ? genl_rcv_msg+0x12f/0x160 [ 33.977599] ? mutex_trylock+0x1a0/0x1a0 [ 33.981640] ? __radix_tree_lookup+0x216/0x370 [ 33.986208] genl_rcv_msg+0xbf/0x160 [ 33.989907] netlink_rcv_skb+0x160/0x440 [ 33.993947] ? genl_family_rcv_msg+0xc40/0xc40 [ 33.998506] ? netlink_ack+0xae0/0xae0 [ 34.002371] ? genl_rcv+0x15/0x40 [ 34.005803] genl_rcv+0x24/0x40 [ 34.009059] netlink_unicast+0x4d5/0x690 [ 34.013096] ? netlink_sendskb+0x110/0x110 [ 34.017307] ? _copy_from_iter_full+0x229/0x7c0 [ 34.021963] ? __phys_addr_symbol+0x2c/0x70 [ 34.026279] ? __check_object_size+0x17b/0x3e0 [ 34.030848] netlink_sendmsg+0x6c3/0xc50 [ 34.034885] ? aa_af_perm+0x230/0x230 [ 34.038662] ? nlmsg_notify+0x1f0/0x1f0 [ 34.042638] ? kernel_recvmsg+0x220/0x220 [ 34.046765] ? nlmsg_notify+0x1f0/0x1f0 [ 34.050718] sock_sendmsg+0xc3/0x120 [ 34.054412] ___sys_sendmsg+0x7bb/0x8e0 [ 34.058370] ? copy_msghdr_from_user+0x440/0x440 [ 34.063107] ? netlink_dump+0xc10/0xc10 [ 34.067065] ? nlmsg_notify+0x1f0/0x1f0 [ 34.071020] ? security_socket_recvmsg+0x8f/0xc0 [ 34.075754] ? __sys_recvfrom+0x2cd/0x3a0 [ 34.079877] ? __ia32_sys_send+0x100/0x100 [ 34.084104] ? __fdget+0x1a0/0x230 [ 34.087624] __x64_sys_sendmsg+0x132/0x220 [ 34.091835] ? __sys_sendmsg+0x1b0/0x1b0 [ 34.095876] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 34.101307] ? trace_hardirqs_off_caller+0x6e/0x210 [ 34.106300] ? do_syscall_64+0x21/0x620 [ 34.110253] do_syscall_64+0xf9/0x620 [ 34.114034] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.119200] RIP: 0033:0x7f5ff75fab69 [ 34.122890] 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.141769] RSP: 002b:00007ffff70317c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 34.149455] RAX: ffffffffffffffda RBX: 00007ffff7031810 RCX: 00007f5ff75fab69 [ 34.156701] RDX: 0000000000000000 RSI: 0000000020000380 RDI: 0000000000000003 [ 34.163948] RBP: 0000000000000000 R08: 0000000000000000 R09: 00007f5ff766eec0 [ 34.171196] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffff7031800 [ 34.178443] R13: 00000000000081af R14: 00007ffff70317fc R15: 431bde82d7b634db [ 34.185880] Kernel Offset: disabled [ 34.189488] Rebooting in 86400 seconds..