[ 12.807664][ T240] ================================================================== [ 12.807943][ T240] BUG: KASAN: slab-use-after-free in emit_its_trampoline+0xa5/0x300 [ 12.808195][ T240] Read of size 1 at addr ffff88800192c720 by task modprobe/240 [ 12.808445][ T240] [ 12.808533][ T240] CPU: 2 UID: 0 PID: 240 Comm: modprobe Not tainted 6.16.0-rc2-virtme #1 PREEMPT(full) [ 12.808538][ T240] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 12.808540][ T240] Call Trace: [ 12.808542][ T240] [ 12.808543][ T240] dump_stack_lvl+0x82/0xd0 [ 12.808551][ T240] print_address_description.constprop.0+0x2c/0x400 [ 12.808558][ T240] ? emit_its_trampoline+0xa5/0x300 [ 12.808561][ T240] print_report+0xb4/0x270 [ 12.808564][ T240] ? emit_its_trampoline+0xa5/0x300 [ 12.808567][ T240] ? kasan_addr_to_slab+0x25/0x80 [ 12.808570][ T240] ? emit_its_trampoline+0xa5/0x300 [ 12.808572][ T240] kasan_report+0xca/0x100 [ 12.808576][ T240] ? emit_its_trampoline+0xa5/0x300 [ 12.808581][ T240] ? emit_its_trampoline+0xa5/0x300 [ 12.808583][ T240] __kasan_check_byte+0x3a/0x50 [ 12.808587][ T240] krealloc_noprof+0x3d/0x320 [ 12.808590][ T240] ? execmem_alloc+0xc0/0x240 [ 12.808595][ T240] emit_its_trampoline+0xa5/0x300 [ 12.808598][ T240] ? __x86_indirect_paranoid_thunk_rbx+0x2/0x2 [ 12.808604][ T240] ? __pi___x86_indirect_thunk_rdx+0x20/0x20 [ 12.808607][ T240] apply_retpolines+0xcf/0x550 [ 12.808612][ T240] ? __pfx_apply_retpolines+0x10/0x10 [ 12.808615][ T240] ? __pfx___mutex_lock+0x10/0x10 [ 12.808621][ T240] ? irqentry_exit+0x3b/0x90 [ 12.808626][ T240] ? lockdep_hardirqs_on+0x7c/0x110 [ 12.808633][ T240] module_finalize+0x3d5/0x9d0 [ 12.808639][ T240] ? add_kallsyms+0x7bf/0xf40 [ 12.808643][ T240] ? __pfx_module_finalize+0x10/0x10 [ 12.808648][ T240] ? __pfx_cmp_ex_sort+0x10/0x10 [ 12.808651][ T240] ? __pfx_swap_ex+0x10/0x10 [ 12.808655][ T240] load_module+0x139a/0x2660 [ 12.808663][ T240] ? __pfx_load_module+0x10/0x10 [ 12.808667][ T240] ? kernel_read_file+0x3f5/0x550 [ 12.808672][ T240] ? kernel_read_file+0x3d0/0x550 [ 12.808676][ T240] ? __pfx_kernel_read_file+0x10/0x10 [ 12.808679][ T240] ? add_chain_cache+0x110/0x370 [ 12.808685][ T240] ? init_module_from_file+0xe9/0x150 [ 12.808688][ T240] init_module_from_file+0xe9/0x150 [ 12.808692][ T240] ? __pfx_init_module_from_file+0x10/0x10 [ 12.808701][ T240] ? idempotent_init_module+0x31a/0x620 [ 12.808704][ T240] ? __lock_release+0x5d/0x170 [ 12.808710][ T240] ? do_raw_spin_unlock+0x58/0x220 [ 12.808714][ T240] idempotent_init_module+0x335/0x620 [ 12.808718][ T240] ? __pfx_idempotent_init_module+0x10/0x10 [ 12.808726][ T240] ? cap_capable+0x94/0x230 [ 12.808732][ T240] __x64_sys_finit_module+0xca/0x150 [ 12.808736][ T240] ? do_syscall_64+0x85/0x380 [ 12.808739][ T240] do_syscall_64+0xc1/0x380 [ 12.808743][ T240] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 12.808746][ T240] RIP: 0033:0x7f56468cae5d [ 12.808750][ T240] 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.808753][ T240] RSP: 002b:00007ffcac163988 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 12.808757][ T240] RAX: ffffffffffffffda RBX: 000055e571194960 RCX: 00007f56468cae5d [ 12.808759][ T240] RDX: 0000000000000000 RSI: 000055e56f4a6a2a RDI: 0000000000000005 [ 12.808761][ T240] RBP: 0000000000040000 R08: 0000000000000000 R09: 00007ffcac163ac0 [ 12.808763][ T240] R10: 0000000000000005 R11: 0000000000000246 R12: 000055e56f4a6a2a [ 12.808764][ T240] R13: 000055e571194b10 R14: 000055e571194db0 R15: 0000000000000000 [ 12.808771][ T240] [ 12.808772][ T240] [ 12.819380][ T240] Allocated by task 233: [ 12.819520][ T240] kasan_save_stack+0x24/0x50 [ 12.819694][ T240] kasan_save_track+0x14/0x30 [ 12.819868][ T240] __kasan_kmalloc+0x7f/0x90 [ 12.820042][ T240] __kmalloc_noprof+0x1d4/0x470 [ 12.820213][ T240] virtqueue_add_split+0x6a3/0x1920 [ 12.820388][ T240] virtqueue_add_sgs+0x143/0x270 [ 12.820559][ T240] virtio_fs_enqueue_req+0x58c/0xfe0 [ 12.820730][ T240] virtio_fs_send_req+0x13a/0x710 [ 12.820898][ T240] __fuse_simple_request+0x22a/0xb50 [ 12.821069][ T240] fuse_readlink_folio+0x20b/0x400 [ 12.821241][ T240] fuse_get_link+0x12d/0x350 [ 12.821413][ T240] pick_link+0x7a2/0x1160 [ 12.821543][ T240] step_into+0x85a/0xfc0 [ 12.821670][ T240] link_path_walk+0x3c2/0xa10 [ 12.821839][ T240] path_lookupat+0x117/0x630 [ 12.822009][ T240] filename_lookup+0x1c4/0x470 [ 12.822182][ T240] vfs_statx+0xaa/0x2e0 [ 12.822313][ T240] vfs_fstatat+0x68/0xa0 [ 12.822446][ T240] __do_sys_newfstatat+0x6a/0xc0 [ 12.822615][ T240] do_syscall_64+0xc1/0x380 [ 12.822784][ T240] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 12.822993][ T240] [ 12.823078][ T240] Freed by task 65: [ 12.823204][ T240] kasan_save_stack+0x24/0x50 [ 12.823376][ T240] kasan_save_track+0x14/0x30 [ 12.823542][ T240] kasan_save_free_info+0x3b/0x60 [ 12.823716][ T240] __kasan_slab_free+0x38/0x50 [ 12.823885][ T240] kfree+0x144/0x320 [ 12.824014][ T240] detach_buf_split+0x48d/0x6f0 [ 12.824184][ T240] virtqueue_get_buf_ctx_split+0x294/0x7f0 [ 12.824394][ T240] virtio_fs_requests_done_work+0x231/0x890 [ 12.824604][ T240] process_one_work+0xe43/0x1660 [ 12.824775][ T240] worker_thread+0x591/0xcf0 [ 12.824944][ T240] kthread+0x37b/0x600 [ 12.825074][ T240] ret_from_fork+0x243/0x320 [ 12.825245][ T240] ret_from_fork_asm+0x1a/0x30 [ 12.825416][ T240] [ 12.825500][ T240] The buggy address belongs to the object at ffff88800192c720 [ 12.825500][ T240] which belongs to the cache kmalloc-96 of size 96 [ 12.825904][ T240] The buggy address is located 0 bytes inside of [ 12.825904][ T240] freed 96-byte region [ffff88800192c720, ffff88800192c780) [ 12.826314][ T240] [ 12.826399][ T240] The buggy address belongs to the physical page: [ 12.826605][ T240] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x192c [ 12.826902][ T240] flags: 0x80000000000000(node=0|zone=1) [ 12.827076][ T240] page_type: f5(slab) [ 12.827209][ T240] raw: 0080000000000000 ffff888001042340 ffffea0000130cd0 ffffea0000049010 [ 12.827515][ T240] raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 [ 12.827816][ T240] page dumped because: kasan: bad access detected [ 12.828023][ T240] [ 12.828107][ T240] Memory state around the buggy address: [ 12.828269][ T240] ffff88800192c600: fc fc fc fc 00 00 00 00 00 00 00 00 00 fc fc fc [ 12.828518][ T240] ffff88800192c680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.828762][ T240] >ffff88800192c700: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb [ 12.829006][ T240] ^ [ 12.829169][ T240] ffff88800192c780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.829414][ T240] ffff88800192c800: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 fc [ 12.829667][ T240] ================================================================== [ 12.830027][ T240] Disabling lock debugging due to kernel taint WAIT TIMEOUT stderr Ctrl-C stderr Ctrl-C stderr WAIT TIMEOUT stderr