[ 12.630995][ T236] ================================================================== [ 12.631270][ T236] BUG: KASAN: slab-use-after-free in emit_its_trampoline+0xa5/0x300 [ 12.631517][ T236] Read of size 1 at addr ffff88800192c720 by task modprobe/236 [ 12.631764][ T236] [ 12.631853][ T236] CPU: 2 UID: 0 PID: 236 Comm: modprobe Not tainted 6.16.0-rc2-virtme #1 PREEMPT(full) [ 12.631857][ T236] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 12.631859][ T236] Call Trace: [ 12.631861][ T236] [ 12.631863][ T236] dump_stack_lvl+0x82/0xd0 [ 12.631871][ T236] print_address_description.constprop.0+0x2c/0x400 [ 12.631887][ T236] ? emit_its_trampoline+0xa5/0x300 [ 12.631890][ T236] print_report+0xb4/0x270 [ 12.631894][ T236] ? emit_its_trampoline+0xa5/0x300 [ 12.631896][ T236] ? kasan_addr_to_slab+0x25/0x80 [ 12.631899][ T236] ? emit_its_trampoline+0xa5/0x300 [ 12.631901][ T236] kasan_report+0xca/0x100 [ 12.631905][ T236] ? emit_its_trampoline+0xa5/0x300 [ 12.631909][ T236] ? emit_its_trampoline+0xa5/0x300 [ 12.631911][ T236] __kasan_check_byte+0x3a/0x50 [ 12.631915][ T236] krealloc_noprof+0x3d/0x320 [ 12.631918][ T236] ? execmem_alloc+0xc0/0x240 [ 12.631923][ T236] emit_its_trampoline+0xa5/0x300 [ 12.631926][ T236] ? __x86_indirect_paranoid_thunk_rbx+0x2/0x2 [ 12.631932][ T236] ? __pi___x86_indirect_thunk_rdx+0x20/0x20 [ 12.631935][ T236] apply_retpolines+0xcf/0x550 [ 12.631939][ T236] ? __pfx_apply_retpolines+0x10/0x10 [ 12.631942][ T236] ? __pfx___mutex_lock+0x10/0x10 [ 12.631952][ T236] module_finalize+0x3d5/0x9d0 [ 12.631959][ T236] ? add_kallsyms+0x7bf/0xf40 [ 12.631963][ T236] ? __pfx_module_finalize+0x10/0x10 [ 12.631967][ T236] ? __pfx_cmp_ex_sort+0x10/0x10 [ 12.631970][ T236] ? __pfx_swap_ex+0x10/0x10 [ 12.631974][ T236] load_module+0x139a/0x2660 [ 12.631982][ T236] ? __pfx_load_module+0x10/0x10 [ 12.631986][ T236] ? kernel_read_file+0x3f5/0x550 [ 12.631991][ T236] ? kernel_read_file+0x3d0/0x550 [ 12.631995][ T236] ? __pfx_kernel_read_file+0x10/0x10 [ 12.631998][ T236] ? add_chain_cache+0x110/0x370 [ 12.632003][ T236] ? init_module_from_file+0xe9/0x150 [ 12.632007][ T236] init_module_from_file+0xe9/0x150 [ 12.632011][ T236] ? __pfx_init_module_from_file+0x10/0x10 [ 12.632019][ T236] ? idempotent_init_module+0x31a/0x620 [ 12.632023][ T236] ? __lock_release+0x5d/0x170 [ 12.632028][ T236] ? do_raw_spin_unlock+0x58/0x220 [ 12.632031][ T236] idempotent_init_module+0x335/0x620 [ 12.632036][ T236] ? __pfx_idempotent_init_module+0x10/0x10 [ 12.632043][ T236] ? cap_capable+0x94/0x230 [ 12.632050][ T236] __x64_sys_finit_module+0xca/0x150 [ 12.632054][ T236] ? do_syscall_64+0x85/0x380 [ 12.632057][ T236] do_syscall_64+0xc1/0x380 [ 12.632060][ T236] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 12.632064][ T236] RIP: 0033:0x7f5ffae24e5d [ 12.632068][ T236] 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.632071][ T236] RSP: 002b:00007ffff8e00248 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 12.632075][ T236] RAX: ffffffffffffffda RBX: 0000559f55907960 RCX: 00007f5ffae24e5d [ 12.632077][ T236] RDX: 0000000000000000 RSI: 0000559f3297fa2a RDI: 0000000000000005 [ 12.632078][ T236] RBP: 0000000000040000 R08: 0000000000000000 R09: 00007ffff8e00380 [ 12.632080][ T236] R10: 0000000000000005 R11: 0000000000000246 R12: 0000559f3297fa2a [ 12.632082][ T236] R13: 0000559f55907b10 R14: 0000559f55907db0 R15: 0000000000000000 [ 12.632088][ T236] [ 12.632089][ T236] [ 12.642190][ T236] Allocated by task 227: [ 12.642318][ T236] kasan_save_stack+0x24/0x50 [ 12.642493][ T236] kasan_save_track+0x14/0x30 [ 12.642664][ T236] __kasan_kmalloc+0x7f/0x90 [ 12.642833][ T236] __kmalloc_noprof+0x1d4/0x470 [ 12.643003][ T236] virtqueue_add_split+0x6a3/0x1920 [ 12.643174][ T236] virtqueue_add_sgs+0x143/0x270 [ 12.643368][ T236] virtio_fs_enqueue_req+0x58c/0xfe0 [ 12.643537][ T236] virtio_fs_send_req+0x13a/0x710 [ 12.643704][ T236] __fuse_simple_request+0x22a/0xb50 [ 12.643875][ T236] fuse_readlink_folio+0x20b/0x400 [ 12.644045][ T236] fuse_get_link+0x12d/0x350 [ 12.644214][ T236] pick_link+0x7a2/0x1160 [ 12.644341][ T236] step_into+0x85a/0xfc0 [ 12.644467][ T236] link_path_walk+0x3c2/0xa10 [ 12.644645][ T236] path_openat+0x14d/0x380 [ 12.644808][ T236] do_filp_open+0x1d7/0x420 [ 12.644975][ T236] do_sys_openat2+0xd4/0x160 [ 12.645138][ T236] __x64_sys_openat+0x122/0x1e0 [ 12.645302][ T236] do_syscall_64+0xc1/0x380 [ 12.645466][ T236] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 12.645690][ T236] [ 12.645775][ T236] Freed by task 67: [ 12.645900][ T236] kasan_save_stack+0x24/0x50 [ 12.646069][ T236] kasan_save_track+0x14/0x30 [ 12.646235][ T236] kasan_save_free_info+0x3b/0x60 [ 12.646408][ T236] __kasan_slab_free+0x38/0x50 [ 12.646577][ T236] kfree+0x144/0x320 [ 12.646705][ T236] detach_buf_split+0x48d/0x6f0 [ 12.646879][ T236] virtqueue_get_buf_ctx_split+0x294/0x7f0 [ 12.647083][ T236] virtio_fs_requests_done_work+0x231/0x890 [ 12.647286][ T236] process_one_work+0xe43/0x1660 [ 12.647450][ T236] worker_thread+0x591/0xcf0 [ 12.647615][ T236] kthread+0x37b/0x600 [ 12.647741][ T236] ret_from_fork+0x243/0x320 [ 12.647921][ T236] ret_from_fork_asm+0x1a/0x30 [ 12.648089][ T236] [ 12.648173][ T236] The buggy address belongs to the object at ffff88800192c720 [ 12.648173][ T236] which belongs to the cache kmalloc-96 of size 96 [ 12.648575][ T236] The buggy address is located 0 bytes inside of [ 12.648575][ T236] freed 96-byte region [ffff88800192c720, ffff88800192c780) [ 12.648980][ T236] [ 12.649064][ T236] The buggy address belongs to the physical page: [ 12.649273][ T236] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x192c [ 12.649562][ T236] flags: 0x80000000000000(node=0|zone=1) [ 12.649730][ T236] page_type: f5(slab) [ 12.649881][ T236] raw: 0080000000000000 ffff888001042340 ffffea0000042fd0 ffffea0000083250 [ 12.650183][ T236] raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 [ 12.650481][ T236] page dumped because: kasan: bad access detected [ 12.650693][ T236] [ 12.650776][ T236] Memory state around the buggy address: [ 12.650939][ T236] ffff88800192c600: fc fc fc fc 00 00 00 00 00 00 00 00 00 fc fc fc [ 12.651189][ T236] ffff88800192c680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.651432][ T236] >ffff88800192c700: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb [ 12.651677][ T236] ^ [ 12.651850][ T236] ffff88800192c780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.652090][ T236] ffff88800192c800: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 fc [ 12.652327][ T236] ================================================================== [ 12.652607][ T236] Disabling lock debugging due to kernel taint WAIT TIMEOUT stderr Ctrl-C stderr Ctrl-C stderr WAIT TIMEOUT stderr