================================================================== 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+0x15b/0xb80 fs/jfs/jfs_txnmgr.c:2714 Read of size 8 at addr ffff888057a48638 by task jfsCommit/112 CPU: 0 PID: 112 Comm: jfsCommit Not tainted 6.9.0-rc4-next-20240418-syzkaller #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:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 10567: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] kmalloc_trace_noprof+0x19c/0x2b0 mm/slub.c:4109 kmalloc_noprof include/linux/slab.h:660 [inline] kzalloc_noprof include/linux/slab.h:778 [inline] alloc_super+0x59/0x9d0 fs/super.c:318 sget+0x1fc/0x620 fs/super.c:841 mount_bdev+0xeb/0x2d0 fs/super.c:1647 legacy_get_tree+0xee/0x190 fs/fs_context.c:662 vfs_get_tree+0x90/0x2a0 fs/super.c:1780 do_new_mount+0x2be/0xb40 fs/namespace.c:3352 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3875 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 6720: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object+0xe0/0x150 mm/kasan/common.c:240 __kasan_slab_free+0x37/0x60 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2190 [inline] slab_free mm/slub.c:4393 [inline] kfree+0x149/0x350 mm/slub.c:4514 process_one_work kernel/workqueue.c:3218 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3299 worker_thread+0x86d/0xd70 kernel/workqueue.c:3380 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:541 insert_work+0x3e/0x330 kernel/workqueue.c:2194 __queue_work+0xc24/0xef0 kernel/workqueue.c:2346 queue_work_on+0x1c2/0x380 kernel/workqueue.c:2397 rcu_do_batch kernel/rcu/tree.c:2565 [inline] rcu_core+0xafd/0x1830 kernel/rcu/tree.c:2839 __do_softirq+0x2c6/0x980 kernel/softirq.c:554 Second to last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:541 __call_rcu_common kernel/rcu/tree.c:3102 [inline] call_rcu+0x167/0xa70 kernel/rcu/tree.c:3206 user_get_super+0x117/0x180 fs/super.c:997 quotactl_block fs/quota/quota.c:890 [inline] __do_sys_quotactl fs/quota/quota.c:955 [inline] __se_sys_quotactl+0x52a/0xa30 fs/quota/quota.c:917 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888057a48000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1592 bytes inside of freed 4096-byte region [ffff888057a48000, ffff888057a49000) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x57a48 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff80000000040(head|node=0|zone=1|lastcpupid=0xfff) page_type: 0xffffefff(slab) raw: 00fff80000000040 ffff888015042140 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000040004 00000001ffffefff 0000000000000000 head: 00fff80000000040 ffff888015042140 dead000000000100 dead000000000122 head: 0000000000000000 0000000000040004 00000001ffffefff 0000000000000000 head: 00fff80000000003 ffffea00015e9201 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated 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 10564, tgid -55464096 (syz-executor.3), ts 10567, free_ts 274813749759 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1476 prep_new_page mm/page_alloc.c:1484 [inline] get_page_from_freelist+0x2ce2/0x2d90 mm/page_alloc.c:3446 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4704 __alloc_pages_node_noprof include/linux/gfp.h:244 [inline] alloc_pages_node_noprof include/linux/gfp.h:271 [inline] alloc_slab_page+0x5f/0x120 mm/slub.c:2259 allocate_slab+0x5a/0x2e0 mm/slub.c:2422 new_slab mm/slub.c:2475 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3624 __slab_alloc+0x58/0xa0 mm/slub.c:3714 __slab_alloc_node mm/slub.c:3767 [inline] slab_alloc_node mm/slub.c:3945 [inline] kmalloc_trace_noprof+0x1d5/0x2b0 mm/slub.c:4104 kmalloc_noprof include/linux/slab.h:660 [inline] kzalloc_noprof include/linux/slab.h:778 [inline] alloc_super+0x59/0x9d0 fs/super.c:318 sget+0x1fc/0x620 fs/super.c:841 mount_bdev+0xeb/0x2d0 fs/super.c:1647 legacy_get_tree+0xee/0x190 fs/fs_context.c:662 vfs_get_tree+0x90/0x2a0 fs/super.c:1780 do_new_mount+0x2be/0xb40 fs/namespace.c:3352 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3875 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 51 tgid 51 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1096 [inline] free_unref_page+0xd22/0xea0 mm/page_alloc.c:2609 __folio_put+0x3b9/0x620 mm/swap.c:129 skb_page_unref include/linux/skbuff_ref.h:75 [inline] __skb_frag_unref include/linux/skbuff_ref.h:88 [inline] skb_release_data+0x465/0x890 net/core/skbuff.c:1069 skb_release_all net/core/skbuff.c:1140 [inline] __kfree_skb net/core/skbuff.c:1154 [inline] kfree_skb_reason+0x1a3/0x3b0 net/core/skbuff.c:1190 __skb_queue_purge_reason include/linux/skbuff.h:3251 [inline] skb_queue_purge_reason+0x3c3/0x500 net/core/skbuff.c:3830 skb_queue_purge include/linux/skbuff.h:3264 [inline] rds_tcp_inc_purge net/rds/tcp_recv.c:48 [inline] rds_tcp_inc_free+0x1e/0x30 net/rds/tcp_recv.c:55 rds_tcp_conn_path_shutdown+0x241/0x2e0 net/rds/tcp_connect.c:224 rds_conn_shutdown+0x3b4/0x890 net/rds/connection.c:398 process_one_work kernel/workqueue.c:3218 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3299 worker_thread+0x86d/0xd70 kernel/workqueue.c:3380 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff888057a48500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888057a48580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888057a48600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888057a48680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888057a48700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================