[ 13.930121][ T248] ================================================================== [ 13.930421][ T248] BUG: KASAN: slab-use-after-free in emit_its_trampoline+0xa5/0x300 [ 13.930685][ T248] Read of size 1 at addr ffff88800192c720 by task modprobe/248 [ 13.930959][ T248] [ 13.931060][ T248] CPU: 0 UID: 0 PID: 248 Comm: modprobe Not tainted 6.16.0-rc2-virtme #1 PREEMPT(full) [ 13.931065][ T248] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 13.931067][ T248] Call Trace: [ 13.931069][ T248] [ 13.931071][ T248] dump_stack_lvl+0x82/0xd0 [ 13.931082][ T248] print_address_description.constprop.0+0x2c/0x400 [ 13.931091][ T248] ? emit_its_trampoline+0xa5/0x300 [ 13.931094][ T248] print_report+0xb4/0x270 [ 13.931097][ T248] ? emit_its_trampoline+0xa5/0x300 [ 13.931099][ T248] ? kasan_addr_to_slab+0x25/0x80 [ 13.931102][ T248] ? emit_its_trampoline+0xa5/0x300 [ 13.931105][ T248] kasan_report+0xca/0x100 [ 13.931109][ T248] ? emit_its_trampoline+0xa5/0x300 [ 13.931113][ T248] ? emit_its_trampoline+0xa5/0x300 [ 13.931116][ T248] __kasan_check_byte+0x3a/0x50 [ 13.931119][ T248] krealloc_noprof+0x3d/0x320 [ 13.931124][ T248] ? execmem_alloc+0xc0/0x240 [ 13.931131][ T248] emit_its_trampoline+0xa5/0x300 [ 13.931133][ T248] ? __x86_indirect_paranoid_thunk_rbx+0x2/0x2 [ 13.931141][ T248] ? __pi___x86_indirect_thunk_rdx+0x20/0x20 [ 13.931145][ T248] apply_retpolines+0xcf/0x550 [ 13.931150][ T248] ? __pfx_apply_retpolines+0x10/0x10 [ 13.931153][ T248] ? __pfx___mutex_lock+0x10/0x10 [ 13.931163][ T248] module_finalize+0x3d5/0x9d0 [ 13.931172][ T248] ? add_kallsyms+0x7bf/0xf40 [ 13.931178][ T248] ? __pfx_module_finalize+0x10/0x10 [ 13.931183][ T248] ? __pfx_cmp_ex_sort+0x10/0x10 [ 13.931186][ T248] ? __pfx_swap_ex+0x10/0x10 [ 13.931191][ T248] load_module+0x139a/0x2660 [ 13.931200][ T248] ? __pfx_load_module+0x10/0x10 [ 13.931203][ T248] ? kernel_read_file+0x3f5/0x550 [ 13.931210][ T248] ? kernel_read_file+0x3d0/0x550 [ 13.931214][ T248] ? __pfx_kernel_read_file+0x10/0x10 [ 13.931217][ T248] ? add_chain_cache+0x110/0x370 [ 13.931224][ T248] ? init_module_from_file+0xe9/0x150 [ 13.931227][ T248] init_module_from_file+0xe9/0x150 [ 13.931231][ T248] ? __pfx_init_module_from_file+0x10/0x10 [ 13.931240][ T248] ? idempotent_init_module+0x31a/0x620 [ 13.931243][ T248] ? __lock_release+0x5d/0x170 [ 13.931249][ T248] ? do_raw_spin_unlock+0x58/0x220 [ 13.931253][ T248] idempotent_init_module+0x335/0x620 [ 13.931258][ T248] ? __pfx_idempotent_init_module+0x10/0x10 [ 13.931265][ T248] ? cap_capable+0x94/0x230 [ 13.931274][ T248] __x64_sys_finit_module+0xca/0x150 [ 13.931277][ T248] ? do_syscall_64+0x85/0x380 [ 13.931282][ T248] do_syscall_64+0xc1/0x380 [ 13.931285][ T248] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 13.931290][ T248] RIP: 0033:0x7f252b0f1e5d [ 13.931294][ T248] 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 [ 13.931297][ T248] RSP: 002b:00007ffe23c94348 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 13.931301][ T248] RAX: ffffffffffffffda RBX: 000055e57e83b960 RCX: 00007f252b0f1e5d [ 13.931303][ T248] RDX: 0000000000000000 RSI: 000055e5744c1a2a RDI: 0000000000000005 [ 13.931305][ T248] RBP: 0000000000040000 R08: 0000000000000000 R09: 00007ffe23c94480 [ 13.931307][ T248] R10: 0000000000000005 R11: 0000000000000246 R12: 000055e5744c1a2a [ 13.931308][ T248] R13: 000055e57e83bb10 R14: 000055e57e83bdb0 R15: 0000000000000000 [ 13.931315][ T248] [ 13.931316][ T248] [ 13.942487][ T248] Allocated by task 239: [ 13.942629][ T248] kasan_save_stack+0x24/0x50 [ 13.942828][ T248] kasan_save_track+0x14/0x30 [ 13.943019][ T248] __kasan_kmalloc+0x7f/0x90 [ 13.943214][ T248] __kmalloc_noprof+0x1d4/0x470 [ 13.943405][ T248] virtqueue_add_split+0x6a3/0x1920 [ 13.943603][ T248] virtqueue_add_sgs+0x143/0x270 [ 13.943801][ T248] virtio_fs_enqueue_req+0x58c/0xfe0 [ 13.943996][ T248] virtio_fs_send_req+0x13a/0x710 [ 13.944191][ T248] __fuse_simple_request+0x22a/0xb50 [ 13.944384][ T248] fuse_flush+0x41a/0x620 [ 13.944533][ T248] ovl_flush+0x110/0x170 [ 13.944679][ T248] filp_flush+0xe9/0x170 [ 13.944827][ T248] filp_close+0x14/0x30 [ 13.944975][ T248] put_files_struct.part.0+0x11f/0x2a0 [ 13.945170][ T248] do_exit+0x4f9/0xe90 [ 13.945319][ T248] do_group_exit+0xb8/0x260 [ 13.945513][ T248] __x64_sys_exit_group+0x3e/0x50 [ 13.945706][ T248] x64_sys_call+0xf76/0x18a0 [ 13.945899][ T248] do_syscall_64+0xc1/0x380 [ 13.946091][ T248] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 13.946334][ T248] [ 13.946437][ T248] Freed by task 56: [ 13.946580][ T248] kasan_save_stack+0x24/0x50 [ 13.946778][ T248] kasan_save_track+0x14/0x30 [ 13.946971][ T248] kasan_save_free_info+0x3b/0x60 [ 13.947161][ T248] __kasan_slab_free+0x38/0x50 [ 13.947348][ T248] kfree+0x144/0x320 [ 13.947490][ T248] detach_buf_split+0x48d/0x6f0 [ 13.947679][ T248] virtqueue_get_buf_ctx_split+0x294/0x7f0 [ 13.947916][ T248] virtio_fs_requests_done_work+0x231/0x890 [ 13.948150][ T248] process_one_work+0xe43/0x1660 [ 13.948342][ T248] worker_thread+0x591/0xcf0 [ 13.948534][ T248] kthread+0x37b/0x600 [ 13.948680][ T248] ret_from_fork+0x243/0x320 [ 13.948873][ T248] ret_from_fork_asm+0x1a/0x30 [ 13.949064][ T248] [ 13.949162][ T248] The buggy address belongs to the object at ffff88800192c720 [ 13.949162][ T248] which belongs to the cache kmalloc-96 of size 96 [ 13.949626][ T248] The buggy address is located 0 bytes inside of [ 13.949626][ T248] freed 96-byte region [ffff88800192c720, ffff88800192c780) [ 13.950090][ T248] [ 13.950188][ T248] The buggy address belongs to the physical page: [ 13.950421][ T248] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x192c [ 13.950764][ T248] flags: 0x80000000000000(node=0|zone=1) [ 13.950970][ T248] page_type: f5(slab) [ 13.951121][ T248] raw: 0080000000000000 ffff888001042340 ffffea000025b7d0 ffffea00000a0490 [ 13.951464][ T248] raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 [ 13.951804][ T248] page dumped because: kasan: bad access detected [ 13.952045][ T248] [ 13.952153][ T248] Memory state around the buggy address: [ 13.952342][ T248] ffff88800192c600: fc fc fc fc 00 00 00 00 00 00 00 00 00 fc fc fc [ 13.952627][ T248] ffff88800192c680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.952906][ T248] >ffff88800192c700: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb [ 13.953198][ T248] ^ [ 13.953384][ T248] ffff88800192c780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.953662][ T248] ffff88800192c800: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 fc [ 13.953939][ T248] ================================================================== [ 13.954343][ T248] Disabling lock debugging due to kernel taint WAIT TIMEOUT stderr Ctrl-C stderr Ctrl-C stderr WAIT TIMEOUT stderr