================================================================== BUG: KASAN: slab-out-of-bounds in init_module_from_file+0x630/0x6b0 Read of size 8 at addr ffff888043777e20 by task syz-executor.7/77222 CPU: 1 PID: 77222 Comm: syz-executor.7 Not tainted 6.4.0-next-20230630 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0x91/0xf0 print_report+0xcc/0x620 kasan_report+0xbe/0xf0 init_module_from_file+0x630/0x6b0 __x64_sys_finit_module+0xee/0x160 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 RIP: 0033:0x7fc2b414db19 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc2b16c3188 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 RAX: ffffffffffffffda RBX: 00007fc2b4260f60 RCX: 00007fc2b414db19 RDX: 0000000000000002 RSI: 0000000020000140 RDI: 0000000000000003 FAULT_INJECTION: forcing a failure. name fail_usercopy, interval 1, probability 0, space 0, times 0 RBP: 00007fc2b41a7f6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd5cbed81f R14: 00007fc2b16c3300 R15: 0000000000022000 CPU: 0 PID: 77228 Comm: syz-executor.1 Not tainted 6.4.0-next-20230630 #1 Allocated by task 103: Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 kasan_save_stack+0x22/0x50 Call Trace: kasan_set_track+0x25/0x30 __kasan_slab_alloc+0x59/0x70 dump_stack_lvl+0xc1/0xf0 kmem_cache_alloc+0x16b/0x370 should_fail_ex+0x4b4/0x5b0 getname_flags.part.0+0x50/0x4f0 _copy_to_user+0x30/0xc0 getname+0x92/0xe0 simple_read_from_buffer+0xd0/0x170 do_sys_openat2+0xec/0x1d0 proc_fail_nth_read+0x1a2/0x240 __x64_sys_openat+0x143/0x200 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 vfs_read+0x1de/0x8f0 Freed by task 103: kasan_save_stack+0x22/0x50 kasan_set_track+0x25/0x30 kasan_save_free_info+0x2b/0x50 ksys_read+0x122/0x250 __kasan_slab_free+0x10a/0x190 kmem_cache_free+0x10d/0x4d0 putname+0x102/0x140 do_syscall_64+0x3f/0x90 do_sys_openat2+0x14a/0x1d0 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 __x64_sys_openat+0x143/0x200 RIP: 0033:0x7fed84d1169c do_syscall_64+0x3f/0x90 Code: ec 28 48 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 fc ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 34 44 89 c7 48 89 44 24 08 e8 2f fd ff ff 48 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 RSP: 002b:00007fed822d4170 EFLAGS: 00000246 The buggy address belongs to the object at ffff888043776600 which belongs to the cache names_cache of size 4096 ORIG_RAX: 0000000000000000 The buggy address is located 2080 bytes to the right of allocated 4096-byte region [ffff888043776600, ffff888043777600) RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fed84d1169c The buggy address belongs to the physical page: RDX: 000000000000000f RSI: 00007fed822d41e0 RDI: 0000000000000004 page:0000000076819d8c refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x43770 RBP: 00007fed822d41d0 R08: 0000000000000000 R09: 0000000000000000 head:0000000076819d8c order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 anon flags: 0x100000000010200(slab|head|node=0|zone=1) R13: 00007ffca24a976f R14: 00007fed822d4300 R15: 0000000000022000 page_type: 0xffffffff() raw: 0100000000010200 ffff8880087ba3c0 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888043777d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888043777d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888043777e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888043777e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888043777f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: ec in (%dx),%al 1: 28 48 89 sub %cl,-0x77(%rax) 4: 54 push %rsp 5: 24 18 and $0x18,%al 7: 48 89 74 24 10 mov %rsi,0x10(%rsp) c: 89 7c 24 08 mov %edi,0x8(%rsp) 10: e8 f9 fc ff ff callq 0xfffffd0e 15: 48 8b 54 24 18 mov 0x18(%rsp),%rdx 1a: 48 8b 74 24 10 mov 0x10(%rsp),%rsi 1f: 41 89 c0 mov %eax,%r8d 22: 8b 7c 24 08 mov 0x8(%rsp),%edi 26: 31 c0 xor %eax,%eax 28: 0f 05 syscall * 2a: 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax <-- trapping instruction 30: 77 34 ja 0x66 32: 44 89 c7 mov %r8d,%edi 35: 48 89 44 24 08 mov %rax,0x8(%rsp) 3a: e8 2f fd ff ff callq 0xfffffd6e 3f: 48 rex.W