loop0: detected capacity change from 0 to 1024 EXT4-fs (loop0): Test dummy encryption mode enabled EXT4-fs (loop0): stripe (7) is not aligned with cluster size (16), stripe is disabled EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback. fscrypt: AES-256-CBC-CTS using implementation "cts-cbc-aes-aesni" loop0: detected capacity change from 1024 to 767 ================================================================== BUG: KASAN: slab-out-of-bounds in ext4_search_dir+0xf1/0x1b0 fs/ext4/namei.c:1469 Read of size 1 at addr ffff8880524cd6aa by task syz.0.0/5340 CPU: 0 UID: 0 PID: 5340 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 ext4_search_dir+0xf1/0x1b0 fs/ext4/namei.c:1469 ext4_find_inline_entry+0x492/0x5f0 fs/ext4/inline.c:1621 __ext4_find_entry+0x2fd/0x1f20 fs/ext4/namei.c:1542 ext4_lookup_entry fs/ext4/namei.c:1703 [inline] ext4_lookup+0x13d/0x6c0 fs/ext4/namei.c:1771 lookup_open fs/namei.c:3774 [inline] open_last_lookups fs/namei.c:3895 [inline] path_openat+0x1101/0x3830 fs/namei.c:4131 do_filp_open+0x1fa/0x410 fs/namei.c:4161 do_sys_openat2+0x121/0x1c0 fs/open.c:1435 do_sys_open fs/open.c:1450 [inline] __do_sys_creat fs/open.c:1528 [inline] __se_sys_creat fs/open.c:1522 [inline] __x64_sys_creat+0x8f/0xc0 fs/open.c:1522 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fa6e0b8eec9 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fa6e19bd038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007fa6e0de5fa0 RCX: 00007fa6e0b8eec9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000200000000100 RBP: 00007fa6e0c11f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fa6e0de6038 R14: 00007fa6e0de5fa0 R15: 00007ffc0ccd3ae8 The buggy address belongs to the object at ffff8880524cc000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1706 bytes to the right of allocated 4096-byte region [ffff8880524cc000, ffff8880524cd000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x524c8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000040 ffff88801a042140 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000 head: 04fff00000000040 ffff88801a042140 dead000000000122 0000000000000000 head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000 head: 04fff00000000003 ffffea0001493201 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4728, tgid 4728 (udevd), ts 85381185114, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2492 [inline] allocate_slab+0x8a/0x370 mm/slub.c:2660 new_slab mm/slub.c:2714 [inline] ___slab_alloc+0xbeb/0x1420 mm/slub.c:3901 __slab_alloc mm/slub.c:3992 [inline] __slab_alloc_node mm/slub.c:4067 [inline] slab_alloc_node mm/slub.c:4228 [inline] __do_kmalloc_node mm/slub.c:4375 [inline] __kmalloc_noprof+0x305/0x4f0 mm/slub.c:4388 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xe3/0x5d0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x1c1/0x3b0 security/tomoyo/file.c:771 security_file_open+0xb1/0x270 security/security.c:3183 do_dentry_open+0x384/0x13f0 fs/open.c:942 vfs_open+0x3b/0x340 fs/open.c:1095 do_open fs/namei.c:3975 [inline] path_openat+0x2ee5/0x3830 fs/namei.c:4134 do_filp_open+0x1fa/0x410 fs/namei.c:4161 do_sys_openat2+0x121/0x1c0 fs/open.c:1435 do_sys_open fs/open.c:1450 [inline] __do_sys_openat fs/open.c:1466 [inline] __se_sys_openat fs/open.c:1461 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1461 page_owner free stack trace missing Memory state around the buggy address: ffff8880524cd580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880524cd600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880524cd680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880524cd700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880524cd780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================