Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.25' (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 syzkaller login: [ 34.511014] ================================================================== [ 34.518504] BUG: KASAN: use-after-free in ex_handler_refcount+0x18f/0x1c0 [ 34.525411] Write of size 4 at addr ffff888096f925d8 by task systemd-udevd/8354 [ 34.532847] [ 34.534460] CPU: 0 PID: 8354 Comm: systemd-udevd Not tainted 4.19.211-syzkaller #0 [ 34.542159] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 [ 34.551507] Call Trace: [ 34.554081] dump_stack+0x1fc/0x2ef [ 34.557692] print_address_description.cold+0x54/0x219 [ 34.562950] kasan_report_error.cold+0x8a/0x1b9 [ 34.567599] ? ex_handler_refcount+0x18f/0x1c0 [ 34.572162] __asan_report_store4_noabort+0x88/0x90 [ 34.577160] ? notify_die+0x21/0x170 [ 34.580863] ? ex_handler_refcount+0x18f/0x1c0 [ 34.585440] ex_handler_refcount+0x18f/0x1c0 [ 34.589834] ? ex_handler_clear_fs+0xb0/0xb0 [ 34.594234] fixup_exception+0x8a/0xd0 [ 34.598107] do_trap+0x61/0x250 [ 34.601372] ? do_error_trap+0x212/0x310 [ 34.605539] do_error_trap+0x15d/0x310 [ 34.609412] ? math_error+0x310/0x310 [ 34.613199] ? __noinstr_text_end+0x243b/0x7813 [ 34.617866] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 34.622736] invalid_op+0x14/0x20 [ 34.626187] RIP: 0010:__noinstr_text_end+0x243b/0x7813 [ 34.631457] Code: 0f 0b 48 8d 4b 50 0f 0b 48 8d 4b 08 0f 0b 48 8d 4d 08 0f 0b 48 8d 8d 08 02 00 00 0f 0b 48 8d 0b 0f 0b 48 8d 0b 0f 0b 48 8d 0b <0f> 0b 48 8d 4d 00 0f 0b 49 8d 0c 24 0f 0b 48 8d 8b c0 00 00 00 0f [ 34.650344] RSP: 0018:ffff88809475fcd8 EFLAGS: 00010296 [ 34.655692] RAX: 0000000000000000 RBX: ffff888096f925d8 RCX: ffff888096f925d8 [ 34.663032] RDX: 0000000000000004 RSI: 0000000000000004 RDI: 0000000000000001 [ 34.670280] RBP: 0000000000000000 R08: 0000000000000000 R09: fffffbfff14b7985 [ 34.677527] R10: ffffffff8a5bcc2b R11: 0000000000000000 R12: ffffffff8a5bcc20 [ 34.684775] R13: 0000000000000000 R14: 1ffff1101163ce4d R15: dffffc0000000000 [ 34.692044] ? refcount_dec_and_mutex_lock+0x4a/0x80 [ 34.697216] nbd_release+0x108/0x170 [ 34.700912] ? nbd_queue_rq+0xe60/0xe60 [ 34.704866] __blkdev_put+0x636/0x870 [ 34.708647] ? fsync_bdev+0xc0/0xc0 [ 34.712254] ? locks_remove_file+0x2cd/0x450 [ 34.716641] ? blkdev_put+0x85/0x520 [ 34.720336] ? blkdev_put+0x520/0x520 [ 34.724123] blkdev_close+0x86/0xb0 [ 34.727738] __fput+0x2ce/0x890 [ 34.731013] task_work_run+0x148/0x1c0 [ 34.734899] exit_to_usermode_loop+0x251/0x2a0 [ 34.739474] do_syscall_64+0x538/0x620 [ 34.743343] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.748515] RIP: 0033:0x7fc6b6e8f270 [ 34.752278] 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 [ 34.771171] RSP: 002b:00007ffc190243f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 34.778858] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007fc6b6e8f270 [ 34.786119] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 34.793368] RBP: 00007fc6b7d49710 R08: 0000000000000045 R09: 0000000000000018 [ 34.800615] R10: 000055f4c111fc98 R11: 0000000000000246 R12: 0000000000000000 [ 34.807862] R13: 000055f4c111fd20 R14: 0000000000000003 R15: 000000000000000e [ 34.815116] [ 34.816728] Allocated by task 8314: [ 34.820339] kmem_cache_alloc_trace+0x12f/0x380 [ 34.824996] nbd_dev_add+0x44/0x890 [ 34.828600] nbd_genl_connect+0x4cc/0x1630 [ 34.832814] genl_family_rcv_msg+0x642/0xc40 [ 34.837220] genl_rcv_msg+0xbf/0x160 [ 34.840915] netlink_rcv_skb+0x160/0x440 [ 34.844955] genl_rcv+0x24/0x40 [ 34.848214] netlink_unicast+0x4d5/0x690 [ 34.852251] netlink_sendmsg+0x6c3/0xc50 [ 34.856293] sock_sendmsg+0xc3/0x120 [ 34.859986] ___sys_sendmsg+0x7bb/0x8e0 [ 34.863939] __x64_sys_sendmsg+0x132/0x220 [ 34.868151] do_syscall_64+0xf9/0x620 [ 34.871957] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.877120] [ 34.878726] Freed by task 8337: [ 34.881987] kfree+0xcc/0x210 [ 34.885077] nbd_put.part.0+0xfe/0x140 [ 34.888943] nbd_genl_connect+0x120e/0x1630 [ 34.893242] genl_family_rcv_msg+0x642/0xc40 [ 34.897642] genl_rcv_msg+0xbf/0x160 [ 34.901335] netlink_rcv_skb+0x160/0x440 [ 34.905374] genl_rcv+0x24/0x40 [ 34.908717] netlink_unicast+0x4d5/0x690 [ 34.912755] netlink_sendmsg+0x6c3/0xc50 [ 34.916795] sock_sendmsg+0xc3/0x120 [ 34.920503] ___sys_sendmsg+0x7bb/0x8e0 [ 34.924464] __x64_sys_sendmsg+0x132/0x220 [ 34.928679] do_syscall_64+0xf9/0x620 [ 34.932458] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.937620] [ 34.939240] The buggy address belongs to the object at ffff888096f92500 [ 34.939240] which belongs to the cache kmalloc-512 of size 512 [ 34.951875] The buggy address is located 216 bytes inside of [ 34.951875] 512-byte region [ffff888096f92500, ffff888096f92700) [ 34.963731] The buggy address belongs to the page: [ 34.968729] page:ffffea00025be480 count:1 mapcount:0 mapping:ffff88813bff0940 index:0x0 [ 34.976847] flags: 0xfff00000000100(slab) [ 34.980976] raw: 00fff00000000100 ffffea00028c8688 ffffea0002ce9008 ffff88813bff0940 [ 34.988837] raw: 0000000000000000 ffff888096f92000 0000000100000006 0000000000000000 [ 34.996696] page dumped because: kasan: bad access detected [ 35.002380] [ 35.003983] Memory state around the buggy address: [ 35.008900] ffff888096f92480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 35.016236] ffff888096f92500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.023575] >ffff888096f92580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.030908] ^ [ 35.037117] ffff888096f92600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.044456] ffff888096f92680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.051800] ================================================================== executing program [ 35.059139] Disabling lock debugging due to kernel taint [ 35.065499] Kernel panic - not syncing: panic_on_warn set ... [ 35.065499] [ 35.072862] CPU: 0 PID: 8354 Comm: systemd-udevd Tainted: G B 4.19.211-syzkaller #0 [ 35.081976] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 [ 35.091336] Call Trace: [ 35.093927] dump_stack+0x1fc/0x2ef [ 35.097552] panic+0x26a/0x50e [ 35.100767] ? __warn_printk+0xf3/0xf3 [ 35.104636] ? preempt_schedule_common+0x45/0xc0 [ 35.109372] ? ___preempt_schedule+0x16/0x18 [ 35.113762] ? trace_hardirqs_on+0x55/0x210 [ 35.118065] kasan_end_report+0x43/0x49 [ 35.122016] kasan_report_error.cold+0xa7/0x1b9 [ 35.126662] ? ex_handler_refcount+0x18f/0x1c0 [ 35.131221] __asan_report_store4_noabort+0x88/0x90 [ 35.136217] ? notify_die+0x21/0x170 [ 35.139904] ? ex_handler_refcount+0x18f/0x1c0 [ 35.144462] ex_handler_refcount+0x18f/0x1c0 [ 35.148845] ? ex_handler_clear_fs+0xb0/0xb0 [ 35.153228] fixup_exception+0x8a/0xd0 [ 35.157097] do_trap+0x61/0x250 [ 35.160358] ? do_error_trap+0x212/0x310 [ 35.164396] do_error_trap+0x15d/0x310 [ 35.168263] ? math_error+0x310/0x310 [ 35.172044] ? __noinstr_text_end+0x243b/0x7813 [ 35.176691] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 35.181549] invalid_op+0x14/0x20 [ 35.184983] RIP: 0010:__noinstr_text_end+0x243b/0x7813 [ 35.190242] Code: 0f 0b 48 8d 4b 50 0f 0b 48 8d 4b 08 0f 0b 48 8d 4d 08 0f 0b 48 8d 8d 08 02 00 00 0f 0b 48 8d 0b 0f 0b 48 8d 0b 0f 0b 48 8d 0b <0f> 0b 48 8d 4d 00 0f 0b 49 8d 0c 24 0f 0b 48 8d 8b c0 00 00 00 0f [ 35.209120] RSP: 0018:ffff88809475fcd8 EFLAGS: 00010296 [ 35.214549] RAX: 0000000000000000 RBX: ffff888096f925d8 RCX: ffff888096f925d8 [ 35.221799] RDX: 0000000000000004 RSI: 0000000000000004 RDI: 0000000000000001 [ 35.229047] RBP: 0000000000000000 R08: 0000000000000000 R09: fffffbfff14b7985 [ 35.236554] R10: ffffffff8a5bcc2b R11: 0000000000000000 R12: ffffffff8a5bcc20 [ 35.243805] R13: 0000000000000000 R14: 1ffff1101163ce4d R15: dffffc0000000000 [ 35.251070] ? refcount_dec_and_mutex_lock+0x4a/0x80 [ 35.256152] nbd_release+0x108/0x170 [ 35.259844] ? nbd_queue_rq+0xe60/0xe60 [ 35.263806] __blkdev_put+0x636/0x870 [ 35.267672] ? fsync_bdev+0xc0/0xc0 [ 35.271305] ? locks_remove_file+0x2cd/0x450 [ 35.275690] ? blkdev_put+0x85/0x520 [ 35.279385] ? blkdev_put+0x520/0x520 [ 35.283179] blkdev_close+0x86/0xb0 [ 35.286788] __fput+0x2ce/0x890 [ 35.290050] task_work_run+0x148/0x1c0 [ 35.293916] exit_to_usermode_loop+0x251/0x2a0 [ 35.298483] do_syscall_64+0x538/0x620 [ 35.302350] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.307514] RIP: 0033:0x7fc6b6e8f270 [ 35.311210] 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.330088] RSP: 002b:00007ffc190243f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 35.337787] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007fc6b6e8f270 [ 35.345034] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 35.352280] RBP: 00007fc6b7d49710 R08: 0000000000000045 R09: 0000000000000018 [ 35.359524] R10: 000055f4c111fc98 R11: 0000000000000246 R12: 0000000000000000 [ 35.366780] R13: 000055f4c111fd20 R14: 0000000000000003 R15: 000000000000000e [ 35.374259] Kernel Offset: disabled [ 35.377869] Rebooting in 86400 seconds..