Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.44' (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 syzkaller login: [ 32.428594] ================================================================== [ 32.436113] BUG: KASAN: use-after-free in ex_handler_refcount+0x164/0x1a0 [ 32.443292] Write of size 4 at addr ffff8880a9528658 by task systemd-udevd/8150 [ 32.450811] [ 32.452692] CPU: 1 PID: 8150 Comm: systemd-udevd Not tainted 4.14.228-syzkaller #0 [ 32.460813] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.470628] Call Trace: [ 32.473470] dump_stack+0x1b2/0x281 [ 32.477492] print_address_description.cold+0x54/0x1d3 [ 32.482961] kasan_report_error.cold+0x8a/0x191 [ 32.487992] ? ex_handler_refcount+0x164/0x1a0 [ 32.492784] __asan_report_store4_noabort+0x68/0x70 [ 32.498049] ? ex_handler_refcount+0x164/0x1a0 [ 32.503111] ex_handler_refcount+0x164/0x1a0 [ 32.507672] ? ex_handler_clear_fs+0xb0/0xb0 [ 32.513096] fixup_exception+0x8a/0xd0 [ 32.517038] do_trap+0x61/0x250 [ 32.520321] ? do_error_trap+0x1d0/0x2d0 [ 32.524532] do_error_trap+0x132/0x2d0 [ 32.528747] ? math_error+0x2d0/0x2d0 [ 32.533203] ? flags_string.cold+0x1b15/0x6a9f [ 32.537992] ? __mutex_lock+0x360/0x1310 [ 32.542521] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.547629] invalid_op+0x1b/0x40 [ 32.551930] RIP: 0010:flags_string.cold+0x1b15/0x6a9f [ 32.557906] RSP: 0018:ffff8880b2e4fcd0 EFLAGS: 00010296 [ 32.563353] RAX: 0000000000000000 RBX: ffff8880a9528658 RCX: ffff8880a9528658 [ 32.571239] RDX: 0000000000000004 RSI: 0000000000000003 RDI: 0000000000000001 [ 32.578943] RBP: ffffffff89512780 R08: 0000000000000000 R09: 0000000000000002 [ 32.587034] R10: 0000000000000000 R11: ffff8880b1902440 R12: 0000000000000000 [ 32.594647] R13: ffff88808e7897c4 R14: ffffed1011cf1346 R15: dffffc0000000000 [ 32.602837] nbd_release+0xf3/0x150 [ 32.606963] ? nbd_queue_rq+0xc50/0xc50 [ 32.611283] __blkdev_put+0x5aa/0x800 [ 32.615404] ? revalidate_disk+0x1f0/0x1f0 [ 32.619800] ? locks_remove_file+0x2cd/0x420 [ 32.624234] ? blkdev_put+0x75/0x4c0 [ 32.628033] ? blkdev_put+0x4c0/0x4c0 [ 32.632116] blkdev_close+0x86/0xb0 [ 32.636019] __fput+0x25f/0x7a0 [ 32.639449] task_work_run+0x11f/0x190 [ 32.643363] exit_to_usermode_loop+0x1ad/0x200 [ 32.647964] do_syscall_64+0x4a3/0x640 [ 32.651938] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 32.657121] RIP: 0033:0x7f3e3e8ce270 [ 32.661044] RSP: 002b:00007fff71af09b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 32.670285] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007f3e3e8ce270 [ 32.678299] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 32.686481] RBP: 00007f3e3f788710 R08: 000055791cc71eb0 R09: 0000000000000018 [ 32.694210] R10: 000055791cc721b8 R11: 0000000000000246 R12: 0000000000000000 [ 32.701974] R13: 000055791cc70880 R14: 0000000000000003 R15: 000000000000000e [ 32.709571] [ 32.711280] Allocated by task 8130: [ 32.715092] kasan_kmalloc+0xeb/0x160 [ 32.721266] kmem_cache_alloc_trace+0x131/0x3d0 [ 32.727306] nbd_dev_add+0x7c/0x800 [ 32.731147] nbd_genl_connect+0x3a4/0x1400 [ 32.736157] genl_family_rcv_msg+0x572/0xb20 [ 32.741645] genl_rcv_msg+0xaf/0x140 [ 32.745361] netlink_rcv_skb+0x125/0x390 [ 32.749541] genl_rcv+0x24/0x40 [ 32.752809] netlink_unicast+0x437/0x610 [ 32.757040] netlink_sendmsg+0x62e/0xb80 [ 32.761198] sock_sendmsg+0xb5/0x100 [ 32.765083] ___sys_sendmsg+0x6c8/0x800 [ 32.769334] __sys_sendmsg+0xa3/0x120 [ 32.773222] SyS_sendmsg+0x27/0x40 [ 32.777012] do_syscall_64+0x1d5/0x640 [ 32.781968] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 32.788802] [ 32.790469] Freed by task 8143: [ 32.793933] kasan_slab_free+0xc3/0x1a0 [ 32.798072] kfree+0xc9/0x250 [ 32.801400] nbd_put.part.0+0x100/0x140 [ 32.805367] nbd_genl_connect+0xfa9/0x1400 [ 32.810685] genl_family_rcv_msg+0x572/0xb20 [ 32.815399] genl_rcv_msg+0xaf/0x140 [ 32.819785] netlink_rcv_skb+0x125/0x390 [ 32.824103] genl_rcv+0x24/0x40 [ 32.827798] netlink_unicast+0x437/0x610 [ 32.832085] netlink_sendmsg+0x62e/0xb80 [ 32.836132] sock_sendmsg+0xb5/0x100 [ 32.840198] ___sys_sendmsg+0x6c8/0x800 [ 32.844471] __sys_sendmsg+0xa3/0x120 [ 32.848360] SyS_sendmsg+0x27/0x40 [ 32.852103] do_syscall_64+0x1d5/0x640 [ 32.856153] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 32.861536] [ 32.863158] The buggy address belongs to the object at ffff8880a9528580 [ 32.863158] which belongs to the cache kmalloc-512 of size 512 [ 32.876368] The buggy address is located 216 bytes inside of [ 32.876368] 512-byte region [ffff8880a9528580, ffff8880a9528780) [ 32.888319] The buggy address belongs to the page: [ 32.894075] page:ffffea0002a54a00 count:1 mapcount:0 mapping:ffff8880a9528080 index:0x0 [ 32.903590] flags: 0xfff00000000100(slab) [ 32.907938] raw: 00fff00000000100 ffff8880a9528080 0000000000000000 0000000100000006 [ 32.916260] raw: ffffea0002902160 ffffea0002a9ffa0 ffff88813fe80940 0000000000000000 [ 32.924300] page dumped because: kasan: bad access detected [ 32.931384] [ 32.933015] Memory state around the buggy address: [ 32.938036] ffff8880a9528500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.946425] ffff8880a9528580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.955065] >ffff8880a9528600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.962539] ^ [ 32.969065] ffff8880a9528680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.976542] ffff8880a9528700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.984265] ================================================================== [ 32.991697] Disabling lock debugging due to kernel taint [ 33.006809] Kernel panic - not syncing: panic_on_warn set ... [ 33.006809] [ 33.014306] CPU: 0 PID: 8150 Comm: systemd-udevd Tainted: G B 4.14.228-syzkaller #0 [ 33.023652] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.033781] Call Trace: [ 33.036372] dump_stack+0x1b2/0x281 [ 33.040838] panic+0x1f9/0x42d [ 33.045547] ? add_taint.cold+0x16/0x16 [ 33.049620] ? ___preempt_schedule+0x16/0x18 [ 33.054221] kasan_end_report+0x43/0x49 [ 33.058195] kasan_report_error.cold+0xa7/0x191 [ 33.062943] ? ex_handler_refcount+0x164/0x1a0 [ 33.067572] __asan_report_store4_noabort+0x68/0x70 [ 33.073092] ? ex_handler_refcount+0x164/0x1a0 [ 33.077798] ex_handler_refcount+0x164/0x1a0 [ 33.082475] ? ex_handler_clear_fs+0xb0/0xb0 [ 33.086873] fixup_exception+0x8a/0xd0 [ 33.090741] do_trap+0x61/0x250 [ 33.094099] ? do_error_trap+0x1d0/0x2d0 [ 33.098147] do_error_trap+0x132/0x2d0 [ 33.102011] ? math_error+0x2d0/0x2d0 [ 33.105970] ? flags_string.cold+0x1b15/0x6a9f [ 33.110724] ? __mutex_lock+0x360/0x1310 [ 33.114802] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 33.120014] invalid_op+0x1b/0x40 [ 33.123762] RIP: 0010:flags_string.cold+0x1b15/0x6a9f [ 33.129716] RSP: 0018:ffff8880b2e4fcd0 EFLAGS: 00010296 [ 33.135174] RAX: 0000000000000000 RBX: ffff8880a9528658 RCX: ffff8880a9528658 [ 33.142953] RDX: 0000000000000004 RSI: 0000000000000003 RDI: 0000000000000001 [ 33.150206] RBP: ffffffff89512780 R08: 0000000000000000 R09: 0000000000000002 [ 33.157457] R10: 0000000000000000 R11: ffff8880b1902440 R12: 0000000000000000 [ 33.165077] R13: ffff88808e7897c4 R14: ffffed1011cf1346 R15: dffffc0000000000 [ 33.172343] nbd_release+0xf3/0x150 [ 33.176021] ? nbd_queue_rq+0xc50/0xc50 [ 33.180457] __blkdev_put+0x5aa/0x800 [ 33.184692] ? revalidate_disk+0x1f0/0x1f0 [ 33.189106] ? locks_remove_file+0x2cd/0x420 [ 33.193500] ? blkdev_put+0x75/0x4c0 [ 33.197281] ? blkdev_put+0x4c0/0x4c0 [ 33.201244] blkdev_close+0x86/0xb0 [ 33.205291] __fput+0x25f/0x7a0 [ 33.208886] task_work_run+0x11f/0x190 [ 33.212856] exit_to_usermode_loop+0x1ad/0x200 [ 33.217428] do_syscall_64+0x4a3/0x640 [ 33.221319] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 33.226493] RIP: 0033:0x7f3e3e8ce270 [ 33.230776] RSP: 002b:00007fff71af09b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 33.238933] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007f3e3e8ce270 [ 33.246670] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 33.254187] RBP: 00007f3e3f788710 R08: 000055791cc71eb0 R09: 0000000000000018 [ 33.261453] R10: 000055791cc721b8 R11: 0000000000000246 R12: 0000000000000000 [ 33.268910] R13: 000055791cc70880 R14: 0000000000000003 R15: 000000000000000e [ 33.277806] Kernel Offset: disabled [ 33.281586] Rebooting in 86400 seconds..