[ OK ] Started Getty on tty5. [ OK ] Started Getty on tty4. [ OK ] Started Getty on tty3. [ 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.1.4' (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 syzkaller login: [ 28.866068] ================================================================== [ 28.873635] BUG: KASAN: use-after-free in ex_handler_refcount+0x164/0x1a0 [ 28.880544] Write of size 4 at addr ffff8880a36f4d98 by task systemd-udevd/8115 [ 28.887964] [ 28.889571] CPU: 0 PID: 8115 Comm: systemd-udevd Not tainted 4.14.232-syzkaller #0 [ 28.897251] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.906581] Call Trace: [ 28.909148] dump_stack+0x1b2/0x281 [ 28.912802] print_address_description.cold+0x54/0x1d3 [ 28.918079] kasan_report_error.cold+0x8a/0x191 [ 28.922733] ? ex_handler_refcount+0x164/0x1a0 [ 28.927293] __asan_report_store4_noabort+0x68/0x70 [ 28.932289] ? ex_handler_refcount+0x164/0x1a0 [ 28.936847] ex_handler_refcount+0x164/0x1a0 [ 28.941231] ? ex_handler_clear_fs+0xb0/0xb0 [ 28.945613] fixup_exception+0x8a/0xd0 [ 28.949477] do_trap+0x61/0x250 [ 28.952734] ? do_error_trap+0x1d0/0x2d0 [ 28.956769] do_error_trap+0x132/0x2d0 [ 28.960651] ? math_error+0x2d0/0x2d0 [ 28.964428] ? flags_string.cold+0x1b15/0x6a9e [ 28.969032] ? __mutex_lock+0x360/0x1310 [ 28.973089] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.977915] invalid_op+0x1b/0x40 [ 28.981351] RIP: 0010:flags_string.cold+0x1b15/0x6a9e [ 28.986514] RSP: 0018:ffff888096c87cd0 EFLAGS: 00010296 [ 28.991855] RAX: 0000000000000000 RBX: ffff8880a36f4d98 RCX: ffff8880a36f4d98 [ 28.999101] RDX: 0000000000000004 RSI: 0000000000000003 RDI: 0000000000000001 [ 29.006347] RBP: ffffffff89512740 R08: 0000000000000000 R09: 0000000000000002 [ 29.013597] R10: 0000000000000000 R11: ffff8880b1772600 R12: 0000000000000000 [ 29.020842] R13: ffff88808df380c4 R14: ffffed1011be7066 R15: dffffc0000000000 [ 29.028098] nbd_release+0xf3/0x150 [ 29.031705] ? nbd_queue_rq+0xc50/0xc50 [ 29.035676] __blkdev_put+0x5aa/0x800 [ 29.039456] ? revalidate_disk+0x1f0/0x1f0 [ 29.043667] ? locks_remove_file+0x2cd/0x420 [ 29.048050] ? blkdev_put+0x75/0x4c0 [ 29.051737] ? blkdev_put+0x4c0/0x4c0 [ 29.055513] blkdev_close+0x86/0xb0 [ 29.059131] __fput+0x25f/0x7a0 [ 29.062392] task_work_run+0x11f/0x190 [ 29.066264] exit_to_usermode_loop+0x1ad/0x200 [ 29.070827] do_syscall_64+0x4a3/0x640 [ 29.074688] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.079864] RIP: 0033:0x7f9b0e813270 [ 29.083548] RSP: 002b:00007ffdc0c61888 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 29.091230] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007f9b0e813270 [ 29.098476] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 29.105722] RBP: 00007f9b0f6cd710 R08: 0000000000000045 R09: 0000000000000018 [ 29.112995] R10: 000055bb1becb1b8 R11: 0000000000000246 R12: 0000000000000000 [ 29.120246] R13: 000055bb1bec9880 R14: 0000000000000003 R15: 000000000000000e [ 29.127505] [ 29.129110] Allocated by task 8097: [ 29.132730] kasan_kmalloc+0xeb/0x160 [ 29.136508] kmem_cache_alloc_trace+0x131/0x3d0 [ 29.141167] nbd_dev_add+0x7c/0x800 [ 29.144797] nbd_genl_connect+0x3a4/0x1400 [ 29.149014] genl_family_rcv_msg+0x572/0xb20 [ 29.153400] genl_rcv_msg+0xaf/0x140 [ 29.157090] netlink_rcv_skb+0x125/0x390 [ 29.161226] genl_rcv+0x24/0x40 [ 29.164608] netlink_unicast+0x437/0x610 [ 29.168639] netlink_sendmsg+0x62e/0xb80 [ 29.172671] sock_sendmsg+0xb5/0x100 [ 29.176356] ___sys_sendmsg+0x6c8/0x800 [ 29.180339] __sys_sendmsg+0xa3/0x120 [ 29.184210] SyS_sendmsg+0x27/0x40 [ 29.187764] do_syscall_64+0x1d5/0x640 [ 29.191623] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.196786] [ 29.198388] Freed by task 8111: [ 29.201655] kasan_slab_free+0xc3/0x1a0 [ 29.205604] kfree+0xc9/0x250 [ 29.208682] nbd_put.part.0+0x100/0x140 [ 29.212661] nbd_genl_connect+0xfa9/0x1400 [ 29.216883] genl_family_rcv_msg+0x572/0xb20 [ 29.221263] genl_rcv_msg+0xaf/0x140 [ 29.224950] netlink_rcv_skb+0x125/0x390 [ 29.229007] genl_rcv+0x24/0x40 [ 29.232273] netlink_unicast+0x437/0x610 [ 29.236325] netlink_sendmsg+0x62e/0xb80 [ 29.240361] sock_sendmsg+0xb5/0x100 [ 29.244163] ___sys_sendmsg+0x6c8/0x800 [ 29.248115] __sys_sendmsg+0xa3/0x120 [ 29.251886] SyS_sendmsg+0x27/0x40 [ 29.255399] do_syscall_64+0x1d5/0x640 [ 29.259265] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.264433] [ 29.266064] The buggy address belongs to the object at ffff8880a36f4cc0 [ 29.266064] which belongs to the cache kmalloc-512 of size 512 [ 29.278690] The buggy address is located 216 bytes inside of [ 29.278690] 512-byte region [ffff8880a36f4cc0, ffff8880a36f4ec0) [ 29.290744] The buggy address belongs to the page: [ 29.295654] page:ffffea00028dbd00 count:1 mapcount:0 mapping:ffff8880a36f4040 index:0x0 [ 29.303785] flags: 0xfff00000000100(slab) [ 29.307906] raw: 00fff00000000100 ffff8880a36f4040 0000000000000000 0000000100000006 [ 29.315759] raw: ffffea00026c35e0 ffffea00027c1020 ffff88813fe80940 0000000000000000 [ 29.323608] page dumped because: kasan: bad access detected [ 29.329290] [ 29.330894] Memory state around the buggy address: [ 29.335800] ffff8880a36f4c80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 29.343135] ffff8880a36f4d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.350473] >ffff8880a36f4d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.357805] ^ executing program [ 29.361927] ffff8880a36f4e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.369259] ffff8880a36f4e80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 29.376588] ================================================================== [ 29.383919] Disabling lock debugging due to kernel taint [ 29.403765] Kernel panic - not syncing: panic_on_warn set ... [ 29.403765] [ 29.411131] CPU: 1 PID: 8115 Comm: systemd-udevd Tainted: G B 4.14.232-syzkaller #0 [ 29.420036] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.429359] Call Trace: [ 29.431934] dump_stack+0x1b2/0x281 [ 29.435533] panic+0x1f9/0x42d [ 29.438695] ? add_taint.cold+0x16/0x16 [ 29.442653] ? ___preempt_schedule+0x16/0x18 [ 29.447040] kasan_end_report+0x43/0x49 [ 29.450986] kasan_report_error.cold+0xa7/0x191 [ 29.455645] ? ex_handler_refcount+0x164/0x1a0 [ 29.460198] __asan_report_store4_noabort+0x68/0x70 [ 29.465186] ? ex_handler_refcount+0x164/0x1a0 [ 29.469739] ex_handler_refcount+0x164/0x1a0 [ 29.474119] ? ex_handler_clear_fs+0xb0/0xb0 [ 29.478498] fixup_exception+0x8a/0xd0 [ 29.482373] do_trap+0x61/0x250 [ 29.485626] ? do_error_trap+0x1d0/0x2d0 [ 29.489658] do_error_trap+0x132/0x2d0 [ 29.493517] ? math_error+0x2d0/0x2d0 [ 29.497288] ? flags_string.cold+0x1b15/0x6a9e [ 29.501840] ? __mutex_lock+0x360/0x1310 [ 29.505873] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 29.510688] invalid_op+0x1b/0x40 [ 29.514113] RIP: 0010:flags_string.cold+0x1b15/0x6a9e [ 29.519301] RSP: 0018:ffff888096c87cd0 EFLAGS: 00010296 [ 29.524637] RAX: 0000000000000000 RBX: ffff8880a36f4d98 RCX: ffff8880a36f4d98 [ 29.531878] RDX: 0000000000000004 RSI: 0000000000000003 RDI: 0000000000000001 [ 29.539120] RBP: ffffffff89512740 R08: 0000000000000000 R09: 0000000000000002 [ 29.546363] R10: 0000000000000000 R11: ffff8880b1772600 R12: 0000000000000000 [ 29.553611] R13: ffff88808df380c4 R14: ffffed1011be7066 R15: dffffc0000000000 [ 29.560864] nbd_release+0xf3/0x150 [ 29.564465] ? nbd_queue_rq+0xc50/0xc50 [ 29.568411] __blkdev_put+0x5aa/0x800 [ 29.572184] ? revalidate_disk+0x1f0/0x1f0 [ 29.576392] ? locks_remove_file+0x2cd/0x420 [ 29.580772] ? blkdev_put+0x75/0x4c0 [ 29.584459] ? blkdev_put+0x4c0/0x4c0 [ 29.588272] blkdev_close+0x86/0xb0 [ 29.591868] __fput+0x25f/0x7a0 [ 29.595120] task_work_run+0x11f/0x190 [ 29.598986] exit_to_usermode_loop+0x1ad/0x200 [ 29.603560] do_syscall_64+0x4a3/0x640 [ 29.607523] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.612686] RIP: 0033:0x7f9b0e813270 [ 29.616369] RSP: 002b:00007ffdc0c61888 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 29.624080] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007f9b0e813270 [ 29.631342] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 29.638582] RBP: 00007f9b0f6cd710 R08: 0000000000000045 R09: 0000000000000018 [ 29.645824] R10: 000055bb1becb1b8 R11: 0000000000000246 R12: 0000000000000000 [ 29.653065] R13: 000055bb1bec9880 R14: 0000000000000003 R15: 000000000000000e [ 29.660849] Kernel Offset: disabled [ 29.664456] Rebooting in 86400 seconds..