Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.10.22' (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 syzkaller login: [ 30.021783] ================================================================== [ 30.029271] BUG: KASAN: use-after-free in ex_handler_refcount+0x164/0x1a0 [ 30.036179] Write of size 4 at addr ffff8880af261158 by task systemd-udevd/8368 [ 30.043598] [ 30.045214] CPU: 0 PID: 8368 Comm: systemd-udevd Not tainted 4.14.280-syzkaller #0 [ 30.052904] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.062240] Call Trace: [ 30.064809] dump_stack+0x1b2/0x281 [ 30.068416] print_address_description.cold+0x54/0x1d3 [ 30.073669] kasan_report_error.cold+0x8a/0x191 [ 30.078314] ? ex_handler_refcount+0x164/0x1a0 [ 30.082871] __asan_report_store4_noabort+0x68/0x70 [ 30.087867] ? ex_handler_refcount+0x164/0x1a0 [ 30.092434] ex_handler_refcount+0x164/0x1a0 [ 30.096832] ? ex_handler_clear_fs+0xb0/0xb0 [ 30.101229] fixup_exception+0x8a/0xd0 [ 30.105099] do_trap+0x61/0x250 [ 30.108353] ? do_error_trap+0x1d0/0x2d0 [ 30.112392] do_error_trap+0x132/0x2d0 [ 30.116255] ? math_error+0x2d0/0x2d0 [ 30.120029] ? flags_string.cold+0x1b2c/0x6beb [ 30.124586] ? __mutex_lock+0x360/0x1310 [ 30.128624] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 30.133444] invalid_op+0x1b/0x40 [ 30.136875] RIP: 0010:flags_string.cold+0x1b2c/0x6beb [ 30.142037] RSP: 0018:ffff888091bcfcd0 EFLAGS: 00010296 [ 30.147382] RAX: 0000000000000000 RBX: ffff8880af261158 RCX: ffff8880af261158 [ 30.154631] RDX: 0000000000000004 RSI: 0000000000000003 RDI: 0000000000000001 [ 30.161881] RBP: ffffffff89513ce0 R08: 0000000000000000 R09: 0000000000000002 [ 30.169127] R10: 0000000000000000 R11: ffff888093cdc300 R12: 0000000000000000 [ 30.176376] R13: ffff88808b211184 R14: ffffed101164227e R15: dffffc0000000000 [ 30.183646] nbd_release+0xf3/0x150 [ 30.187253] ? nbd_queue_rq+0xc50/0xc50 [ 30.191206] __blkdev_put+0x5aa/0x800 [ 30.194992] ? revalidate_disk+0x1f0/0x1f0 [ 30.199200] ? locks_remove_file+0x2cd/0x420 [ 30.203726] ? blkdev_put+0x75/0x4c0 [ 30.207423] ? blkdev_put+0x4c0/0x4c0 [ 30.211204] blkdev_close+0x86/0xb0 [ 30.214815] __fput+0x25f/0x7a0 [ 30.218074] task_work_run+0x11f/0x190 [ 30.221944] exit_to_usermode_loop+0x1ad/0x200 [ 30.226516] do_syscall_64+0x4a3/0x640 [ 30.230383] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 30.235554] RIP: 0033:0x7f5d96692270 [ 30.239239] RSP: 002b:00007fff28bfa588 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 30.246919] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007f5d96692270 [ 30.254162] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 30.261408] RBP: 00007f5d9754c710 R08: 0000000000000045 R09: 0000000000000018 [ 30.268652] R10: 000055b2ca9b9f68 R11: 0000000000000246 R12: 0000000000000000 [ 30.275909] R13: 000055b2ca9b9dd0 R14: 0000000000000003 R15: 000000000000000e [ 30.283163] [ 30.284767] Allocated by task 8339: [ 30.288372] kasan_kmalloc+0xeb/0x160 [ 30.292149] kmem_cache_alloc_trace+0x131/0x3d0 [ 30.296798] nbd_dev_add+0x7c/0x800 [ 30.300401] nbd_genl_connect+0x3a4/0x1400 [ 30.304613] genl_family_rcv_msg+0x572/0xb20 [ 30.308994] genl_rcv_msg+0xaf/0x140 [ 30.312680] netlink_rcv_skb+0x125/0x390 [ 30.316720] genl_rcv+0x24/0x40 [ 30.319974] netlink_unicast+0x437/0x610 [ 30.324009] netlink_sendmsg+0x648/0xbc0 [ 30.328043] sock_sendmsg+0xb5/0x100 [ 30.331732] ___sys_sendmsg+0x6c8/0x800 [ 30.335677] __sys_sendmsg+0xa3/0x120 [ 30.339453] SyS_sendmsg+0x27/0x40 [ 30.342970] do_syscall_64+0x1d5/0x640 [ 30.346835] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 30.351996] [ 30.353597] Freed by task 8352: [ 30.356851] kasan_slab_free+0xc3/0x1a0 [ 30.360798] kfree+0xc9/0x250 [ 30.363879] nbd_put.part.0+0x100/0x140 [ 30.367825] nbd_genl_connect+0xfa9/0x1400 [ 30.372033] genl_family_rcv_msg+0x572/0xb20 [ 30.376414] genl_rcv_msg+0xaf/0x140 [ 30.380102] netlink_rcv_skb+0x125/0x390 [ 30.384165] genl_rcv+0x24/0x40 [ 30.387421] netlink_unicast+0x437/0x610 [ 30.391455] netlink_sendmsg+0x648/0xbc0 [ 30.395491] sock_sendmsg+0xb5/0x100 [ 30.399176] ___sys_sendmsg+0x6c8/0x800 [ 30.403125] __sys_sendmsg+0xa3/0x120 [ 30.406898] SyS_sendmsg+0x27/0x40 [ 30.410414] do_syscall_64+0x1d5/0x640 [ 30.414276] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 30.419435] [ 30.421037] The buggy address belongs to the object at ffff8880af261080 [ 30.421037] which belongs to the cache kmalloc-512 of size 512 [ 30.433667] The buggy address is located 216 bytes inside of [ 30.433667] 512-byte region [ffff8880af261080, ffff8880af261280) [ 30.445513] The buggy address belongs to the page: [ 30.450416] page:ffffea0002bc9840 count:1 mapcount:0 mapping:ffff8880af261080 index:0x0 [ 30.458531] flags: 0xfff00000000100(slab) [ 30.462656] raw: 00fff00000000100 ffff8880af261080 0000000000000000 0000000100000006 [ 30.470509] raw: ffffea0002c27160 ffffea0002c41320 ffff88813fe74940 0000000000000000 [ 30.478365] page dumped because: kasan: bad access detected [ 30.484046] [ 30.485653] Memory state around the buggy address: [ 30.490556] ffff8880af261000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.497895] ffff8880af261080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.505233] >ffff8880af261100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.512564] ^ executing program [ 30.518776] ffff8880af261180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.526115] ffff8880af261200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.533445] ================================================================== [ 30.540779] Disabling lock debugging due to kernel taint [ 30.552113] Kernel panic - not syncing: panic_on_warn set ... [ 30.552113] [ 30.559491] CPU: 1 PID: 8368 Comm: systemd-udevd Tainted: G B 4.14.280-syzkaller #0 [ 30.568402] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.577744] Call Trace: [ 30.580308] dump_stack+0x1b2/0x281 [ 30.583910] panic+0x1f9/0x42d [ 30.587077] ? add_taint.cold+0x16/0x16 [ 30.591023] ? ___preempt_schedule+0x16/0x18 [ 30.595404] kasan_end_report+0x43/0x49 [ 30.599352] kasan_report_error.cold+0xa7/0x191 [ 30.603994] ? ex_handler_refcount+0x164/0x1a0 [ 30.608548] __asan_report_store4_noabort+0x68/0x70 [ 30.613539] ? ex_handler_refcount+0x164/0x1a0 [ 30.618095] ex_handler_refcount+0x164/0x1a0 [ 30.622478] ? ex_handler_clear_fs+0xb0/0xb0 [ 30.626859] fixup_exception+0x8a/0xd0 [ 30.630722] do_trap+0x61/0x250 [ 30.633975] ? do_error_trap+0x1d0/0x2d0 [ 30.638009] do_error_trap+0x132/0x2d0 [ 30.641871] ? math_error+0x2d0/0x2d0 [ 30.645646] ? flags_string.cold+0x1b2c/0x6beb [ 30.650202] ? __mutex_lock+0x360/0x1310 [ 30.654237] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 30.659053] invalid_op+0x1b/0x40 [ 30.662478] RIP: 0010:flags_string.cold+0x1b2c/0x6beb [ 30.667639] RSP: 0018:ffff888091bcfcd0 EFLAGS: 00010296 [ 30.672975] RAX: 0000000000000000 RBX: ffff8880af261158 RCX: ffff8880af261158 [ 30.680221] RDX: 0000000000000004 RSI: 0000000000000003 RDI: 0000000000000001 [ 30.687462] RBP: ffffffff89513ce0 R08: 0000000000000000 R09: 0000000000000002 [ 30.694705] R10: 0000000000000000 R11: ffff888093cdc300 R12: 0000000000000000 [ 30.701949] R13: ffff88808b211184 R14: ffffed101164227e R15: dffffc0000000000 [ 30.709206] nbd_release+0xf3/0x150 [ 30.712815] ? nbd_queue_rq+0xc50/0xc50 [ 30.716763] __blkdev_put+0x5aa/0x800 [ 30.720538] ? revalidate_disk+0x1f0/0x1f0 [ 30.724745] ? locks_remove_file+0x2cd/0x420 [ 30.729126] ? blkdev_put+0x75/0x4c0 [ 30.732811] ? blkdev_put+0x4c0/0x4c0 [ 30.736584] blkdev_close+0x86/0xb0 [ 30.740187] __fput+0x25f/0x7a0 [ 30.743443] task_work_run+0x11f/0x190 [ 30.747307] exit_to_usermode_loop+0x1ad/0x200 [ 30.751860] do_syscall_64+0x4a3/0x640 [ 30.755721] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 30.760882] RIP: 0033:0x7f5d96692270 [ 30.764563] RSP: 002b:00007fff28bfa588 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 30.772242] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007f5d96692270 [ 30.779489] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 30.786731] RBP: 00007f5d9754c710 R08: 0000000000000045 R09: 0000000000000018 [ 30.793972] R10: 000055b2ca9b9f68 R11: 0000000000000246 R12: 0000000000000000 [ 30.801213] R13: 000055b2ca9b9dd0 R14: 0000000000000003 R15: 000000000000000e [ 30.808639] Kernel Offset: disabled [ 30.812245] Rebooting in 86400 seconds..