[ OK ] Started Getty on tty1. [ OK ] Started Serial Getty on ttyS0. [ OK ] Started Getty on tty2. [ 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.217' (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 syzkaller login: [ 27.539313] ================================================================== [ 27.546801] BUG: KASAN: use-after-free in ex_handler_refcount+0x164/0x1a0 [ 27.553794] Write of size 4 at addr ffff88809d8f8d98 by task systemd-udevd/8146 [ 27.561223] [ 27.562854] CPU: 0 PID: 8146 Comm: systemd-udevd Not tainted 4.14.283-syzkaller #0 [ 27.570539] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.579869] Call Trace: [ 27.582435] dump_stack+0x1b2/0x281 [ 27.586053] print_address_description.cold+0x54/0x1d3 [ 27.591328] kasan_report_error.cold+0x8a/0x191 [ 27.595981] ? ex_handler_refcount+0x164/0x1a0 [ 27.600551] __asan_report_store4_noabort+0x68/0x70 [ 27.605545] ? ex_handler_refcount+0x164/0x1a0 [ 27.610104] ex_handler_refcount+0x164/0x1a0 [ 27.614498] ? ex_handler_clear_fs+0xb0/0xb0 [ 27.618881] fixup_exception+0x8a/0xd0 [ 27.622744] do_trap+0x61/0x250 [ 27.626017] ? do_error_trap+0x1d0/0x2d0 [ 27.630070] do_error_trap+0x132/0x2d0 [ 27.634160] ? math_error+0x2d0/0x2d0 [ 27.637937] ? flags_string.cold+0x1b38/0x6bf7 [ 27.642495] ? __mutex_lock+0x360/0x1310 [ 27.646541] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.651369] invalid_op+0x1b/0x40 [ 27.654817] RIP: 0010:flags_string.cold+0x1b38/0x6bf7 [ 27.660003] RSP: 0018:ffff888095b37cd0 EFLAGS: 00010296 [ 27.665341] RAX: 0000000000000000 RBX: ffff88809d8f8d98 RCX: ffff88809d8f8d98 [ 27.672590] RDX: 0000000000000004 RSI: 0000000000000003 RDI: 0000000000000001 [ 27.679851] RBP: ffffffff89513f60 R08: 0000000000000000 R09: 0000000000000002 [ 27.687443] R10: 0000000000000000 R11: ffff8880b0b42500 R12: 0000000000000000 [ 27.694715] R13: ffff88808a8337c4 R14: ffffed1011506746 R15: dffffc0000000000 [ 27.701974] nbd_release+0xf3/0x150 [ 27.705599] ? nbd_ioctl+0xac0/0xac0 [ 27.709289] __blkdev_put+0x5aa/0x800 [ 27.713077] ? revalidate_disk+0x1f0/0x1f0 [ 27.717286] ? locks_remove_file+0x2cd/0x420 [ 27.721671] ? blkdev_put+0x75/0x4c0 [ 27.725368] ? blkdev_put+0x4c0/0x4c0 [ 27.729162] blkdev_close+0x86/0xb0 [ 27.732768] __fput+0x25f/0x7a0 [ 27.736043] task_work_run+0x11f/0x190 [ 27.739913] exit_to_usermode_loop+0x1ad/0x200 [ 27.744475] do_syscall_64+0x4a3/0x640 [ 27.748459] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 27.753625] RIP: 0033:0x7fd96617a270 [ 27.757320] RSP: 002b:00007ffc249bc458 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 27.765032] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007fd96617a270 [ 27.772286] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 27.779546] RBP: 00007fd967034710 R08: 0000560543c59b20 R09: 0000000000000018 [ 27.786805] R10: 0000560543c5e1b8 R11: 0000000000000246 R12: 0000000000000000 [ 27.794049] R13: 0000560543c5c880 R14: 0000000000000003 R15: 000000000000000e [ 27.801302] [ 27.802906] Allocated by task 8132: [ 27.806518] kasan_kmalloc+0xeb/0x160 [ 27.810299] kmem_cache_alloc_trace+0x131/0x3d0 [ 27.814946] nbd_dev_add+0x7c/0x800 [ 27.818560] nbd_genl_connect+0x3a4/0x13e0 [ 27.822776] genl_family_rcv_msg+0x572/0xb20 [ 27.827180] genl_rcv_msg+0xaf/0x140 [ 27.830871] netlink_rcv_skb+0x125/0x390 [ 27.834908] genl_rcv+0x24/0x40 [ 27.838162] netlink_unicast+0x437/0x610 [ 27.842205] netlink_sendmsg+0x648/0xbc0 [ 27.846245] sock_sendmsg+0xb5/0x100 [ 27.849953] ___sys_sendmsg+0x6c8/0x800 [ 27.853915] __sys_sendmsg+0xa3/0x120 [ 27.857711] SyS_sendmsg+0x27/0x40 [ 27.861232] do_syscall_64+0x1d5/0x640 [ 27.865101] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 27.870259] [ 27.871861] Freed by task 8142: [ 27.875115] kasan_slab_free+0xc3/0x1a0 [ 27.879063] kfree+0xc9/0x250 [ 27.882145] nbd_put.part.0+0x100/0x140 [ 27.886283] nbd_genl_connect+0xcf6/0x13e0 [ 27.890492] genl_family_rcv_msg+0x572/0xb20 [ 27.894875] genl_rcv_msg+0xaf/0x140 [ 27.898570] netlink_rcv_skb+0x125/0x390 [ 27.902602] genl_rcv+0x24/0x40 [ 27.905860] netlink_unicast+0x437/0x610 [ 27.909898] netlink_sendmsg+0x648/0xbc0 [ 27.913933] sock_sendmsg+0xb5/0x100 [ 27.917631] ___sys_sendmsg+0x6c8/0x800 [ 27.921578] __sys_sendmsg+0xa3/0x120 [ 27.925351] SyS_sendmsg+0x27/0x40 [ 27.928870] do_syscall_64+0x1d5/0x640 [ 27.932742] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 27.937998] [ 27.939602] The buggy address belongs to the object at ffff88809d8f8cc0 [ 27.939602] which belongs to the cache kmalloc-512 of size 512 [ 27.952235] The buggy address is located 216 bytes inside of [ 27.952235] 512-byte region [ffff88809d8f8cc0, ffff88809d8f8ec0) [ 27.964116] The buggy address belongs to the page: [ 27.969121] page:ffffea0002763e00 count:1 mapcount:0 mapping:ffff88809d8f8040 index:0xffff88809d8f8040 [ 27.978555] flags: 0xfff00000000100(slab) [ 27.982701] raw: 00fff00000000100 ffff88809d8f8040 ffff88809d8f8040 0000000100000004 [ 27.990560] raw: ffffea00027213a0 ffffea000275b560 ffff88813fe74940 0000000000000000 [ 27.998419] page dumped because: kasan: bad access detected [ 28.004104] [ 28.005706] Memory state around the buggy address: [ 28.010608] ffff88809d8f8c80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 28.017943] ffff88809d8f8d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.025279] >ffff88809d8f8d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.032628] ^ [ 28.036748] ffff88809d8f8e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.044081] ffff88809d8f8e80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 28.051416] ================================================================== [ 28.058752] Disabling lock debugging due to kernel taint [ 28.066823] Kernel panic - not syncing: panic_on_warn set ... [ 28.066823] [ 28.074189] CPU: 1 PID: 8146 Comm: systemd-udevd Tainted: G B 4.14.283-syzkaller #0 [ 28.083096] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.092437] Call Trace: [ 28.095013] dump_stack+0x1b2/0x281 [ 28.098617] panic+0x1f9/0x42d [ 28.101795] ? add_taint.cold+0x16/0x16 [ 28.105745] ? ___preempt_schedule+0x16/0x18 [ 28.110135] kasan_end_report+0x43/0x49 [ 28.114106] kasan_report_error.cold+0xa7/0x191 [ 28.118755] ? ex_handler_refcount+0x164/0x1a0 [ 28.123359] __asan_report_store4_noabort+0x68/0x70 [ 28.128355] ? ex_handler_refcount+0x164/0x1a0 [ 28.132911] ex_handler_refcount+0x164/0x1a0 [ 28.137294] ? ex_handler_clear_fs+0xb0/0xb0 [ 28.141691] fixup_exception+0x8a/0xd0 [ 28.145558] do_trap+0x61/0x250 [ 28.148812] ? do_error_trap+0x1d0/0x2d0 [ 28.152853] do_error_trap+0x132/0x2d0 [ 28.156713] ? math_error+0x2d0/0x2d0 [ 28.160489] ? flags_string.cold+0x1b38/0x6bf7 [ 28.165052] ? __mutex_lock+0x360/0x1310 [ 28.169085] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.173899] invalid_op+0x1b/0x40 [ 28.177335] RIP: 0010:flags_string.cold+0x1b38/0x6bf7 [ 28.182492] RSP: 0018:ffff888095b37cd0 EFLAGS: 00010296 [ 28.187852] RAX: 0000000000000000 RBX: ffff88809d8f8d98 RCX: ffff88809d8f8d98 [ 28.195111] RDX: 0000000000000004 RSI: 0000000000000003 RDI: 0000000000000001 [ 28.202358] RBP: ffffffff89513f60 R08: 0000000000000000 R09: 0000000000000002 [ 28.209636] R10: 0000000000000000 R11: ffff8880b0b42500 R12: 0000000000000000 [ 28.216908] R13: ffff88808a8337c4 R14: ffffed1011506746 R15: dffffc0000000000 [ 28.224175] nbd_release+0xf3/0x150 [ 28.227790] ? nbd_ioctl+0xac0/0xac0 [ 28.231483] __blkdev_put+0x5aa/0x800 [ 28.235270] ? revalidate_disk+0x1f0/0x1f0 [ 28.239476] ? locks_remove_file+0x2cd/0x420 [ 28.243866] ? blkdev_put+0x75/0x4c0 [ 28.247571] ? blkdev_put+0x4c0/0x4c0 [ 28.251353] blkdev_close+0x86/0xb0 [ 28.254951] __fput+0x25f/0x7a0 [ 28.258205] task_work_run+0x11f/0x190 [ 28.262168] exit_to_usermode_loop+0x1ad/0x200 [ 28.266730] do_syscall_64+0x4a3/0x640 [ 28.270598] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.275777] RIP: 0033:0x7fd96617a270 [ 28.279463] RSP: 002b:00007ffc249bc458 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 28.287146] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007fd96617a270 [ 28.294477] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 28.301721] RBP: 00007fd967034710 R08: 0000560543c59b20 R09: 0000000000000018 [ 28.308964] R10: 0000560543c5e1b8 R11: 0000000000000246 R12: 0000000000000000 [ 28.316294] R13: 0000560543c5c880 R14: 0000000000000003 R15: 000000000000000e [ 28.323732] Kernel Offset: disabled [ 28.327337] Rebooting in 86400 seconds..