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:312 [inline] BUG: KASAN: slab-use-after-free in release_metapage+0x717/0xa60 fs/jfs/jfs_metapage.c:893 Read of size 8 at addr ffff888031700218 by task syz.0.0/5318 CPU: 0 UID: 0 PID: 5318 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 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 drop_metapage fs/jfs/jfs_metapage.c:312 [inline] release_metapage+0x717/0xa60 fs/jfs/jfs_metapage.c:893 write_metapage fs/jfs/jfs_metapage.h:75 [inline] flush_metapage fs/jfs/jfs_metapage.h:81 [inline] ea_write+0x679/0xe20 fs/jfs/xattr.c:280 ea_put fs/jfs/xattr.c:626 [inline] __jfs_setxattr+0x96d/0x1190 fs/jfs/xattr.c:792 __jfs_xattr_set+0xda/0x170 fs/jfs/xattr.c:941 __vfs_setxattr+0x442/0x480 fs/xattr.c:223 __vfs_setxattr_noperm+0x12a/0x660 fs/xattr.c:257 vfs_setxattr+0x163/0x360 fs/xattr.c:344 ovl_do_setxattr fs/overlayfs/overlayfs.h:326 [inline] ovl_setxattr fs/overlayfs/overlayfs.h:338 [inline] ovl_verify_set_fh+0x136/0x200 fs/overlayfs/namei.c:556 ovl_verify_origin_fh fs/overlayfs/overlayfs.h:759 [inline] ovl_get_indexdir+0x1df/0x5f0 fs/overlayfs/super.c:857 ovl_fill_super_creds fs/overlayfs/super.c:1474 [inline] ovl_fill_super+0x34c9/0x4360 fs/overlayfs/super.c:1561 vfs_get_super fs/super.c:1390 [inline] get_tree_nodev+0xbb/0x150 fs/super.c:1409 vfs_get_tree+0x92/0x2a0 fs/super.c:1932 fc_mount fs/namespace.c:1198 [inline] do_new_mount_fc fs/namespace.c:3772 [inline] do_new_mount+0x319/0xdc0 fs/namespace.c:3848 do_mount fs/namespace.c:4181 [inline] __do_sys_mount fs/namespace.c:4397 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4374 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fa983f9e159 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fa984de2fe8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fa984225fa0 RCX: 00007fa983f9e159 RDX: 0000200000000100 RSI: 0000200000000080 RDI: 0000000000000000 RBP: 00007fa98403506b R08: 00002000000002c0 R09: 0000000000000000 R10: 0000000000018000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fa984226038 R14: 00007fa984225fa0 R15: 00007ffdeb290ec8 Allocated by task 5318: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:351 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:377 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4683 [inline] slab_alloc_node mm/slub.c:4996 [inline] kmem_cache_alloc_noprof+0x2b9/0x600 mm/slub.c:5010 mempool_alloc_noprof+0x1bf/0x300 mm/mempool.c:572 alloc_metapage fs/jfs/jfs_metapage.c:264 [inline] __get_metapage+0x4ed/0xdf0 fs/jfs/jfs_metapage.c:761 ea_write+0x604/0xe20 fs/jfs/xattr.c:256 ea_put fs/jfs/xattr.c:626 [inline] __jfs_setxattr+0x96d/0x1190 fs/jfs/xattr.c:792 __jfs_xattr_set+0xda/0x170 fs/jfs/xattr.c:941 __vfs_setxattr+0x442/0x480 fs/xattr.c:223 __vfs_setxattr_noperm+0x12a/0x660 fs/xattr.c:257 vfs_setxattr+0x163/0x360 fs/xattr.c:344 ovl_do_setxattr fs/overlayfs/overlayfs.h:326 [inline] ovl_setxattr fs/overlayfs/overlayfs.h:338 [inline] ovl_verify_set_fh+0x136/0x200 fs/overlayfs/namei.c:556 ovl_verify_origin_fh fs/overlayfs/overlayfs.h:759 [inline] ovl_get_indexdir+0x1df/0x5f0 fs/overlayfs/super.c:857 ovl_fill_super_creds fs/overlayfs/super.c:1474 [inline] ovl_fill_super+0x34c9/0x4360 fs/overlayfs/super.c:1561 vfs_get_super fs/super.c:1390 [inline] get_tree_nodev+0xbb/0x150 fs/super.c:1409 vfs_get_tree+0x92/0x2a0 fs/super.c:1932 fc_mount fs/namespace.c:1198 [inline] do_new_mount_fc fs/namespace.c:3772 [inline] do_new_mount+0x319/0xdc0 fs/namespace.c:3848 do_mount fs/namespace.c:4181 [inline] __do_sys_mount fs/namespace.c:4397 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4374 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 77: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:264 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:296 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2748 [inline] slab_free mm/slub.c:6509 [inline] kmem_cache_free+0x182/0x650 mm/slub.c:6636 mempool_free+0xec/0x130 mm/mempool.c:717 free_metapage fs/jfs/jfs_metapage.c:280 [inline] metapage_release_folio+0x462/0x590 fs/jfs/jfs_metapage.c:637 shrink_folio_list+0x233f/0x5250 mm/vmscan.c:1461 evict_folios+0x3055/0x3fb0 mm/vmscan.c:4910 try_to_shrink_lruvec+0xe3b/0x1340 mm/vmscan.c:5076 shrink_one+0x233/0x730 mm/vmscan.c:5117 shrink_many mm/vmscan.c:5180 [inline] lru_gen_shrink_node mm/vmscan.c:5258 [inline] shrink_node+0x35d0/0x3e30 mm/vmscan.c:6247 kswapd_shrink_node mm/vmscan.c:7101 [inline] balance_pgdat mm/vmscan.c:7279 [inline] kswapd+0x185e/0x32c0 mm/vmscan.c:7555 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff8880317001f0 which belongs to the cache jfs_mp of size 184 The buggy address is located 40 bytes inside of freed 184-byte region [ffff8880317001f0, ffff8880317002a8) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x31700 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000000 ffff8880313fb140 dead000000000122 0000000000000000 raw: 0000000000000000 0000000200100010 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 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 8852373369 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab+0x7d/0x620 mm/slub.c:3462 new_slab mm/slub.c:3513 [inline] refill_objects+0x2d5/0x350 mm/slub.c:7418 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] kmem_cache_alloc_noprof+0x399/0x600 mm/slub.c:5010 mempool_init_node+0x1f4/0x510 mm/mempool.c:272 mempool_create_node_noprof+0xb8/0x150 mm/mempool.c:336 metapage_init+0xed/0x150 fs/jfs/jfs_metapage.c:293 init_jfs_fs+0xfd/0x4e0 fs/jfs/super.c:969 do_one_initcall+0x250/0x870 init/main.c:1362 do_initcall_level+0x10a/0x1a0 init/main.c:1424 do_initcalls+0x59/0xa0 init/main.c:1440 kernel_init_freeable+0x29d/0x3e0 init/main.c:1675 kernel_init+0x22/0x1d0 init/main.c:1565 page_owner free stack trace missing Memory state around the buggy address: ffff888031700100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888031700180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fa fb >ffff888031700200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888031700280: fb fb fb fb fb fc fc fc fc fc fc fc fc 00 00 00 ffff888031700300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================