loop0: detected capacity change from 0 to 2048 EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none. ================================================================== BUG: KASAN: slab-use-after-free in ext4_read_inline_data fs/ext4/inline.c:209 [inline] BUG: KASAN: slab-use-after-free in ext4_convert_inline_data_nolock+0x316/0xd80 fs/ext4/inline.c:1213 Read of size 20 at addr ffff8880220ef1a3 by task syz-executor.0/5441 CPU: 1 PID: 5441 Comm: syz-executor.0 Not tainted 6.4.0-rc3-syzkaller-g5fe326b44676 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x15f/0x540 mm/kasan/report.c:462 kasan_report+0x172/0x1a0 mm/kasan/report.c:572 kasan_check_range+0x27f/0x290 mm/kasan/generic.c:187 __asan_memcpy+0x25/0x60 mm/kasan/shadow.c:105 ext4_read_inline_data fs/ext4/inline.c:209 [inline] ext4_convert_inline_data_nolock+0x316/0xd80 fs/ext4/inline.c:1213 ext4_convert_inline_data+0x4d6/0x620 fs/ext4/inline.c:2074 ext4_fallocate+0x14a/0x1ff0 fs/ext4/extents.c:4708 vfs_fallocate+0x547/0x6b0 fs/open.c:324 ksys_fallocate fs/open.c:347 [inline] __do_sys_fallocate fs/open.c:355 [inline] __se_sys_fallocate fs/open.c:353 [inline] __x64_sys_fallocate+0xb9/0x100 fs/open.c:353 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f89aa08c169 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f89aaea9168 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f89aa1abf80 RCX: 00007f89aa08c169 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007f89aa0e7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000008000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd28d13a4f R14: 00007f89aaea9300 R15: 0000000000022000 Allocated by task 5404: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x62/0x70 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook+0x68/0x3a0 mm/slab.h:711 slab_alloc_node mm/slub.c:3451 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x117/0x2d0 mm/slub.c:3475 getname_flags+0xb8/0x4e0 fs/namei.c:140 do_sys_openat2+0xd2/0x500 fs/open.c:1350 do_sys_open fs/open.c:1372 [inline] __do_sys_openat fs/open.c:1388 [inline] __se_sys_openat fs/open.c:1383 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1383 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5404: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:521 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook mm/slub.c:1807 [inline] slab_free mm/slub.c:3786 [inline] kmem_cache_free+0x28f/0x510 mm/slub.c:3808 do_sys_openat2+0x42b/0x500 fs/open.c:1365 do_sys_open fs/open.c:1372 [inline] __do_sys_openat fs/open.c:1388 [inline] __se_sys_openat fs/open.c:1383 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1383 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880220ee600 which belongs to the cache names_cache of size 4096 The buggy address is located 2979 bytes inside of freed 4096-byte region [ffff8880220ee600, ffff8880220ef600) The buggy address belongs to the physical page: page:ffffea0000883a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x220e8 head:ffffea0000883a00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff888140008780 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5402, tgid 5402 (modprobe), ts 79885870701, free_ts 79061790012 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1d2/0x1f0 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0x31f8/0x3370 mm/page_alloc.c:3502 __alloc_pages+0x251/0x660 mm/page_alloc.c:4768 alloc_slab_page+0x6a/0x150 mm/slub.c:1851 allocate_slab mm/slub.c:1998 [inline] new_slab+0x84/0x2d0 mm/slub.c:2051 ___slab_alloc+0xa71/0x1080 mm/slub.c:3192 __slab_alloc mm/slub.c:3291 [inline] __slab_alloc_node mm/slub.c:3344 [inline] slab_alloc_node mm/slub.c:3441 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x1b1/0x2d0 mm/slub.c:3475 getname_flags+0xb8/0x4e0 fs/namei.c:140 user_path_at_empty+0x2a/0x180 fs/namei.c:2906 user_path_at include/linux/namei.h:57 [inline] __do_sys_chdir fs/open.c:551 [inline] __se_sys_chdir+0xbb/0x220 fs/open.c:545 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x8ee/0xa10 mm/page_alloc.c:2564 free_unref_page+0x33/0x3f0 mm/page_alloc.c:2659 discard_slab mm/slub.c:2097 [inline] __unfreeze_partials+0x1b1/0x1f0 mm/slub.c:2636 put_cpu_partial+0x116/0x180 mm/slub.c:2712 qlist_free_all+0x22/0x60 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x147/0x160 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook+0x68/0x3a0 mm/slab.h:711 slab_alloc_node mm/slub.c:3451 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x117/0x2d0 mm/slub.c:3475 getname_flags+0xb8/0x4e0 fs/namei.c:140 vfs_fstatat fs/stat.c:275 [inline] __do_sys_newfstatat fs/stat.c:446 [inline] __se_sys_newfstatat fs/stat.c:440 [inline] __x64_sys_newfstatat+0x12a/0x1d0 fs/stat.c:440 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff8880220ef080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880220ef100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880220ef180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880220ef200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880220ef280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================