Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.209' (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 executing program executing program executing program executing program syzkaller login: [ 32.125197] ================================================================== [ 32.132747] BUG: KASAN: use-after-free in ex_handler_refcount+0x164/0x1a0 [ 32.140208] Write of size 4 at addr ffff8880a989cb58 by task systemd-udevd/8363 [ 32.147660] [ 32.149278] CPU: 0 PID: 8363 Comm: systemd-udevd Not tainted 4.14.221-syzkaller #0 [ 32.156991] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.166331] Call Trace: [ 32.168908] dump_stack+0x1b2/0x281 [ 32.172562] print_address_description.cold+0x54/0x1d3 [ 32.177845] kasan_report_error.cold+0x8a/0x191 [ 32.182515] ? ex_handler_refcount+0x164/0x1a0 [ 32.187078] __asan_report_store4_noabort+0x68/0x70 [ 32.192082] ? ex_handler_refcount+0x164/0x1a0 [ 32.196660] ex_handler_refcount+0x164/0x1a0 [ 32.201054] ? ex_handler_clear_fs+0xb0/0xb0 [ 32.205500] fixup_exception+0x8a/0xd0 [ 32.209389] do_trap+0x61/0x250 [ 32.212651] ? do_error_trap+0x1d0/0x2d0 [ 32.216696] do_error_trap+0x132/0x2d0 [ 32.220575] ? math_error+0x2d0/0x2d0 [ 32.224380] ? flags_string.cold+0x1b15/0x6aa9 [ 32.228943] ? __mutex_lock+0x360/0x1310 [ 32.233007] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.237935] invalid_op+0x1b/0x40 [ 32.241378] RIP: 0010:flags_string.cold+0x1b15/0x6aa9 [ 32.246550] RSP: 0018:ffff8880ac217cd0 EFLAGS: 00010296 [ 32.251921] RAX: 0000000000000000 RBX: ffff8880a989cb58 RCX: ffff8880a989cb58 [ 32.259179] RDX: 0000000000000004 RSI: 0000000000000003 RDI: 0000000000000001 [ 32.266434] RBP: ffffffff89511120 R08: 0000000000000000 R09: 0000000000000002 [ 32.273725] R10: 0000000000000000 R11: ffff8880938ce540 R12: 0000000000000000 [ 32.281060] R13: ffff88808b5e7204 R14: ffffed10116bce8e R15: dffffc0000000000 [ 32.288420] nbd_release+0xf3/0x150 [ 32.292067] ? nbd_queue_rq+0xc50/0xc50 [ 32.296041] __blkdev_put+0x5aa/0x800 [ 32.299831] ? revalidate_disk+0x1f0/0x1f0 [ 32.304046] ? locks_remove_file+0x2cd/0x420 [ 32.308448] ? blkdev_put+0x75/0x4c0 [ 32.312153] ? blkdev_put+0x4c0/0x4c0 [ 32.315970] blkdev_close+0x86/0xb0 [ 32.319582] __fput+0x25f/0x7a0 [ 32.323045] task_work_run+0x11f/0x190 [ 32.326943] exit_to_usermode_loop+0x1ad/0x200 [ 32.331523] do_syscall_64+0x4a3/0x640 [ 32.335404] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 32.340585] RIP: 0033:0x7f89d6fa6270 [ 32.344278] RSP: 002b:00007ffc737fd6b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 32.352079] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007f89d6fa6270 [ 32.359426] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 32.366680] RBP: 00007f89d7e5f710 R08: 0000000000000045 R09: 0000000000000018 [ 32.373945] R10: 00005622f60cbc28 R11: 0000000000000246 R12: 0000000000000000 [ 32.381208] R13: 00005622f60c5180 R14: 0000000000000003 R15: 000000000000000e [ 32.388482] [ 32.390101] Allocated by task 8327: [ 32.393711] kasan_kmalloc+0xeb/0x160 [ 32.397496] kmem_cache_alloc_trace+0x131/0x3d0 [ 32.402593] nbd_dev_add+0x7c/0x800 [ 32.406218] nbd_genl_connect+0x3a4/0x1400 [ 32.410523] genl_family_rcv_msg+0x572/0xb20 [ 32.414913] genl_rcv_msg+0xaf/0x140 [ 32.418606] netlink_rcv_skb+0x125/0x390 [ 32.422669] genl_rcv+0x24/0x40 [ 32.426058] netlink_unicast+0x437/0x610 [ 32.430160] netlink_sendmsg+0x62e/0xb80 [ 32.434201] sock_sendmsg+0xb5/0x100 [ 32.437894] ___sys_sendmsg+0x6c8/0x800 [ 32.441863] __sys_sendmsg+0xa3/0x120 [ 32.445644] SyS_sendmsg+0x27/0x40 [ 32.449193] do_syscall_64+0x1d5/0x640 [ 32.453087] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 32.458253] [ 32.459882] Freed by task 8361: [ 32.463170] kasan_slab_free+0xc3/0x1a0 [ 32.467130] kfree+0xc9/0x250 [ 32.470304] nbd_put.part.0+0x100/0x140 [ 32.474256] nbd_genl_connect+0xfa9/0x1400 [ 32.478509] genl_family_rcv_msg+0x572/0xb20 [ 32.482936] genl_rcv_msg+0xaf/0x140 [ 32.486634] netlink_rcv_skb+0x125/0x390 [ 32.490694] genl_rcv+0x24/0x40 [ 32.493952] netlink_unicast+0x437/0x610 [ 32.498167] netlink_sendmsg+0x62e/0xb80 [ 32.502212] sock_sendmsg+0xb5/0x100 [ 32.505914] ___sys_sendmsg+0x6c8/0x800 [ 32.509866] __sys_sendmsg+0xa3/0x120 [ 32.513646] SyS_sendmsg+0x27/0x40 [ 32.517200] do_syscall_64+0x1d5/0x640 [ 32.521102] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 32.526277] [ 32.527886] The buggy address belongs to the object at ffff8880a989ca80 [ 32.527886] which belongs to the cache kmalloc-512 of size 512 [ 32.540527] The buggy address is located 216 bytes inside of [ 32.540527] 512-byte region [ffff8880a989ca80, ffff8880a989cc80) [ 32.552381] The buggy address belongs to the page: [ 32.557293] page:ffffea0002a62700 count:1 mapcount:0 mapping:ffff8880a989c080 index:0xffff8880a989c580 [ 32.566729] flags: 0xfff00000000100(slab) [ 32.570865] raw: 00fff00000000100 ffff8880a989c080 ffff8880a989c580 0000000100000002 [ 32.578728] raw: ffffea0002a89fa0 ffffea000297bc20 ffff88813fe80940 0000000000000000 [ 32.586597] page dumped because: kasan: bad access detected [ 32.592284] [ 32.593901] Memory state around the buggy address: [ 32.598826] ffff8880a989ca00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.606173] ffff8880a989ca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.613518] >ffff8880a989cb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.620855] ^ executing program [ 32.627092] ffff8880a989cb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.634449] ffff8880a989cc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.641802] ================================================================== [ 32.649153] Disabling lock debugging due to kernel taint [ 32.665587] Kernel panic - not syncing: panic_on_warn set ... [ 32.665587] [ 32.672995] CPU: 1 PID: 8363 Comm: systemd-udevd Tainted: G B 4.14.221-syzkaller #0 [ 32.681925] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.692922] Call Trace: [ 32.695538] dump_stack+0x1b2/0x281 [ 32.699148] panic+0x1f9/0x42d [ 32.702545] ? add_taint.cold+0x16/0x16 [ 32.706520] ? ___preempt_schedule+0x16/0x18 [ 32.710914] kasan_end_report+0x43/0x49 [ 32.714870] kasan_report_error.cold+0xa7/0x191 [ 32.719519] ? ex_handler_refcount+0x164/0x1a0 [ 32.724096] __asan_report_store4_noabort+0x68/0x70 [ 32.729119] ? ex_handler_refcount+0x164/0x1a0 [ 32.733709] ex_handler_refcount+0x164/0x1a0 [ 32.738463] ? ex_handler_clear_fs+0xb0/0xb0 [ 32.742876] fixup_exception+0x8a/0xd0 [ 32.746744] do_trap+0x61/0x250 [ 32.750028] ? do_error_trap+0x1d0/0x2d0 [ 32.754074] do_error_trap+0x132/0x2d0 [ 32.757942] ? math_error+0x2d0/0x2d0 [ 32.761725] ? flags_string.cold+0x1b15/0x6aa9 [ 32.766291] ? __mutex_lock+0x360/0x1310 [ 32.770347] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.775176] invalid_op+0x1b/0x40 [ 32.778612] RIP: 0010:flags_string.cold+0x1b15/0x6aa9 [ 32.783774] RSP: 0018:ffff8880ac217cd0 EFLAGS: 00010296 [ 32.789116] RAX: 0000000000000000 RBX: ffff8880a989cb58 RCX: ffff8880a989cb58 [ 32.796364] RDX: 0000000000000004 RSI: 0000000000000003 RDI: 0000000000000001 [ 32.803613] RBP: ffffffff89511120 R08: 0000000000000000 R09: 0000000000000002 [ 32.810884] R10: 0000000000000000 R11: ffff8880938ce540 R12: 0000000000000000 [ 32.818134] R13: ffff88808b5e7204 R14: ffffed10116bce8e R15: dffffc0000000000 [ 32.825411] nbd_release+0xf3/0x150 [ 32.829032] ? nbd_queue_rq+0xc50/0xc50 [ 32.832999] __blkdev_put+0x5aa/0x800 [ 32.836804] ? revalidate_disk+0x1f0/0x1f0 [ 32.841038] ? locks_remove_file+0x2cd/0x420 [ 32.845431] ? blkdev_put+0x75/0x4c0 [ 32.849129] ? blkdev_put+0x4c0/0x4c0 [ 32.852976] blkdev_close+0x86/0xb0 [ 32.856596] __fput+0x25f/0x7a0 [ 32.859960] task_work_run+0x11f/0x190 [ 32.863835] exit_to_usermode_loop+0x1ad/0x200 [ 32.868412] do_syscall_64+0x4a3/0x640 [ 32.872299] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 32.877477] RIP: 0033:0x7f89d6fa6270 [ 32.881172] RSP: 002b:00007ffc737fd6b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 32.888930] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007f89d6fa6270 [ 32.896194] RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007 [ 32.903546] RBP: 00007f89d7e5f710 R08: 0000000000000045 R09: 0000000000000018 [ 32.910903] R10: 00005622f60cbc28 R11: 0000000000000246 R12: 0000000000000000 [ 32.918168] R13: 00005622f60c5180 R14: 0000000000000003 R15: 000000000000000e [ 32.925959] Kernel Offset: disabled [ 32.930154] Rebooting in 86400 seconds..