loop0: lost filesystem error report for type 5 error -117 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_dirent_get_data_len fs/ext4/ext4.h:4069 [inline] BUG: KASAN: slab-use-after-free in ext4_dir_entry_len fs/ext4/ext4.h:4096 [inline] BUG: KASAN: slab-use-after-free in ext4_inlinedir_to_tree+0x94c/0x10d0 fs/ext4/inline.c:1335 Read of size 1 at addr ffff88816fee8825 by task syz.0.20/5867 CPU: 1 UID: 0 PID: 5867 Comm: syz.0.20 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 ext4_dirent_get_data_len fs/ext4/ext4.h:4069 [inline] ext4_dir_entry_len fs/ext4/ext4.h:4096 [inline] ext4_inlinedir_to_tree+0x94c/0x10d0 fs/ext4/inline.c:1335 ext4_htree_fill_tree+0x517/0x1230 fs/ext4/namei.c:1182 ext4_dx_readdir fs/ext4/dir.c:600 [inline] ext4_readdir+0x2db4/0x3640 fs/ext4/dir.c:146 iterate_dir+0x399/0x570 fs/readdir.c:110 __do_sys_getdents fs/readdir.c:319 [inline] __se_sys_getdents+0xf1/0x270 fs/readdir.c:304 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f010ad9ce59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f010bc0f028 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007f010b015fa0 RCX: 00007f010ad9ce59 RDX: 0000000000000054 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007f010ae32d6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f010b016038 R14: 00007f010b015fa0 R15: 00007ffd93577348 Allocated by task 5064: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5296 [inline] __kmalloc_noprof+0x35c/0x760 mm/slub.c:5308 kmalloc_noprof include/linux/slab.h:954 [inline] kzalloc_noprof include/linux/slab.h:1188 [inline] tomoyo_encode2 security/tomoyo/realpath.c:45 [inline] tomoyo_encode+0x28b/0x550 security/tomoyo/realpath.c:80 tomoyo_realpath_from_path+0x58d/0x5d0 security/tomoyo/realpath.c:283 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x283/0x560 security/tomoyo/file.c:827 security_inode_getattr+0x12b/0x310 security/security.c:1895 vfs_getattr fs/stat.c:259 [inline] vfs_fstat fs/stat.c:281 [inline] vfs_fstatat+0xb4/0x170 fs/stat.c:371 __do_sys_newfstatat fs/stat.c:538 [inline] __se_sys_newfstatat fs/stat.c:532 [inline] __x64_sys_newfstatat+0x151/0x200 fs/stat.c:532 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5064: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2689 [inline] slab_free mm/slub.c:6251 [inline] kfree+0x1c5/0x640 mm/slub.c:6566 tomoyo_path_perm+0x403/0x560 security/tomoyo/file.c:847 security_inode_getattr+0x12b/0x310 security/security.c:1895 vfs_getattr fs/stat.c:259 [inline] vfs_fstat fs/stat.c:281 [inline] vfs_fstatat+0xb4/0x170 fs/stat.c:371 __do_sys_newfstatat fs/stat.c:538 [inline] __se_sys_newfstatat fs/stat.c:532 [inline] __x64_sys_newfstatat+0x151/0x200 fs/stat.c:532 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88816fee8800 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 37 bytes inside of freed 64-byte region [ffff88816fee8800, ffff88816fee8840) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x16fee8 flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 057ff00000000000 ffff8881000418c0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000800200020 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 21294026082, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x22d/0x280 mm/page_alloc.c:1853 prep_new_page mm/page_alloc.c:1861 [inline] get_page_from_freelist+0x2593/0x2610 mm/page_alloc.c:3941 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5221 alloc_slab_page mm/slub.c:3278 [inline] allocate_slab+0x77/0x660 mm/slub.c:3467 new_slab mm/slub.c:3525 [inline] refill_objects+0x339/0x3d0 mm/slub.c:7272 refill_sheaf mm/slub.c:2816 [inline] __pcs_replace_empty_main+0x321/0x720 mm/slub.c:4652 alloc_from_pcs mm/slub.c:4750 [inline] slab_alloc_node mm/slub.c:4884 [inline] __do_kmalloc_node mm/slub.c:5295 [inline] __kmalloc_noprof+0x474/0x760 mm/slub.c:5308 kmalloc_noprof include/linux/slab.h:954 [inline] kzalloc_noprof include/linux/slab.h:1188 [inline] handler_new_ref+0x261/0x9c0 drivers/media/v4l2-core/v4l2-ctrls-core.c:1882 v4l2_ctrl_add_handler+0x19f/0x290 drivers/media/v4l2-core/v4l2-ctrls-core.c:2443 vivid_create_controls+0x332d/0x3bd0 drivers/media/test-drivers/vivid/vivid-ctrls.c:2072 vivid_create_instance drivers/media/test-drivers/vivid/vivid-core.c:1933 [inline] vivid_probe+0x4261/0x72b0 drivers/media/test-drivers/vivid/vivid-core.c:2095 platform_probe+0xf9/0x190 drivers/base/platform.c:1432 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x267/0xaf0 drivers/base/dd.c:709 __driver_probe_device+0x1ef/0x380 drivers/base/dd.c:871 driver_probe_device+0x4f/0x240 drivers/base/dd.c:901 __driver_attach+0x34c/0x640 drivers/base/dd.c:1295 page_owner free stack trace missing Memory state around the buggy address: ffff88816fee8700: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc ffff88816fee8780: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff88816fee8800: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88816fee8880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88816fee8900: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================