Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.180' (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 syzkaller login: [ 29.415152] ================================================================== [ 29.422626] BUG: KASAN: use-after-free in ex_handler_refcount+0x164/0x1a0 [ 29.429527] Write of size 4 at addr ffff8880b4a35b98 by task systemd-udevd/8180 [ 29.436963] [ 29.438571] CPU: 0 PID: 8180 Comm: systemd-udevd Not tainted 4.14.307-syzkaller #0 [ 29.446267] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023 [ 29.455593] Call Trace: [ 29.458158] dump_stack+0x1b2/0x281 [ 29.461780] print_address_description.cold+0x54/0x1d3 [ 29.467030] kasan_report_error.cold+0x8a/0x191 [ 29.471674] ? ex_handler_refcount+0x164/0x1a0 [ 29.476242] __asan_report_store4_noabort+0x68/0x70 [ 29.481236] ? ex_handler_refcount+0x164/0x1a0 [ 29.485793] ex_handler_refcount+0x164/0x1a0 [ 29.490176] ? ex_handler_clear_fs+0xb0/0xb0 [ 29.494562] fixup_exception+0x8a/0xd0 [ 29.498427] do_trap+0x61/0x250 [ 29.501683] ? do_error_trap+0x1d0/0x2d0 [ 29.505809] do_error_trap+0x132/0x2d0 [ 29.509679] ? math_error+0x2d0/0x2d0 [ 29.513454] ? flags_string.cold+0x1b3e/0x6c57 [ 29.518018] ? __mutex_lock+0x360/0x1310 [ 29.522060] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 29.526880] invalid_op+0x1b/0x40 [ 29.530308] RIP: 0010:flags_string.cold+0x1b3e/0x6c57 [ 29.535468] RSP: 0018:ffff88809534fcd0 EFLAGS: 00010296 [ 29.540812] RAX: 0000000000000000 RBX: ffff8880b4a35b98 RCX: ffff8880b4a35b98 [ 29.548065] RDX: 0000000000000004 RSI: 0000000000000003 RDI: 0000000000000001 [ 29.555312] RBP: ffffffff89512060 R08: 0000000000000000 R09: 0000000000000002 [ 29.562668] R10: 0000000000000000 R11: ffff8880b05f44c0 R12: 0000000000000000 [ 29.569926] R13: ffff88808a4a0204 R14: ffffed101149408e R15: dffffc0000000000 [ 29.577228] nbd_release+0xf3/0x150 [ 29.580838] ? nbd_ioctl+0xad0/0xad0 [ 29.584528] __blkdev_put+0x5aa/0x800 [ 29.588310] ? revalidate_disk+0x1f0/0x1f0 [ 29.592524] ? locks_remove_file+0x2cd/0x420 [ 29.596995] ? blkdev_put+0x75/0x4c0 [ 29.600682] ? blkdev_put+0x4c0/0x4c0 [ 29.604455] blkdev_close+0x86/0xb0 [ 29.608056] __fput+0x25f/0x7a0 [ 29.611328] task_work_run+0x11f/0x190 [ 29.615206] exit_to_usermode_loop+0x1ad/0x200 [ 29.619761] do_syscall_64+0x4a3/0x640 [ 29.623623] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 29.628787] RIP: 0033:0x7fda79ffa270 [ 29.632470] RSP: 002b:00007fff8fc84608 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 29.640156] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007fda79ffa270 [ 29.647402] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 29.654648] RBP: 00007fda7aeb4710 R08: 0000000000000045 R09: 0000000000000018 [ 29.661892] R10: 000055675dca9c48 R11: 0000000000000246 R12: 0000000000000000 [ 29.669141] R13: 000055675dca9cd0 R14: 0000000000000003 R15: 000000000000000e [ 29.676394] [ 29.677999] Allocated by task 8144: [ 29.681603] kasan_kmalloc+0xeb/0x160 [ 29.685380] kmem_cache_alloc_trace+0x131/0x3d0 [ 29.690027] nbd_dev_add+0x7c/0x800 [ 29.693632] nbd_genl_connect+0x3a4/0x13e0 [ 29.697841] genl_family_rcv_msg+0x572/0xb20 [ 29.702222] genl_rcv_msg+0xaf/0x140 [ 29.705933] netlink_rcv_skb+0x125/0x390 [ 29.709984] genl_rcv+0x24/0x40 [ 29.713236] netlink_unicast+0x437/0x610 [ 29.717292] netlink_sendmsg+0x651/0xbc0 [ 29.721341] sock_sendmsg+0xb5/0x100 [ 29.725025] ___sys_sendmsg+0x6c8/0x800 [ 29.728982] __sys_sendmsg+0xa3/0x120 [ 29.732790] SyS_sendmsg+0x27/0x40 [ 29.736312] do_syscall_64+0x1d5/0x640 [ 29.740226] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 29.745404] [ 29.747008] Freed by task 8163: [ 29.750268] kasan_slab_free+0xc3/0x1a0 [ 29.754227] kfree+0xc9/0x250 [ 29.757308] nbd_put.part.0+0x100/0x140 [ 29.761267] nbd_genl_connect+0xcf6/0x13e0 [ 29.765498] genl_family_rcv_msg+0x572/0xb20 [ 29.769888] genl_rcv_msg+0xaf/0x140 [ 29.773579] netlink_rcv_skb+0x125/0x390 [ 29.777616] genl_rcv+0x24/0x40 [ 29.780880] netlink_unicast+0x437/0x610 [ 29.784920] netlink_sendmsg+0x651/0xbc0 [ 29.788955] sock_sendmsg+0xb5/0x100 [ 29.792644] ___sys_sendmsg+0x6c8/0x800 [ 29.796594] __sys_sendmsg+0xa3/0x120 [ 29.800368] SyS_sendmsg+0x27/0x40 [ 29.803887] do_syscall_64+0x1d5/0x640 [ 29.807756] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 29.812916] [ 29.814521] The buggy address belongs to the object at ffff8880b4a35ac0 [ 29.814521] which belongs to the cache kmalloc-512 of size 512 [ 29.827246] The buggy address is located 216 bytes inside of [ 29.827246] 512-byte region [ffff8880b4a35ac0, ffff8880b4a35cc0) [ 29.839097] The buggy address belongs to the page: [ 29.844008] page:ffffea0002d28d40 count:1 mapcount:0 mapping:ffff8880b4a350c0 index:0x0 [ 29.852127] flags: 0xfff00000000100(slab) [ 29.856256] raw: 00fff00000000100 ffff8880b4a350c0 0000000000000000 0000000100000006 [ 29.864207] raw: ffffea0002d25860 ffffea0002d42120 ffff88813fe74940 0000000000000000 [ 29.872067] page dumped because: kasan: bad access detected [ 29.877765] [ 29.879365] Memory state around the buggy address: [ 29.884266] ffff8880b4a35a80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 29.891600] ffff8880b4a35b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.898944] >ffff8880b4a35b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.906278] ^ executing program [ 29.910398] ffff8880b4a35c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.917731] ffff8880b4a35c80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 29.925069] ================================================================== [ 29.932404] Disabling lock debugging due to kernel taint [ 29.944648] Kernel panic - not syncing: KASAN: panic_on_warn set ... [ 29.944648] [ 29.952781] CPU: 1 PID: 8180 Comm: systemd-udevd Tainted: G B 4.14.307-syzkaller #0 [ 29.961689] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023 [ 29.971026] Call Trace: [ 29.973592] dump_stack+0x1b2/0x281 [ 29.977203] panic+0x21d/0x451 [ 29.980371] ? add_taint.cold+0x16/0x16 [ 29.984321] ? ___preempt_schedule+0x16/0x18 [ 29.988703] ? preempt_schedule_common+0x45/0xc0 [ 29.993439] ? ___preempt_schedule+0x16/0x18 [ 29.997830] check_panic_on_warn.cold+0x19/0x35 [ 30.002488] kasan_end_report+0x3a/0x40 [ 30.006621] kasan_report_error.cold+0xa7/0x191 [ 30.011264] ? ex_handler_refcount+0x164/0x1a0 [ 30.015832] __asan_report_store4_noabort+0x68/0x70 [ 30.020819] ? ex_handler_refcount+0x164/0x1a0 [ 30.025371] ex_handler_refcount+0x164/0x1a0 [ 30.029838] ? ex_handler_clear_fs+0xb0/0xb0 [ 30.034226] fixup_exception+0x8a/0xd0 [ 30.038116] do_trap+0x61/0x250 [ 30.041380] ? do_error_trap+0x1d0/0x2d0 [ 30.045419] do_error_trap+0x132/0x2d0 [ 30.049280] ? math_error+0x2d0/0x2d0 [ 30.053052] ? flags_string.cold+0x1b3e/0x6c57 [ 30.058229] ? __mutex_lock+0x360/0x1310 [ 30.062272] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 30.067104] invalid_op+0x1b/0x40 [ 30.070545] RIP: 0010:flags_string.cold+0x1b3e/0x6c57 [ 30.075708] RSP: 0018:ffff88809534fcd0 EFLAGS: 00010296 [ 30.081044] RAX: 0000000000000000 RBX: ffff8880b4a35b98 RCX: ffff8880b4a35b98 [ 30.089418] RDX: 0000000000000004 RSI: 0000000000000003 RDI: 0000000000000001 [ 30.096729] RBP: ffffffff89512060 R08: 0000000000000000 R09: 0000000000000002 [ 30.103973] R10: 0000000000000000 R11: ffff8880b05f44c0 R12: 0000000000000000 [ 30.111216] R13: ffff88808a4a0204 R14: ffffed101149408e R15: dffffc0000000000 [ 30.118471] nbd_release+0xf3/0x150 [ 30.122068] ? nbd_ioctl+0xad0/0xad0 [ 30.125757] __blkdev_put+0x5aa/0x800 [ 30.129536] ? revalidate_disk+0x1f0/0x1f0 [ 30.133742] ? locks_remove_file+0x2cd/0x420 [ 30.138121] ? blkdev_put+0x75/0x4c0 [ 30.141811] ? blkdev_put+0x4c0/0x4c0 [ 30.145585] blkdev_close+0x86/0xb0 [ 30.149196] __fput+0x25f/0x7a0 [ 30.152448] task_work_run+0x11f/0x190 [ 30.156323] exit_to_usermode_loop+0x1ad/0x200 [ 30.160880] do_syscall_64+0x4a3/0x640 [ 30.164749] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 30.169916] RIP: 0033:0x7fda79ffa270 [ 30.173614] RSP: 002b:00007fff8fc84608 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 30.181304] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007fda79ffa270 [ 30.188544] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 30.195783] RBP: 00007fda7aeb4710 R08: 0000000000000045 R09: 0000000000000018 [ 30.203022] R10: 000055675dca9c48 R11: 0000000000000246 R12: 0000000000000000 [ 30.210350] R13: 000055675dca9cd0 R14: 0000000000000003 R15: 000000000000000e [ 30.217692] Kernel Offset: disabled [ 30.221296] Rebooting in 86400 seconds..