================================================================== BUG: KASAN: double-free in slab_free mm/slub.c:3801 [inline] BUG: KASAN: double-free in __kmem_cache_free+0xb8/0x2d0 mm/slub.c:3814 Free of addr ffff888044a95a00 by task kswapd0/112 CPU: 0 PID: 112 Comm: kswapd0 Not tainted 6.4.0-syzkaller-11472-g03275585cabd #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:364 print_report mm/kasan/report.c:475 [inline] kasan_report_invalid_free+0xed/0x100 mm/kasan/report.c:550 ____kasan_slab_free+0x185/0x1c0 mm/kasan/common.c:225 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1792 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1818 slab_free mm/slub.c:3801 [inline] __kmem_cache_free+0xb8/0x2d0 mm/slub.c:3814 hfsplus_release_folio+0x28d/0x5f0 fs/hfsplus/inode.c:103 filemap_release_folio+0x13f/0x1b0 mm/filemap.c:4079 shrink_folio_list+0x2f51/0x3dc0 mm/vmscan.c:2068 evict_folios+0x794/0x1940 mm/vmscan.c:5181 try_to_shrink_lruvec+0x82c/0xb90 mm/vmscan.c:5357 shrink_one+0x462/0x710 mm/vmscan.c:5401 shrink_many mm/vmscan.c:5453 [inline] lru_gen_shrink_node mm/vmscan.c:5570 [inline] shrink_node+0x20ed/0x3690 mm/vmscan.c:6510 kswapd_shrink_node mm/vmscan.c:7315 [inline] balance_pgdat+0xa02/0x1ac0 mm/vmscan.c:7505 kswapd+0x677/0xd60 mm/vmscan.c:7765 kthread+0x344/0x440 kernel/kthread.c:389 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 32554: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] ____kasan_kmalloc mm/kasan/common.c:333 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:985 [inline] __kmalloc+0x5e/0x190 mm/slab_common.c:998 kmalloc include/linux/slab.h:583 [inline] kzalloc include/linux/slab.h:700 [inline] __hfs_bnode_create+0x107/0x840 fs/hfsplus/bnode.c:409 hfsplus_bnode_find+0x41c/0xc60 fs/hfsplus/bnode.c:486 hfsplus_brec_find+0x2b3/0x520 fs/hfsplus/bfind.c:183 hfsplus_brec_read+0x2c/0x120 fs/hfsplus/bfind.c:222 hfsplus_find_cat+0x1d4/0x4c0 fs/hfsplus/catalog.c:202 hfsplus_cat_write_inode+0x29a/0x7d0 fs/hfsplus/inode.c:594 hfsplus_write_inode fs/hfsplus/super.c:160 [inline] hfsplus_write_inode+0x93/0x520 fs/hfsplus/super.c:147 write_inode fs/fs-writeback.c:1456 [inline] __writeback_single_inode+0x9f2/0xdb0 fs/fs-writeback.c:1668 writeback_sb_inodes+0x54d/0xe70 fs/fs-writeback.c:1894 wb_writeback+0x155/0xa40 fs/fs-writeback.c:2070 wb_do_writeback fs/fs-writeback.c:2217 [inline] wb_workfn+0x2a5/0xfc0 fs/fs-writeback.c:2257 process_one_work+0xa34/0x16f0 kernel/workqueue.c:2597 worker_thread+0x67d/0x10c0 kernel/workqueue.c:2748 kthread+0x344/0x440 kernel/kthread.c:389 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Freed by task 973: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:521 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1792 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1818 slab_free mm/slub.c:3801 [inline] __kmem_cache_free+0xb8/0x2d0 mm/slub.c:3814 hfsplus_btree_close+0xab/0x390 fs/hfsplus/btree.c:275 hfsplus_put_super+0x24c/0x3f0 fs/hfsplus/super.c:301 generic_shutdown_super+0x158/0x480 fs/super.c:499 kill_block_super+0x64/0xb0 fs/super.c:1417 deactivate_locked_super+0x98/0x160 fs/super.c:330 deactivate_super+0xb1/0xd0 fs/super.c:361 cleanup_mnt+0x2ae/0x3d0 fs/namespace.c:1254 task_work_run+0x16f/0x270 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:297 __do_fast_syscall_32+0x72/0xf0 arch/x86/entry/common.c:181 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 The buggy address belongs to the object at ffff888044a95a00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 0 bytes inside of 192-byte region [ffff888044a95a00, ffff888044a95ac0) The buggy address belongs to the physical page: page:ffffea000112a540 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x44a95 flags: 0x4fff00000000200(slab|node=1|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 04fff00000000200 ffff888012842a00 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 837, tgid 835 (syz-executor.1), ts 1030313053046, free_ts 1029916768581 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0xfed/0x2d30 mm/page_alloc.c:3221 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4477 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2279 alloc_slab_page mm/slub.c:1862 [inline] allocate_slab+0x25f/0x390 mm/slub.c:2009 new_slab mm/slub.c:2062 [inline] ___slab_alloc+0xbc3/0x15d0 mm/slub.c:3215 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3314 __slab_alloc_node mm/slub.c:3367 [inline] slab_alloc_node mm/slub.c:3460 [inline] __kmem_cache_alloc_node+0x143/0x350 mm/slub.c:3509 __do_kmalloc_node mm/slab_common.c:984 [inline] __kmalloc+0x4e/0x190 mm/slab_common.c:998 kmalloc include/linux/slab.h:583 [inline] kmem_alloc+0x165/0x4a0 fs/xfs/kmem.c:20 kmem_zalloc fs/xfs/kmem.h:69 [inline] xfs_mru_cache_create+0x11c/0x590 fs/xfs/xfs_mru_cache.c:341 xfs_fs_fill_super+0xf6e/0x1f00 fs/xfs/xfs_super.c:1647 get_tree_bdev+0x43e/0x7d0 fs/super.c:1318 vfs_get_tree+0x8d/0x350 fs/super.c:1519 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x136e/0x1e70 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __ia32_sys_mount+0x282/0x300 fs/namespace.c:3861 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1161 [inline] free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2348 free_unref_page+0x33/0x370 mm/page_alloc.c:2443 vfree+0x180/0x7b0 mm/vmalloc.c:2842 kvfree+0x32/0x50 mm/util.c:648 kmem_free fs/xfs/kmem.h:62 [inline] xlog_write_log_records+0x2e3/0x3c0 fs/xfs/xfs_log_recover.c:1586 xlog_clear_stale_blocks+0x20a/0x470 fs/xfs/xfs_log_recover.c:1681 xlog_find_tail+0x809/0x990 fs/xfs/xfs_log_recover.c:1365 xlog_recover+0x7d/0x500 fs/xfs/xfs_log_recover.c:3360 xfs_log_mount+0x36e/0x700 fs/xfs/xfs_log.c:741 xfs_mountfs+0x11e1/0x1f60 fs/xfs/xfs_mount.c:819 xfs_fs_fill_super+0x1460/0x1f00 fs/xfs/xfs_super.c:1710 get_tree_bdev+0x43e/0x7d0 fs/super.c:1318 vfs_get_tree+0x8d/0x350 fs/super.c:1519 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x136e/0x1e70 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __ia32_sys_mount+0x282/0x300 fs/namespace.c:3861 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 Memory state around the buggy address: ffff888044a95900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888044a95980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888044a95a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888044a95a80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888044a95b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================