================================================================== BUG: KASAN: use-after-free in jfs_lazycommit+0x7da/0xb60 fs/jfs/jfs_txnmgr.c:2730 Read of size 4 at addr ffff888013a68294 by task jfsCommit/132 CPU: 0 PID: 132 Comm: jfsCommit Not tainted 6.1.32-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 jfs_lazycommit+0x7da/0xb60 fs/jfs/jfs_txnmgr.c:2730 kthread+0x26e/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Allocated by task 3742: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:553 [inline] kzalloc include/linux/slab.h:689 [inline] jfs_fill_super+0xfb/0xc40 fs/jfs/super.c:495 mount_bdev+0x2c9/0x3f0 fs/super.c:1423 legacy_get_tree+0xeb/0x180 fs/fs_context.c:610 vfs_get_tree+0x88/0x270 fs/super.c:1553 do_new_mount+0x28b/0xae0 fs/namespace.c:3040 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 3578: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook mm/slub.c:1750 [inline] slab_free mm/slub.c:3661 [inline] __kmem_cache_free+0x25c/0x3c0 mm/slub.c:3674 generic_shutdown_super+0x130/0x340 fs/super.c:501 kill_block_super+0x7a/0xe0 fs/super.c:1450 deactivate_locked_super+0xa0/0x110 fs/super.c:332 cleanup_mnt+0x490/0x520 fs/namespace.c:1186 task_work_run+0x246/0x300 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888013a68200 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 148 bytes inside of 256-byte region [ffff888013a68200, ffff888013a68300) The buggy address belongs to the physical page: page:ffffea00004e9a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888013a69400 pfn:0x13a68 head:ffffea00004e9a00 order:1 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000001 ffff888012441b40 raw: ffff888013a69400 000000008010000e 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 2339497190, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2533 prep_new_page mm/page_alloc.c:2540 [inline] get_page_from_freelist+0x32ed/0x3480 mm/page_alloc.c:4292 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5559 alloc_page_interleave+0x22/0x1c0 mm/mempolicy.c:2113 alloc_slab_page+0x6a/0x150 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x84/0x2d0 mm/slub.c:1992 ___slab_alloc+0xa71/0x1080 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x19f/0x260 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node_track_caller+0xa0/0x220 mm/slab_common.c:975 __do_krealloc mm/slab_common.c:1348 [inline] krealloc+0x61/0xf0 mm/slab_common.c:1381 add_sysfs_param+0xca/0x7f0 kernel/params.c:651 kernel_add_sysfs_param+0xb0/0x126 kernel/params.c:812 param_sysfs_builtin+0x16a/0x1e2 kernel/params.c:851 param_sysfs_init+0x66/0x6a kernel/params.c:970 do_one_initcall+0x265/0x8f0 init/main.c:1303 do_initcall_level+0x157/0x207 init/main.c:1376 page_owner free stack trace missing Memory state around the buggy address: ffff888013a68180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888013a68200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888013a68280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888013a68300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888013a68380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================