loop0: detected capacity change from 0 to 32768 overlayfs: upper fs needs to support d_type. overlayfs: upper fs does not support tmpfile. overlayfs: upper fs does not support RENAME_WHITEOUT. ================================================================== BUG: KASAN: slab-use-after-free in drop_metapage fs/jfs/jfs_metapage.c:311 [inline] BUG: KASAN: slab-use-after-free in release_metapage+0x760/0xac0 fs/jfs/jfs_metapage.c:892 Read of size 8 at addr ffff8880373c5bc8 by task syz.0.0/5346 CPU: 0 UID: 0 PID: 5346 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 drop_metapage fs/jfs/jfs_metapage.c:311 [inline] release_metapage+0x760/0xac0 fs/jfs/jfs_metapage.c:892 write_metapage fs/jfs/jfs_metapage.h:75 [inline] flush_metapage fs/jfs/jfs_metapage.h:81 [inline] ea_write+0x658/0xdd0 fs/jfs/xattr.c:280 ea_put fs/jfs/xattr.c:626 [inline] __jfs_setxattr+0x908/0x1120 fs/jfs/xattr.c:792 __jfs_xattr_set+0xda/0x170 fs/jfs/xattr.c:941 __vfs_setxattr+0x43c/0x480 fs/xattr.c:200 __vfs_setxattr_noperm+0x12d/0x660 fs/xattr.c:234 vfs_setxattr+0x16b/0x2f0 fs/xattr.c:321 ovl_do_setxattr fs/overlayfs/overlayfs.h:317 [inline] ovl_setxattr fs/overlayfs/overlayfs.h:329 [inline] ovl_verify_set_fh+0x136/0x210 fs/overlayfs/namei.c:550 ovl_verify_origin_fh fs/overlayfs/overlayfs.h:742 [inline] ovl_get_indexdir+0x1db/0x5f0 fs/overlayfs/super.c:861 ovl_fill_super_creds fs/overlayfs/super.c:1481 [inline] ovl_fill_super+0x34d7/0x5a90 fs/overlayfs/super.c:1567 vfs_get_super fs/super.c:1324 [inline] get_tree_nodev+0xbb/0x150 fs/super.c:1343 vfs_get_tree+0x92/0x2a0 fs/super.c:1751 fc_mount fs/namespace.c:1199 [inline] do_new_mount_fc fs/namespace.c:3636 [inline] do_new_mount+0x302/0xa10 fs/namespace.c:3712 do_mount fs/namespace.c:4035 [inline] __do_sys_mount fs/namespace.c:4224 [inline] __se_sys_mount+0x313/0x410 fs/namespace.c:4201 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f82d3b8f7c9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f82d4a46038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f82d3de5fa0 RCX: 00007f82d3b8f7c9 RDX: 0000200000000000 RSI: 0000200000000040 RDI: 0000000000000000 RBP: 00007f82d3c13f91 R08: 0000200000000100 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f82d3de6038 R14: 00007f82d3de5fa0 R15: 00007fff400b5b18 Allocated by task 5346: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 unpoison_slab_object mm/kasan/common.c:339 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:365 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4948 [inline] slab_alloc_node mm/slub.c:5258 [inline] kmem_cache_alloc_noprof+0x37d/0x710 mm/slub.c:5265 mempool_alloc_noprof+0x1c9/0x2f0 mm/mempool.c:567 alloc_metapage fs/jfs/jfs_metapage.c:264 [inline] __get_metapage+0x50c/0xde0 fs/jfs/jfs_metapage.c:760 ea_write+0x5e6/0xdd0 fs/jfs/xattr.c:256 ea_put fs/jfs/xattr.c:626 [inline] __jfs_setxattr+0x908/0x1120 fs/jfs/xattr.c:792 __jfs_xattr_set+0xda/0x170 fs/jfs/xattr.c:941 __vfs_setxattr+0x43c/0x480 fs/xattr.c:200 __vfs_setxattr_noperm+0x12d/0x660 fs/xattr.c:234 vfs_setxattr+0x16b/0x2f0 fs/xattr.c:321 ovl_do_setxattr fs/overlayfs/overlayfs.h:317 [inline] ovl_setxattr fs/overlayfs/overlayfs.h:329 [inline] ovl_verify_set_fh+0x136/0x210 fs/overlayfs/namei.c:550 ovl_verify_origin_fh fs/overlayfs/overlayfs.h:742 [inline] ovl_get_indexdir+0x1db/0x5f0 fs/overlayfs/super.c:861 ovl_fill_super_creds fs/overlayfs/super.c:1481 [inline] ovl_fill_super+0x34d7/0x5a90 fs/overlayfs/super.c:1567 vfs_get_super fs/super.c:1324 [inline] get_tree_nodev+0xbb/0x150 fs/super.c:1343 vfs_get_tree+0x92/0x2a0 fs/super.c:1751 fc_mount fs/namespace.c:1199 [inline] do_new_mount_fc fs/namespace.c:3636 [inline] do_new_mount+0x302/0xa10 fs/namespace.c:3712 do_mount fs/namespace.c:4035 [inline] __do_sys_mount fs/namespace.c:4224 [inline] __se_sys_mount+0x313/0x410 fs/namespace.c:4201 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 73: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2540 [inline] slab_free mm/slub.c:6663 [inline] kmem_cache_free+0x197/0x620 mm/slub.c:6774 mempool_free+0xec/0x130 mm/mempool.c:712 free_metapage fs/jfs/jfs_metapage.c:279 [inline] metapage_release_folio+0x40e/0x540 fs/jfs/jfs_metapage.c:636 shrink_folio_list+0x20a9/0x4a10 mm/vmscan.c:1483 evict_folios+0x471e/0x57c0 mm/vmscan.c:4709 try_to_shrink_lruvec+0x8a3/0xb50 mm/vmscan.c:4872 shrink_one+0x25c/0x720 mm/vmscan.c:4917 shrink_many mm/vmscan.c:4980 [inline] lru_gen_shrink_node mm/vmscan.c:5058 [inline] shrink_node+0x2f7d/0x35b0 mm/vmscan.c:6045 kswapd_shrink_node mm/vmscan.c:6899 [inline] balance_pgdat mm/vmscan.c:7082 [inline] kswapd+0x145a/0x2820 mm/vmscan.c:7352 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 The buggy address belongs to the object at ffff8880373c5ba0 which belongs to the cache jfs_mp of size 184 The buggy address is located 40 bytes inside of freed 184-byte region [ffff8880373c5ba0, ffff8880373c5c58) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x373c5 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000000 ffff88801c46cdc0 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080100010 00000000f5000000 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 0xd2800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5346, tgid 5345 (syz.0.0), ts 86767772395, free_ts 83508745606 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x290 mm/page_alloc.c:1846 prep_new_page mm/page_alloc.c:1854 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab+0x86/0x3b0 mm/slub.c:3248 new_slab mm/slub.c:3302 [inline] ___slab_alloc+0xf2b/0x1960 mm/slub.c:4651 __slab_alloc+0x65/0x100 mm/slub.c:4774 __slab_alloc_node mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:5246 [inline] kmem_cache_alloc_noprof+0x40f/0x710 mm/slub.c:5265 mempool_alloc_noprof+0x1c9/0x2f0 mm/mempool.c:567 alloc_metapage fs/jfs/jfs_metapage.c:264 [inline] __get_metapage+0x50c/0xde0 fs/jfs/jfs_metapage.c:760 diIAGRead fs/jfs/jfs_imap.c:2672 [inline] diAllocExt fs/jfs/jfs_imap.c:1918 [inline] diAllocAG+0x63b/0x1df0 fs/jfs/jfs_imap.c:1669 diAlloc+0x1d5/0x1680 fs/jfs/jfs_imap.c:1590 ialloc+0x8c/0x8f0 fs/jfs/jfs_inode.c:56 jfs_mkdir+0x193/0xa70 fs/jfs/namei.c:225 vfs_mkdir+0x512/0x5b0 fs/namei.c:5130 do_mkdirat+0x276/0x4b0 fs/namei.c:5164 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2943 __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0xd70/0x1870 kernel/rcu/tree.c:2857 handle_softirqs+0x27d/0x850 kernel/softirq.c:622 run_ksoftirqd+0x9b/0x100 kernel/softirq.c:1063 smpboot_thread_fn+0x542/0xa60 kernel/smpboot.c:160 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Memory state around the buggy address: ffff8880373c5a80: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 ffff8880373c5b00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc >ffff8880373c5b80: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880373c5c00: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc ffff8880373c5c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================