... Log Wrap ... Log Wrap ... Log Wrap ... ================================================================== BUG: KASAN: use-after-free in jfs_lazycommit+0x763/0xb20 fs/jfs/jfs_txnmgr.c:2769 Read of size 4 at addr ffff888069626a94 by task jfsCommit/276 CPU: 0 PID: 276 Comm: jfsCommit Not tainted 5.15.181-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 jfs_lazycommit+0x763/0xb20 fs/jfs/jfs_txnmgr.c:2769 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Allocated by task 10982: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:735 [inline] jfs_fill_super+0xd2/0xaf0 fs/jfs/super.c:500 mount_bdev+0x287/0x3c0 fs/super.c:1400 legacy_get_tree+0xe6/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1530 do_new_mount+0x24a/0xa40 fs/namespace.c:3013 do_mount fs/namespace.c:3356 [inline] __do_sys_mount fs/namespace.c:3564 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3541 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 7431: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0xea/0x170 mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kfree+0xef/0x2a0 mm/slub.c:4559 generic_shutdown_super+0x130/0x300 fs/super.c:475 kill_block_super+0x7c/0xe0 fs/super.c:1427 deactivate_locked_super+0x93/0xf0 fs/super.c:335 cleanup_mnt+0x418/0x4d0 fs/namespace.c:1143 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Last potentially related work creation: kasan_save_stack+0x35/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348 insert_work+0x54/0x3d0 kernel/workqueue.c:1366 __queue_work+0x9c5/0xd50 kernel/workqueue.c:1532 queue_work_on+0x11d/0x1d0 kernel/workqueue.c:1559 queue_work include/linux/workqueue.h:512 [inline] xlog_cil_push_now fs/xfs/xfs_log_cil.c:1218 [inline] xlog_cil_force_seq+0x2a7/0x680 fs/xfs/xfs_log_cil.c:1348 xfs_log_force_seq+0x18c/0x420 fs/xfs/xfs_log.c:3444 __xfs_trans_commit+0x7fd/0xc50 fs/xfs/xfs_trans.c:890 xfs_setattr_nonsize+0x6a9/0x9f0 fs/xfs/xfs_iops.c:745 xfs_setattr_size+0x2be/0xb50 fs/xfs/xfs_iops.c:819 xfs_vn_setattr+0x257/0x300 fs/xfs/xfs_iops.c:1022 notify_change+0xbcd/0xee0 fs/attr.c:505 do_truncate+0x197/0x220 fs/open.c:65 handle_truncate fs/namei.c:3265 [inline] do_open fs/namei.c:3612 [inline] path_openat+0x28af/0x2f30 fs/namei.c:3742 do_filp_open+0x1b3/0x3e0 fs/namei.c:3769 do_sys_openat2+0x142/0x4a0 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1280 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888069626a00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 148 bytes inside of 256-byte region [ffff888069626a00, ffff888069626b00) The buggy address belongs to the page: page:ffffea0001a58980 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x69626 head:ffffea0001a58980 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888016841b40 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 7932, ts 198289203310, free_ts 190471577276 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5466 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1975 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc_track_caller+0x1cb/0x330 mm/slub.c:4925 copy_array kernel/bpf/verifier.c:778 [inline] copy_stack_state kernel/bpf/verifier.c:829 [inline] copy_func_state kernel/bpf/verifier.c:950 [inline] copy_verifier_state+0x82e/0xc90 kernel/bpf/verifier.c:986 push_stack+0x1a5/0x510 kernel/bpf/verifier.c:1057 sanitize_speculative_path+0x2e/0xfa0 kernel/bpf/verifier.c:7060 check_cond_jmp_op kernel/bpf/verifier.c:9323 [inline] do_check+0xc2b4/0xeac0 kernel/bpf/verifier.c:11472 do_check_common+0xe67/0x16c0 kernel/bpf/verifier.c:13485 do_check_main kernel/bpf/verifier.c:13548 [inline] bpf_check+0x31f3/0xf090 kernel/bpf/verifier.c:14119 bpf_prog_load+0x1043/0x1550 kernel/bpf/syscall.c:2348 __sys_bpf+0x4c2/0x670 kernel/bpf/syscall.c:4651 __do_sys_bpf kernel/bpf/syscall.c:4755 [inline] __se_sys_bpf kernel/bpf/syscall.c:4753 [inline] __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:4753 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page_list+0x122/0x7e0 mm/page_alloc.c:3433 release_pages+0x184b/0x1bb0 mm/swap.c:963 __pagevec_release+0x6d/0xe0 mm/swap.c:983 pagevec_release include/linux/pagevec.h:81 [inline] __invalidate_mapping_pages+0x4e4/0x5e0 mm/truncate.c:509 btrfs_close_bdev fs/btrfs/volumes.c:1186 [inline] btrfs_close_one_device fs/btrfs/volumes.c:1210 [inline] close_fs_devices+0x443/0x930 fs/btrfs/volumes.c:1253 btrfs_close_devices+0xc2/0x500 fs/btrfs/volumes.c:1268 close_ctree+0x75f/0x8c0 fs/btrfs/disk-io.c:4538 generic_shutdown_super+0x130/0x300 fs/super.c:475 kill_anon_super+0x36/0x70 fs/super.c:1089 btrfs_kill_super+0x3d/0x50 fs/btrfs/super.c:2390 deactivate_locked_super+0x93/0xf0 fs/super.c:335 cleanup_mnt+0x418/0x4d0 fs/namespace.c:1143 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 Memory state around the buggy address: ffff888069626980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888069626a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888069626a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888069626b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888069626b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================