================================================================== BUG: KASAN: use-after-free in JFS_SBI fs/jfs/jfs_incore.h:217 [inline] BUG: KASAN: use-after-free in jfs_lazycommit+0x15b/0xb80 fs/jfs/jfs_txnmgr.c:2714 Read of size 8 at addr ffff88807f480638 by task jfsCommit/112 CPU: 0 PID: 112 Comm: jfsCommit Not tainted 6.9.0-rc5-syzkaller-00159-gc942a0cd3603 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 JFS_SBI fs/jfs/jfs_incore.h:217 [inline] jfs_lazycommit+0x15b/0xb80 fs/jfs/jfs_txnmgr.c:2714 kthread+0x2f0/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the physical page: page: refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x7f480 flags: 0xfff80000000000(node=0|zone=1|lastcpupid=0xfff) page_type: 0xffffff7f(buddy) raw: 00fff80000000000 ffffea00015b2608 ffffea0001448e08 0000000000000000 raw: 0000000000000000 0000000000000003 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 9052, tgid 2141415822 (syz-executor.3), ts 9053, free_ts 814151358236 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1534 prep_new_page mm/page_alloc.c:1541 [inline] get_page_from_freelist+0x3410/0x35b0 mm/page_alloc.c:3317 __alloc_pages+0x256/0x6c0 mm/page_alloc.c:4575 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page+0x5f/0x160 mm/slub.c:2175 allocate_slab mm/slub.c:2338 [inline] new_slab+0x84/0x2f0 mm/slub.c:2391 ___slab_alloc+0xc73/0x1260 mm/slub.c:3525 __slab_alloc mm/slub.c:3610 [inline] __slab_alloc_node mm/slub.c:3663 [inline] slab_alloc_node mm/slub.c:3835 [inline] kmem_cache_alloc+0x252/0x340 mm/slub.c:3852 ntfs_readdir+0x48a/0xf40 fs/ntfs3/dir.c:418 iterate_dir+0x539/0x6f0 fs/readdir.c:110 ovl_dir_read+0xfe/0x570 fs/overlayfs/readdir.c:313 ovl_dir_read_merged+0x313/0x5e0 fs/overlayfs/readdir.c:369 ovl_cache_get fs/overlayfs/readdir.c:422 [inline] ovl_iterate+0x119f/0x21c0 fs/overlayfs/readdir.c:783 wrap_directory_iterator+0x94/0xe0 fs/readdir.c:67 iterate_dir+0x539/0x6f0 fs/readdir.c:110 __do_sys_getdents64 fs/readdir.c:409 [inline] __se_sys_getdents64+0x20d/0x4f0 fs/readdir.c:394 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 page last free pid 4525 tgid 4525 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1141 [inline] free_unref_page_prepare+0x97b/0xaa0 mm/page_alloc.c:2347 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2487 discard_slab mm/slub.c:2437 [inline] __put_partials+0xeb/0x130 mm/slub.c:2906 put_cpu_partial+0x17c/0x250 mm/slub.c:2981 __slab_free+0x2ea/0x3d0 mm/slub.c:4151 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x5e/0xc0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3798 [inline] slab_alloc_node mm/slub.c:3845 [inline] kmem_cache_alloc_node+0x194/0x380 mm/slub.c:3888 kmalloc_reserve+0xa8/0x2a0 net/core/skbuff.c:577 __alloc_skb+0x1f3/0x440 net/core/skbuff.c:668 netlink_sendmsg+0x637/0xcb0 net/netlink/af_netlink.c:1880 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584 ___sys_sendmsg net/socket.c:2638 [inline] __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 Memory state around the buggy address: ffff88807f480500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88807f480580: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88807f480600: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88807f480680: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88807f480700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================