================================================================== BUG: KASAN: slab-use-after-free in jfs_readdir+0x11c1/0x3b40 fs/jfs/jfs_dtree.c:2881 Read of size 8 at addr ffff888026574bd0 by task syz.0.17/6372 CPU: 1 UID: 0 PID: 6372 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 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 jfs_readdir+0x11c1/0x3b40 fs/jfs/jfs_dtree.c:2881 wrap_directory_iterator+0x93/0xe0 fs/readdir.c:65 iterate_dir+0x396/0x570 fs/readdir.c:108 __do_sys_getdents fs/readdir.c:326 [inline] __se_sys_getdents+0xe4/0x250 fs/readdir.c:312 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x8a/0x300 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7ff18758eba9 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:00007ff188342038 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007ff1877d6090 RCX: 00007ff18758eba9 RDX: fffffffffffffd90 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007ff187611e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff1877d6128 R14: 00007ff1877d6090 R15: 00007fff27c60e18 Allocated by task 6371: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:330 [inline] __kasan_slab_alloc+0x4b/0x60 mm/kasan/common.c:356 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4191 [inline] slab_alloc_node mm/slub.c:4240 [inline] kmem_cache_alloc_noprof+0x1bc/0x390 mm/slub.c:4247 mempool_alloc_noprof+0x1a4/0x510 mm/mempool.c:406 alloc_metapage fs/jfs/jfs_metapage.c:264 [inline] __get_metapage+0x509/0xde0 fs/jfs/jfs_metapage.c:760 dtSplitRoot+0x202/0x16d0 fs/jfs/jfs_dtree.c:1910 dtSplitUp fs/jfs/jfs_dtree.c:993 [inline] dtInsert+0xef3/0x5ed0 fs/jfs/jfs_dtree.c:871 jfs_symlink+0x708/0xe60 fs/jfs/namei.c:1020 vfs_symlink+0x143/0x2f0 fs/namei.c:4730 do_symlinkat+0x1b1/0x3f0 fs/namei.c:4756 __do_sys_symlink fs/namei.c:4777 [inline] __se_sys_symlink fs/namei.c:4775 [inline] __x64_sys_symlink+0x7a/0x90 fs/namei.c:4775 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x8a/0x300 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x76/0x7e Freed by task 6372: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:243 [inline] __kasan_slab_free+0x41/0x50 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2422 [inline] slab_free mm/slub.c:4695 [inline] kmem_cache_free+0x1a4/0x410 mm/slub.c:4797 free_metapage fs/jfs/jfs_metapage.c:279 [inline] drop_metapage fs/jfs/jfs_metapage.c:316 [inline] release_metapage+0x859/0xac0 fs/jfs/jfs_metapage.c:892 dtReadNext fs/jfs/jfs_dtree.c:3202 [inline] jfs_readdir+0xf13/0x3b40 fs/jfs/jfs_dtree.c:2874 wrap_directory_iterator+0x93/0xe0 fs/readdir.c:65 iterate_dir+0x396/0x570 fs/readdir.c:108 __do_sys_getdents fs/readdir.c:326 [inline] __se_sys_getdents+0xe4/0x250 fs/readdir.c:312 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x8a/0x300 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x76/0x7e The buggy address belongs to the object at ffff888026574ba0 which belongs to the cache jfs_mp of size 184 The buggy address is located 48 bytes inside of freed 184-byte region [ffff888026574ba0, ffff888026574c58) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x26574 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801b7ef140 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000100010 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 6371, tgid 6370 (syz.0.17), ts 129108533413, free_ts 125401329290 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x24f/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x2b28/0x2cd0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2492 [inline] allocate_slab+0x8a/0x370 mm/slub.c:2660 new_slab mm/slub.c:2714 [inline] ___slab_alloc+0xc0e/0x1430 mm/slub.c:3901 __slab_alloc mm/slub.c:3992 [inline] __slab_alloc_node mm/slub.c:4067 [inline] slab_alloc_node mm/slub.c:4228 [inline] kmem_cache_alloc_noprof+0x27f/0x390 mm/slub.c:4247 mempool_alloc_noprof+0x1a4/0x510 mm/mempool.c:406 alloc_metapage fs/jfs/jfs_metapage.c:264 [inline] __get_metapage+0x509/0xde0 fs/jfs/jfs_metapage.c:760 diReadSpecial+0x25b/0x710 fs/jfs/jfs_imap.c:447 jfs_mount+0x73/0x870 fs/jfs/jfs_mount.c:87 jfs_fill_super+0x6bc/0xd80 fs/jfs/super.c:523 get_tree_bdev_flags+0x40e/0x4d0 fs/super.c:1692 vfs_get_tree+0x8f/0x290 fs/super.c:1815 do_new_mount+0x2a2/0x9e0 fs/namespace.c:3808 do_mount fs/namespace.c:4136 [inline] __do_sys_mount fs/namespace.c:4347 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4324 page last free pid 59 tgid 59 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbaa/0xd00 mm/page_alloc.c:2895 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0xc9f/0x1750 kernel/rcu/tree.c:2861 handle_softirqs+0x286/0x860 kernel/softirq.c:579 do_softirq+0xec/0x180 kernel/softirq.c:480 __local_bh_enable_ip+0x17b/0x1c0 kernel/softirq.c:407 spin_unlock_bh include/linux/spinlock.h:396 [inline] netif_addr_unlock_bh include/linux/netdevice.h:4823 [inline] __dev_mc_del net/core/dev_addr_lists.c:913 [inline] dev_mc_del+0xc8/0x110 net/core/dev_addr_lists.c:927 igmp6_group_dropped+0x20c/0x1010 net/ipv6/mcast.c:722 ipv6_mc_down+0xaa/0x5a0 net/ipv6/mcast.c:2765 addrconf_ifdown+0x17c1/0x1a10 net/ipv6/addrconf.c:3998 addrconf_notify+0x1bc/0x1010 net/ipv6/addrconf.c:-1 notifier_call_chain+0x1b6/0x3d0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2267 [inline] call_netdevice_notifiers net/core/dev.c:2281 [inline] netif_close_many+0x29c/0x410 net/core/dev.c:1784 unregister_netdevice_many_notify+0x7b7/0x1fe0 net/core/dev.c:12136 unregister_netdevice_many net/core/dev.c:12229 [inline] default_device_exit_batch+0x966/0x9e0 net/core/dev.c:12733 ops_exit_list net/core/net_namespace.c:204 [inline] ops_undo_list+0x522/0x990 net/core/net_namespace.c:251 cleanup_net+0x4c5/0x800 net/core/net_namespace.c:682 Memory state around the buggy address: ffff888026574a80: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 ffff888026574b00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc >ffff888026574b80: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb ^ ffff888026574c00: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc ffff888026574c80: fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================