[ 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... 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.1.85' (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 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: [ 35.804174] ================================================================== [ 35.811709] BUG: KASAN: use-after-free in refcount_dec_not_one+0x71/0x1d0 [ 35.818649] Read of size 4 at addr ffff8880a93ff398 by task systemd-udevd/8656 [ 35.825999] [ 35.827614] CPU: 1 PID: 8656 Comm: systemd-udevd Not tainted 4.19.211-syzkaller #0 [ 35.835298] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 [ 35.844635] Call Trace: [ 35.847207] dump_stack+0x1fc/0x2ef [ 35.850822] print_address_description.cold+0x54/0x219 [ 35.856085] kasan_report_error.cold+0x8a/0x1b9 [ 35.860740] ? refcount_dec_not_one+0x71/0x1d0 [ 35.865399] kasan_report+0x8f/0xa0 [ 35.869027] ? refcount_dec_not_one+0x71/0x1d0 [ 35.873601] refcount_dec_not_one+0x71/0x1d0 [ 35.878077] ? refcount_dec_and_test_checked+0x20/0x20 [ 35.883350] ? nbd_config_put+0x5da/0x870 [ 35.887481] refcount_dec_and_mutex_lock+0x1c/0x80 [ 35.892405] nbd_release+0x108/0x170 [ 35.896112] ? nbd_queue_rq+0xe60/0xe60 [ 35.900068] __blkdev_put+0x636/0x870 [ 35.903864] ? fsync_bdev+0xc0/0xc0 [ 35.907497] ? locks_remove_file+0x2cd/0x450 [ 35.911904] ? blkdev_put+0x85/0x520 [ 35.915600] ? blkdev_put+0x520/0x520 [ 35.920006] blkdev_close+0x86/0xb0 [ 35.923631] __fput+0x2ce/0x890 [ 35.926899] task_work_run+0x148/0x1c0 [ 35.930777] exit_to_usermode_loop+0x251/0x2a0 [ 35.935346] do_syscall_64+0x538/0x620 [ 35.939236] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.944410] RIP: 0033:0x7fd95c8f4270 [ 35.948105] Code: 73 01 c3 48 8b 0d 38 7d 20 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 59 c1 20 00 00 75 10 b8 03 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ee fb ff ff 48 89 04 24 [ 35.967003] RSP: 002b:00007ffc9e42cc88 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 35.974703] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007fd95c8f4270 [ 35.981963] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 35.989308] RBP: 00007fd95d7ae710 R08: 00005617980fcce0 R09: 0000000000000008 [ 35.996630] R10: 00005617980fac98 R11: 0000000000000246 R12: 0000000000000000 [ 36.003989] R13: 00005617980f9880 R14: 0000000000000003 R15: 000000000000000e [ 36.011252] [ 36.012863] Allocated by task 8659: [ 36.016491] kmem_cache_alloc_trace+0x12f/0x380 [ 36.021150] nbd_dev_add+0x44/0x890 [ 36.024759] nbd_genl_connect+0x4cc/0x1630 [ 36.028994] genl_family_rcv_msg+0x642/0xc40 [ 36.033404] genl_rcv_msg+0xbf/0x160 [ 36.037101] netlink_rcv_skb+0x160/0x440 [ 36.041142] genl_rcv+0x24/0x40 [ 36.044426] netlink_unicast+0x4d5/0x690 [ 36.048466] netlink_sendmsg+0x6c3/0xc50 [ 36.052512] sock_sendmsg+0xc3/0x120 [ 36.056214] ___sys_sendmsg+0x7bb/0x8e0 [ 36.060170] __x64_sys_sendmsg+0x132/0x220 [ 36.064536] do_syscall_64+0xf9/0x620 [ 36.068320] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.073487] [ 36.075111] Freed by task 8656: [ 36.078381] kfree+0xcc/0x210 [ 36.081538] nbd_put.part.0+0xfe/0x140 [ 36.085413] nbd_config_put+0x6a0/0x870 [ 36.089393] nbd_release+0xf4/0x170 [ 36.093091] __blkdev_put+0x636/0x870 [ 36.096873] blkdev_close+0x86/0xb0 [ 36.100483] __fput+0x2ce/0x890 [ 36.103999] task_work_run+0x148/0x1c0 [ 36.107964] exit_to_usermode_loop+0x251/0x2a0 [ 36.112531] do_syscall_64+0x538/0x620 [ 36.116404] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.121572] [ 36.123191] The buggy address belongs to the object at ffff8880a93ff2c0 [ 36.123191] which belongs to the cache kmalloc-512 of size 512 [ 36.136031] The buggy address is located 216 bytes inside of [ 36.136031] 512-byte region [ffff8880a93ff2c0, ffff8880a93ff4c0) [ 36.147909] The buggy address belongs to the page: [ 36.152832] page:ffffea0002a4ffc0 count:1 mapcount:0 mapping:ffff88813bff0940 index:0xffff8880a93ff040 [ 36.162262] flags: 0xfff00000000100(slab) [ 36.166396] raw: 00fff00000000100 ffffea00026f0308 ffffea0002aaff08 ffff88813bff0940 [ 36.174267] raw: ffff8880a93ff040 ffff8880a93ff040 0000000100000002 0000000000000000 [ 36.182132] page dumped because: kasan: bad access detected [ 36.187834] [ 36.189443] Memory state around the buggy address: [ 36.194356] ffff8880a93ff280: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 36.201703] ffff8880a93ff300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.209051] >ffff8880a93ff380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.216476] ^ [ 36.220609] ffff8880a93ff400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.228160] ffff8880a93ff480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 36.235509] ================================================================== [ 36.242874] Disabling lock debugging due to kernel taint [ 36.250597] Kernel panic - not syncing: panic_on_warn set ... [ 36.250597] [ 36.257981] CPU: 1 PID: 8656 Comm: systemd-udevd Tainted: G B 4.19.211-syzkaller #0 [ 36.267071] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 [ 36.276414] Call Trace: [ 36.279001] dump_stack+0x1fc/0x2ef [ 36.282649] panic+0x26a/0x50e [ 36.285958] ? __warn_printk+0xf3/0xf3 [ 36.289862] ? preempt_schedule_common+0x45/0xc0 [ 36.294601] ? ___preempt_schedule+0x16/0x18 [ 36.298995] ? trace_hardirqs_on+0x55/0x210 [ 36.303299] kasan_end_report+0x43/0x49 [ 36.307258] kasan_report_error.cold+0xa7/0x1b9 [ 36.312015] ? refcount_dec_not_one+0x71/0x1d0 [ 36.316574] kasan_report+0x8f/0xa0 [ 36.320182] ? refcount_dec_not_one+0x71/0x1d0 [ 36.324744] refcount_dec_not_one+0x71/0x1d0 [ 36.329132] ? refcount_dec_and_test_checked+0x20/0x20 [ 36.334403] ? nbd_config_put+0x5da/0x870 [ 36.338533] refcount_dec_and_mutex_lock+0x1c/0x80 [ 36.343443] nbd_release+0x108/0x170 [ 36.347233] ? nbd_queue_rq+0xe60/0xe60 [ 36.351183] __blkdev_put+0x636/0x870 [ 36.354967] ? fsync_bdev+0xc0/0xc0 [ 36.358577] ? locks_remove_file+0x2cd/0x450 [ 36.362964] ? blkdev_put+0x85/0x520 [ 36.366665] ? blkdev_put+0x520/0x520 [ 36.370440] blkdev_close+0x86/0xb0 [ 36.374060] __fput+0x2ce/0x890 [ 36.377325] task_work_run+0x148/0x1c0 [ 36.381193] exit_to_usermode_loop+0x251/0x2a0 [ 36.385756] do_syscall_64+0x538/0x620 [ 36.389630] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.394811] RIP: 0033:0x7fd95c8f4270 [ 36.398530] Code: 73 01 c3 48 8b 0d 38 7d 20 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 59 c1 20 00 00 75 10 b8 03 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ee fb ff ff 48 89 04 24 [ 36.417424] RSP: 002b:00007ffc9e42cc88 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 36.425289] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007fd95c8f4270 [ 36.432537] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 36.439793] RBP: 00007fd95d7ae710 R08: 00005617980fcce0 R09: 0000000000000008 [ 36.447048] R10: 00005617980fac98 R11: 0000000000000246 R12: 0000000000000000 [ 36.454295] R13: 00005617980f9880 R14: 0000000000000003 R15: 000000000000000e [ 36.461722] Kernel Offset: disabled [ 36.465348] Rebooting in 86400 seconds..