loop0: detected capacity change from 0 to 14901 read_mapping_page failed! jfs_mount: diMount failed w/rc = -5 ================================================================== BUG: KASAN: slab-use-after-free in diFree+0x17ac/0x2648 fs/jfs/jfs_imap.c:871 Read of size 4 at addr ffff0000c8758004 by task syz-executor196/6057 CPU: 1 PID: 6057 Comm: syz-executor196 Not tainted 6.4.0-rc2-syzkaller-gf1fcbaa18b28 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x174/0x514 mm/kasan/report.c:462 kasan_report+0xd4/0x130 mm/kasan/report.c:572 __asan_report_load4_noabort+0x20/0x2c mm/kasan/report_generic.c:380 diFree+0x17ac/0x2648 fs/jfs/jfs_imap.c:871 jfs_evict_inode+0x2d0/0x3f4 fs/jfs/inode.c:156 evict+0x260/0x68c fs/inode.c:665 iput_final fs/inode.c:1747 [inline] iput+0x734/0x818 fs/inode.c:1773 diFreeSpecial+0x78/0x108 fs/jfs/jfs_imap.c:548 jfs_mount+0x53c/0x7a4 fs/jfs/jfs_mount.c:203 jfs_fill_super+0x464/0x9f0 fs/jfs/super.c:556 mount_bdev+0x26c/0x368 fs/super.c:1380 jfs_do_mount+0x44/0x58 fs/jfs/super.c:670 legacy_get_tree+0xd4/0x16c fs/fs_context.c:610 vfs_get_tree+0x90/0x274 fs/super.c:1510 do_new_mount+0x25c/0x8c8 fs/namespace.c:3039 path_mount+0x590/0xe04 fs/namespace.c:3369 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __arm64_sys_mount+0x45c/0x594 fs/namespace.c:3568 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Allocated by task 5588: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:510 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:966 [inline] __kmalloc+0xcc/0x1b8 mm/slab_common.c:979 kmalloc include/linux/slab.h:563 [inline] tomoyo_realpath_from_path+0xc8/0x4cc security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x1ec/0x414 security/tomoyo/file.c:771 tomoyo_file_open+0x130/0x19c security/tomoyo/tomoyo.c:332 security_file_open+0x6c/0xb0 security/security.c:2797 do_dentry_open+0x2a0/0xf90 fs/open.c:907 vfs_open+0x7c/0x90 fs/open.c:1051 do_open fs/namei.c:3636 [inline] path_openat+0x1f2c/0x27f8 fs/namei.c:3791 do_filp_open+0x1bc/0x3cc fs/namei.c:3818 do_sys_openat2+0x128/0x3d8 fs/open.c:1356 do_sys_open fs/open.c:1372 [inline] __do_sys_openat fs/open.c:1388 [inline] __se_sys_openat fs/open.c:1383 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1383 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Freed by task 5588: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:521 ____kasan_slab_free+0x144/0x1c0 mm/kasan/common.c:236 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244 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+0x2a8/0x49c mm/slub.c:3799 kfree+0xb8/0x19c mm/slab_common.c:1015 tomoyo_realpath_from_path+0x484/0x4cc security/tomoyo/realpath.c:286 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x1ec/0x414 security/tomoyo/file.c:771 tomoyo_file_open+0x130/0x19c security/tomoyo/tomoyo.c:332 security_file_open+0x6c/0xb0 security/security.c:2797 do_dentry_open+0x2a0/0xf90 fs/open.c:907 vfs_open+0x7c/0x90 fs/open.c:1051 do_open fs/namei.c:3636 [inline] path_openat+0x1f2c/0x27f8 fs/namei.c:3791 do_filp_open+0x1bc/0x3cc fs/namei.c:3818 do_sys_openat2+0x128/0x3d8 fs/open.c:1356 do_sys_open fs/open.c:1372 [inline] __do_sys_openat fs/open.c:1388 [inline] __se_sys_openat fs/open.c:1383 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1383 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 The buggy address belongs to the object at ffff0000c8758000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 4 bytes inside of freed 4096-byte region [ffff0000c8758000, ffff0000c8759000) The buggy address belongs to the physical page: page:00000000868c95ea refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x108758 head:00000000868c95ea order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 05ffc00000010200 ffff0000c0002a80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000c8757f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000c8757f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000c8758000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000c8758080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000c8758100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== imap: 00000000d65434ce: c6aeac00 ffff0000 000015d4 05c8025d imap: 0000000073e46b3f: 00000000 00000000 00000000 00000000 ERROR: (device loop0): diFree: inum = 2, iagno = 0, nextiag = -65536 Mount JFS Failure: -5 jfs_mount failed w/return code = -5