[ 12.601612][ T235] ================================================================== [ 12.601905][ T235] BUG: KASAN: slab-use-after-free in emit_its_trampoline+0xa5/0x300 [ 12.602158][ T235] Read of size 1 at addr ffff88800192c720 by task modprobe/235 [ 12.602408][ T235] [ 12.602495][ T235] CPU: 2 UID: 0 PID: 235 Comm: modprobe Not tainted 6.16.0-rc2-virtme #1 PREEMPT(full) [ 12.602500][ T235] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 12.602501][ T235] Call Trace: [ 12.602503][ T235] [ 12.602505][ T235] dump_stack_lvl+0x82/0xd0 [ 12.602513][ T235] print_address_description.constprop.0+0x2c/0x400 [ 12.602518][ T235] ? emit_its_trampoline+0xa5/0x300 [ 12.602521][ T235] print_report+0xb4/0x270 [ 12.602524][ T235] ? emit_its_trampoline+0xa5/0x300 [ 12.602526][ T235] ? kasan_addr_to_slab+0x25/0x80 [ 12.602529][ T235] ? emit_its_trampoline+0xa5/0x300 [ 12.602531][ T235] kasan_report+0xca/0x100 [ 12.602535][ T235] ? emit_its_trampoline+0xa5/0x300 [ 12.602539][ T235] ? emit_its_trampoline+0xa5/0x300 [ 12.602541][ T235] __kasan_check_byte+0x3a/0x50 [ 12.602544][ T235] krealloc_noprof+0x3d/0x320 [ 12.602548][ T235] ? execmem_alloc+0xc0/0x240 [ 12.602553][ T235] emit_its_trampoline+0xa5/0x300 [ 12.602555][ T235] ? __x86_indirect_paranoid_thunk_rbx+0x2/0x2 [ 12.602562][ T235] ? __pi___x86_indirect_thunk_rdx+0x20/0x20 [ 12.602566][ T235] apply_retpolines+0xcf/0x550 [ 12.602570][ T235] ? __pfx_apply_retpolines+0x10/0x10 [ 12.602573][ T235] ? __pfx___mutex_lock+0x10/0x10 [ 12.602582][ T235] module_finalize+0x3d5/0x9d0 [ 12.602588][ T235] ? add_kallsyms+0x7bf/0xf40 [ 12.602593][ T235] ? __pfx_module_finalize+0x10/0x10 [ 12.602597][ T235] ? __pfx_cmp_ex_sort+0x10/0x10 [ 12.602600][ T235] ? __pfx_swap_ex+0x10/0x10 [ 12.602604][ T235] load_module+0x139a/0x2660 [ 12.602612][ T235] ? __pfx_load_module+0x10/0x10 [ 12.602615][ T235] ? kernel_read_file+0x3f5/0x550 [ 12.602620][ T235] ? kernel_read_file+0x3d0/0x550 [ 12.602623][ T235] ? __pfx_kernel_read_file+0x10/0x10 [ 12.602626][ T235] ? add_chain_cache+0x110/0x370 [ 12.602632][ T235] ? init_module_from_file+0xe9/0x150 [ 12.602635][ T235] init_module_from_file+0xe9/0x150 [ 12.602638][ T235] ? __pfx_init_module_from_file+0x10/0x10 [ 12.602646][ T235] ? idempotent_init_module+0x31a/0x620 [ 12.602650][ T235] ? __lock_release+0x5d/0x170 [ 12.602654][ T235] ? do_raw_spin_unlock+0x58/0x220 [ 12.602658][ T235] idempotent_init_module+0x335/0x620 [ 12.602662][ T235] ? __pfx_idempotent_init_module+0x10/0x10 [ 12.602670][ T235] ? cap_capable+0x94/0x230 [ 12.602676][ T235] __x64_sys_finit_module+0xca/0x150 [ 12.602679][ T235] ? do_syscall_64+0x85/0x380 [ 12.602683][ T235] do_syscall_64+0xc1/0x380 [ 12.602686][ T235] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 12.602689][ T235] RIP: 0033:0x7f2510e6ce5d [ 12.602693][ T235] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 73 9f 1b 00 f7 d8 64 89 01 48 [ 12.602695][ T235] RSP: 002b:00007ffc327172e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 12.602699][ T235] RAX: ffffffffffffffda RBX: 000055db4b9e0960 RCX: 00007f2510e6ce5d [ 12.602701][ T235] RDX: 0000000000000000 RSI: 000055db0efa1a2a RDI: 0000000000000005 [ 12.602702][ T235] RBP: 0000000000040000 R08: 0000000000000000 R09: 00007ffc32717420 [ 12.602704][ T235] R10: 0000000000000005 R11: 0000000000000246 R12: 000055db0efa1a2a [ 12.602706][ T235] R13: 000055db4b9e0b10 R14: 000055db4b9e0db0 R15: 0000000000000000 [ 12.602711][ T235] [ 12.602713][ T235] [ 12.613403][ T235] Allocated by task 211: [ 12.613535][ T235] kasan_save_stack+0x24/0x50 [ 12.613715][ T235] kasan_save_track+0x14/0x30 [ 12.613895][ T235] __kasan_kmalloc+0x7f/0x90 [ 12.614073][ T235] __kmalloc_noprof+0x1d4/0x470 [ 12.614251][ T235] virtqueue_add_split+0x6a3/0x1920 [ 12.614429][ T235] virtqueue_add_sgs+0x143/0x270 [ 12.614607][ T235] virtio_fs_enqueue_req+0x58c/0xfe0 [ 12.614898][ T235] virtio_fs_send_req+0x13a/0x710 [ 12.615081][ T235] __fuse_simple_request+0x22a/0xb50 [ 12.615260][ T235] fuse_readlink_folio+0x20b/0x400 [ 12.615439][ T235] fuse_get_link+0x12d/0x350 [ 12.615619][ T235] pick_link+0x7a2/0x1160 [ 12.615766][ T235] step_into+0x85a/0xfc0 [ 12.615894][ T235] link_path_walk+0x3c2/0xa10 [ 12.616065][ T235] path_openat+0x14d/0x380 [ 12.616237][ T235] do_filp_open+0x1d7/0x420 [ 12.616424][ T235] do_sys_openat2+0xd4/0x160 [ 12.616606][ T235] __x64_sys_openat+0x122/0x1e0 [ 12.616781][ T235] do_syscall_64+0xc1/0x380 [ 12.616957][ T235] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 12.617176][ T235] [ 12.617265][ T235] Freed by task 51: [ 12.617395][ T235] kasan_save_stack+0x24/0x50 [ 12.617574][ T235] kasan_save_track+0x14/0x30 [ 12.617758][ T235] kasan_save_free_info+0x3b/0x60 [ 12.617930][ T235] __kasan_slab_free+0x38/0x50 [ 12.618103][ T235] kfree+0x144/0x320 [ 12.618232][ T235] detach_buf_split+0x48d/0x6f0 [ 12.618406][ T235] virtqueue_get_buf_ctx_split+0x294/0x7f0 [ 12.618621][ T235] virtio_fs_requests_done_work+0x231/0x890 [ 12.618834][ T235] process_one_work+0xe43/0x1660 [ 12.619009][ T235] worker_thread+0x591/0xcf0 [ 12.619179][ T235] kthread+0x37b/0x600 [ 12.619313][ T235] ret_from_fork+0x243/0x320 [ 12.619486][ T235] ret_from_fork_asm+0x1a/0x30 [ 12.619659][ T235] [ 12.619746][ T235] The buggy address belongs to the object at ffff88800192c720 [ 12.619746][ T235] which belongs to the cache kmalloc-96 of size 96 [ 12.620154][ T235] The buggy address is located 0 bytes inside of [ 12.620154][ T235] freed 96-byte region [ffff88800192c720, ffff88800192c780) [ 12.620599][ T235] [ 12.620687][ T235] The buggy address belongs to the physical page: [ 12.620901][ T235] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88800192cb20 pfn:0x192c [ 12.621258][ T235] flags: 0x80000000000200(workingset|node=0|zone=1) [ 12.621485][ T235] page_type: f5(slab) [ 12.621624][ T235] raw: 0080000000000200 ffff888001042340 ffffea00000951d0 ffffea0000139310 [ 12.621946][ T235] raw: ffff88800192cb20 000000000010000d 00000000f5000000 0000000000000000 [ 12.622249][ T235] page dumped because: kasan: bad access detected [ 12.622462][ T235] [ 12.622547][ T235] Memory state around the buggy address: [ 12.622712][ T235] ffff88800192c600: fc fc fc fc 00 00 00 00 00 00 00 00 00 fc fc fc [ 12.622976][ T235] ffff88800192c680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.623226][ T235] >ffff88800192c700: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb [ 12.623476][ T235] ^ [ 12.623641][ T235] ffff88800192c780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.623889][ T235] ffff88800192c800: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 fc [ 12.624142][ T235] ================================================================== [ 12.624456][ T235] Disabling lock debugging due to kernel taint WAIT TIMEOUT stderr Ctrl-C stderr Ctrl-C stderr WAIT TIMEOUT stderr