Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.50' (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 syzkaller login: [ 35.055937] ================================================================== [ 35.063479] BUG: KASAN: use-after-free in ex_handler_refcount+0x18f/0x1c0 [ 35.070547] Write of size 4 at addr ffff88809d6f0858 by task systemd-udevd/8467 [ 35.077975] [ 35.079590] CPU: 1 PID: 8467 Comm: systemd-udevd Not tainted 4.19.190-syzkaller #0 [ 35.087276] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.096654] Call Trace: [ 35.099244] dump_stack+0x1fc/0x2ef [ 35.102860] print_address_description.cold+0x54/0x219 [ 35.108135] kasan_report_error.cold+0x8a/0x1b9 [ 35.112945] ? ex_handler_refcount+0x18f/0x1c0 [ 35.117619] __asan_report_store4_noabort+0x88/0x90 [ 35.122718] ? ex_handler_refcount+0x18f/0x1c0 [ 35.127336] ex_handler_refcount+0x18f/0x1c0 [ 35.131730] ? ex_handler_clear_fs+0xb0/0xb0 [ 35.136210] fixup_exception+0x8a/0xd0 [ 35.140084] do_trap+0x61/0x250 [ 35.143349] do_error_trap+0x15d/0x310 [ 35.147224] ? math_error+0x310/0x310 [ 35.151020] ? __noinstr_text_end+0x2446/0x77e7 [ 35.155673] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 35.160502] invalid_op+0x14/0x20 [ 35.163943] RIP: 0010:__noinstr_text_end+0x2446/0x77e7 [ 35.169314] 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.188446] RSP: 0018:ffff8880ab3b7cd8 EFLAGS: 00010296 [ 35.193843] RAX: 0000000000000000 RBX: ffff88809d6f0858 RCX: ffff88809d6f0858 [ 35.201191] RDX: 0000000000000004 RSI: 0000000000000004 RDI: 0000000000000001 [ 35.208453] RBP: 0000000000000000 R08: 0000000000000000 R09: fffffbfff14b7829 [ 35.215715] R10: ffffffff8a5bc14b R11: 0000000000000000 R12: ffffffff8a5bc140 [ 35.223196] R13: 0000000000000000 R14: 1ffff11011553d55 R15: dffffc0000000000 [ 35.230591] ? refcount_dec_and_mutex_lock+0x4a/0x80 [ 35.235754] nbd_release+0x108/0x170 [ 35.239457] ? nbd_queue_rq+0xe60/0xe60 [ 35.243414] __blkdev_put+0x636/0x870 [ 35.247208] ? fsync_bdev+0xc0/0xc0 [ 35.250820] ? locks_remove_file+0x2cd/0x450 [ 35.255302] ? blkdev_put+0x85/0x520 [ 35.259029] ? blkdev_put+0x520/0x520 [ 35.262816] blkdev_close+0x86/0xb0 [ 35.266569] __fput+0x2ce/0x890 [ 35.269903] task_work_run+0x148/0x1c0 [ 35.273785] exit_to_usermode_loop+0x251/0x2a0 [ 35.278452] do_syscall_64+0x538/0x620 [ 35.282329] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.287502] RIP: 0033:0x7fb12886a270 [ 35.291195] 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.310078] RSP: 002b:00007ffe05700618 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 35.317842] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007fb12886a270 [ 35.325097] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 35.332465] RBP: 00007fb129724710 R08: 0000000000000045 R09: 0000000000000018 [ 35.340260] R10: 0000560fd92fdf68 R11: 0000000000000246 R12: 0000000000000000 [ 35.347563] R13: 0000560fd92fddd0 R14: 0000000000000003 R15: 000000000000000e [ 35.354912] [ 35.356524] Allocated by task 8427: [ 35.360139] kmem_cache_alloc_trace+0x12f/0x380 [ 35.364817] nbd_dev_add+0x44/0x890 [ 35.368454] nbd_genl_connect+0x4cc/0x1630 [ 35.372671] genl_family_rcv_msg+0x642/0xc40 [ 35.377108] genl_rcv_msg+0xbf/0x160 [ 35.380820] netlink_rcv_skb+0x160/0x440 [ 35.384895] genl_rcv+0x24/0x40 [ 35.388182] netlink_unicast+0x4d5/0x690 [ 35.392226] netlink_sendmsg+0x6bb/0xc40 [ 35.396270] sock_sendmsg+0xc3/0x120 [ 35.399973] ___sys_sendmsg+0x7bb/0x8e0 [ 35.403926] __x64_sys_sendmsg+0x132/0x220 [ 35.408167] do_syscall_64+0xf9/0x620 [ 35.411946] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.417114] [ 35.418720] Freed by task 8438: [ 35.421984] kfree+0xcc/0x210 [ 35.425082] nbd_put.part.0+0xfe/0x140 [ 35.429038] nbd_genl_connect+0x120e/0x1630 [ 35.433339] genl_family_rcv_msg+0x642/0xc40 [ 35.437730] genl_rcv_msg+0xbf/0x160 [ 35.441428] netlink_rcv_skb+0x160/0x440 [ 35.445468] genl_rcv+0x24/0x40 [ 35.448763] netlink_unicast+0x4d5/0x690 [ 35.452812] netlink_sendmsg+0x6bb/0xc40 [ 35.456920] sock_sendmsg+0xc3/0x120 [ 35.460620] ___sys_sendmsg+0x7bb/0x8e0 [ 35.464575] __x64_sys_sendmsg+0x132/0x220 [ 35.468792] do_syscall_64+0xf9/0x620 [ 35.472576] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.477766] [ 35.479387] The buggy address belongs to the object at ffff88809d6f0780 [ 35.479387] which belongs to the cache kmalloc-512 of size 512 [ 35.492051] The buggy address is located 216 bytes inside of [ 35.492051] 512-byte region [ffff88809d6f0780, ffff88809d6f0980) [ 35.503929] The buggy address belongs to the page: [ 35.508856] page:ffffea000275bc00 count:1 mapcount:0 mapping:ffff88813bff0940 index:0xffff88809d6f0a00 [ 35.518301] flags: 0xfff00000000100(slab) [ 35.522444] raw: 00fff00000000100 ffffea00027ebb88 ffffea0002a9ad88 ffff88813bff0940 [ 35.530317] raw: ffff88809d6f0a00 ffff88809d6f0000 0000000100000004 0000000000000000 [ 35.538190] page dumped because: kasan: bad access detected [ 35.543891] [ 35.545620] Memory state around the buggy address: [ 35.550554] ffff88809d6f0700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 35.558007] ffff88809d6f0780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.565452] >ffff88809d6f0800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.572789] ^ [ 35.578998] ffff88809d6f0880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.586338] ffff88809d6f0900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.593794] ================================================================== [ 35.601350] Disabling lock debugging due to kernel taint [ 35.610039] Kernel panic - not syncing: panic_on_warn set ... [ 35.610039] [ 35.617429] CPU: 0 PID: 8467 Comm: systemd-udevd Tainted: G B 4.19.190-syzkaller #0 [ 35.626518] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.635865] Call Trace: [ 35.638450] dump_stack+0x1fc/0x2ef [ 35.642061] panic+0x26a/0x50e [ 35.645411] ? __warn_printk+0xf3/0xf3 [ 35.649486] ? preempt_schedule_common+0x45/0xc0 [ 35.654219] ? ___preempt_schedule+0x16/0x18 [ 35.658608] ? trace_hardirqs_on+0x55/0x210 [ 35.662915] kasan_end_report+0x43/0x49 [ 35.666870] kasan_report_error.cold+0xa7/0x1b9 [ 35.672312] ? ex_handler_refcount+0x18f/0x1c0 [ 35.676878] __asan_report_store4_noabort+0x88/0x90 [ 35.681941] ? ex_handler_refcount+0x18f/0x1c0 [ 35.686516] ex_handler_refcount+0x18f/0x1c0 [ 35.690911] ? ex_handler_clear_fs+0xb0/0xb0 [ 35.695299] fixup_exception+0x8a/0xd0 [ 35.699188] do_trap+0x61/0x250 [ 35.702465] do_error_trap+0x15d/0x310 [ 35.706339] ? math_error+0x310/0x310 [ 35.710130] ? __noinstr_text_end+0x2446/0x77e7 [ 35.714785] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 35.719677] invalid_op+0x14/0x20 [ 35.723135] RIP: 0010:__noinstr_text_end+0x2446/0x77e7 [ 35.728505] 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.747410] RSP: 0018:ffff8880ab3b7cd8 EFLAGS: 00010296 [ 35.752761] RAX: 0000000000000000 RBX: ffff88809d6f0858 RCX: ffff88809d6f0858 [ 35.760023] RDX: 0000000000000004 RSI: 0000000000000004 RDI: 0000000000000001 [ 35.767290] RBP: 0000000000000000 R08: 0000000000000000 R09: fffffbfff14b7829 [ 35.774543] R10: ffffffff8a5bc14b R11: 0000000000000000 R12: ffffffff8a5bc140 [ 35.781793] R13: 0000000000000000 R14: 1ffff11011553d55 R15: dffffc0000000000 [ 35.789082] ? refcount_dec_and_mutex_lock+0x4a/0x80 [ 35.794169] nbd_release+0x108/0x170 [ 35.797905] ? nbd_queue_rq+0xe60/0xe60 [ 35.801949] __blkdev_put+0x636/0x870 [ 35.805735] ? fsync_bdev+0xc0/0xc0 [ 35.809343] ? locks_remove_file+0x2cd/0x450 [ 35.813740] ? blkdev_put+0x85/0x520 [ 35.817449] ? blkdev_put+0x520/0x520 [ 35.821238] blkdev_close+0x86/0xb0 [ 35.824845] __fput+0x2ce/0x890 [ 35.828133] task_work_run+0x148/0x1c0 [ 35.832003] exit_to_usermode_loop+0x251/0x2a0 [ 35.836573] do_syscall_64+0x538/0x620 [ 35.840440] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.845620] RIP: 0033:0x7fb12886a270 [ 35.849318] 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.868195] RSP: 002b:00007ffe05700618 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 35.875966] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007fb12886a270 [ 35.883222] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 35.890485] RBP: 00007fb129724710 R08: 0000000000000045 R09: 0000000000000018 [ 35.897751] R10: 0000560fd92fdf68 R11: 0000000000000246 R12: 0000000000000000 [ 35.905000] R13: 0000560fd92fddd0 R14: 0000000000000003 R15: 000000000000000e [ 35.913258] Kernel Offset: disabled [ 35.916877] Rebooting in 86400 seconds..