================================================================== BUG: KASAN: slab-use-after-free in JFS_SBI fs/jfs/jfs_incore.h:217 [inline] BUG: KASAN: slab-use-after-free in jfs_lazycommit+0x150/0x9a8 fs/jfs/jfs_txnmgr.c:2714 Read of size 8 at addr ffff0000ef0e2638 by task jfsCommit/97 CPU: 1 UID: 0 PID: 97 Comm: jfsCommit Not tainted 6.12.0-rc3-syzkaller-g3d363ba041e1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:319 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:326 __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x198/0x538 mm/kasan/report.c:488 kasan_report+0xd8/0x138 mm/kasan/report.c:601 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 JFS_SBI fs/jfs/jfs_incore.h:217 [inline] jfs_lazycommit+0x150/0x9a8 fs/jfs/jfs_txnmgr.c:2714 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Allocated by task 9435: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:565 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:257 [inline] __do_kmalloc_node mm/slub.c:4264 [inline] __kmalloc_noprof+0x2a4/0x49c mm/slub.c:4276 kmalloc_noprof include/linux/slab.h:882 [inline] tomoyo_realpath_from_path+0xc8/0x4cc security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x218/0x588 security/tomoyo/file.c:822 tomoyo_inode_getattr+0x28/0x38 security/tomoyo/tomoyo.c:123 security_inode_getattr+0x118/0x320 security/security.c:2373 vfs_getattr fs/stat.c:204 [inline] vfs_fstat fs/stat.c:229 [inline] vfs_fstatat+0x104/0x250 fs/stat.c:338 __do_sys_newfstatat fs/stat.c:505 [inline] __se_sys_newfstatat fs/stat.c:499 [inline] __arm64_sys_newfstatat+0x10c/0x190 fs/stat.c:499 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:732 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:750 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 Freed by task 9435: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_free_info+0x54/0x6c mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x64/0x8c mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:2342 [inline] slab_free mm/slub.c:4579 [inline] kfree+0x184/0x47c mm/slub.c:4727 tomoyo_realpath_from_path+0x484/0x4cc security/tomoyo/realpath.c:286 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x218/0x588 security/tomoyo/file.c:822 tomoyo_inode_getattr+0x28/0x38 security/tomoyo/tomoyo.c:123 security_inode_getattr+0x118/0x320 security/security.c:2373 vfs_getattr fs/stat.c:204 [inline] vfs_fstat fs/stat.c:229 [inline] vfs_fstatat+0x104/0x250 fs/stat.c:338 __do_sys_newfstatat fs/stat.c:505 [inline] __se_sys_newfstatat fs/stat.c:499 [inline] __arm64_sys_newfstatat+0x10c/0x190 fs/stat.c:499 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:732 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:750 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 The buggy address belongs to the object at ffff0000ef0e2000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1592 bytes inside of freed 4096-byte region [ffff0000ef0e2000, ffff0000ef0e3000) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12f0e0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000040 ffff0000c0002140 fffffdffc35ca200 dead000000000002 raw: 0000000000000000 0000000000040004 00000001f5000000 0000000000000000 head: 05ffc00000000040 ffff0000c0002140 fffffdffc35ca200 dead000000000002 head: 0000000000000000 0000000000040004 00000001f5000000 0000000000000000 head: 05ffc00000000003 fffffdffc3bc3801 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000ef0e2500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000ef0e2580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000ef0e2600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000ef0e2680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000ef0e2700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Unable to handle kernel paging request at virtual address dfff800000000012 KASAN: null-ptr-deref in range [0x0000000000000090-0x0000000000000097] Mem abort info: ESR = 0x0000000096000005 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x05: level 1 translation fault Data abort info: ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [dfff800000000012] address between user and kernel address ranges Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP Modules linked in: CPU: 1 UID: 0 PID: 97 Comm: jfsCommit Tainted: G B 6.12.0-rc3-syzkaller-g3d363ba041e1 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : jfs_lazycommit+0x164/0x9a8 fs/jfs/jfs_txnmgr.c:2721 lr : JFS_SBI fs/jfs/jfs_incore.h:217 [inline] lr : jfs_lazycommit+0x150/0x9a8 fs/jfs/jfs_txnmgr.c:2714 sp : ffff80009b597ce0 x29: ffff80009b597e00 x28: 1ffff00011fb9914 x27: ffff80009b597d80 x26: 0000000000000000 x25: ffff80009aed9350 x24: 1ffff000135db26a x23: 0000000000000000 x22: dfff800000000000 x21: 0000000000000094 x20: ffff80009aed93b8 x19: ffff80009745e100 x18: 0000000000000008 x17: 0000000000000000 x16: ffff8000830b98a8 x15: 0000000000000001 x14: 1ffff0001259da94 x13: 0000000000000000 x12: 0000000000000000 x11: ffff70001259da95 x10: 0000000000ff0100 x9 : 0000000000000007 x8 : 0000000000000012 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff80009b597318 x4 : ffff80008f8dd5c0 x3 : ffff8000801ed06c x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000001 Call trace: jfs_lazycommit+0x164/0x9a8 fs/jfs/jfs_txnmgr.c:2721 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Code: 910252f5 d343fea8 12000aa9 11000d29 (38f66908) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: 910252f5 add x21, x23, #0x94 4: d343fea8 lsr x8, x21, #3 8: 12000aa9 and w9, w21, #0x7 c: 11000d29 add w9, w9, #0x3 * 10: 38f66908 ldrsb w8, [x8, x22] <-- trapping instruction