================================================================== BUG: KASAN: slab-use-after-free in jfs_lazycommit+0x7da/0xb60 fs/jfs/jfs_txnmgr.c:2735 Read of size 4 at addr ffff888026193e94 by task jfsCommit/107 CPU: 1 PID: 107 Comm: jfsCommit Not tainted 6.6.0-rc5-syzkaller-00055-g1c8b86a3799f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x15f/0x540 mm/kasan/report.c:475 kasan_report+0x171/0x1b0 mm/kasan/report.c:588 jfs_lazycommit+0x7da/0xb60 fs/jfs/jfs_txnmgr.c:2735 kthread+0x2cf/0x360 kernel/kthread.c:388 ret_from_fork+0x44/0x70 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Allocated by task 7922: 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+0x94/0xa0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:599 [inline] kzalloc include/linux/slab.h:720 [inline] jfs_fill_super+0xfb/0xc40 fs/jfs/super.c:495 mount_bdev+0x233/0x300 fs/super.c:1629 legacy_get_tree+0xeb/0x180 fs/fs_context.c:638 vfs_get_tree+0x88/0x280 fs/super.c:1750 do_new_mount+0x28b/0xae0 fs/namespace.c:3335 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3861 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 7832: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x24/0x40 mm/kasan/generic.c:522 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook mm/slub.c:1826 [inline] slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0x257/0x3a0 mm/slub.c:3822 generic_shutdown_super+0x136/0x2c0 fs/super.c:693 kill_block_super+0x3d/0x70 fs/super.c:1646 deactivate_locked_super+0xa0/0x110 fs/super.c:481 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1254 task_work_run+0x246/0x300 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xde/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:285 [inline] syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:296 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 ffff888026193e00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 148 bytes inside of freed 256-byte region [ffff888026193e00, ffff888026193f00) The buggy address belongs to the physical page: page:ffffea0000986480 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x26192 head:ffffea0000986480 order:1 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012841b40 ffffea00009c6580 dead000000000002 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 22720087484, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1d2/0x1f0 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31b7/0x3330 mm/page_alloc.c:3170 __alloc_pages+0x251/0x660 mm/page_alloc.c:4426 alloc_page_interleave+0x22/0x1c0 mm/mempolicy.c:2130 alloc_slab_page+0x6a/0x150 mm/slub.c:1870 allocate_slab mm/slub.c:2017 [inline] new_slab+0x84/0x2d0 mm/slub.c:2070 ___slab_alloc+0xc75/0x1300 mm/slub.c:3223 __slab_alloc mm/slub.c:3322 [inline] __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x1a7/0x260 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1022 [inline] __kmalloc+0xa4/0x220 mm/slab_common.c:1036 kmalloc include/linux/slab.h:603 [inline] kzalloc include/linux/slab.h:720 [inline] new_dir fs/proc/proc_sysctl.c:966 [inline] get_subdir fs/proc/proc_sysctl.c:1010 [inline] sysctl_mkdir_p fs/proc/proc_sysctl.c:1301 [inline] __register_sysctl_table+0xb2c/0x1440 fs/proc/proc_sysctl.c:1382 rds_sysctl_init+0x3a/0x50 net/rds/sysctl.c:106 rds_init+0xcb/0x270 net/rds/af_rds.c:913 do_one_initcall+0x239/0x7c0 init/main.c:1232 do_initcall_level+0x157/0x210 init/main.c:1294 do_initcalls+0x3f/0x80 init/main.c:1310 kernel_init_freeable+0x425/0x5c0 init/main.c:1547 page_owner free stack trace missing Memory state around the buggy address: ffff888026193d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888026193e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888026193e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888026193f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888026193f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================