loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: use-after-free in diWrite+0xde3/0x19b0 fs/jfs/jfs_imap.c:753 Write of size 32 at addr ffff888078c340c0 by task syz.0.16/6038 CPU: 0 UID: 0 PID: 6038 Comm: syz.0.16 Not tainted 6.14.0-rc1-syzkaller-00235-g9946eaf552b1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 diWrite+0xde3/0x19b0 fs/jfs/jfs_imap.c:753 txCommit+0xa1a/0x6b90 fs/jfs/jfs_txnmgr.c:1255 add_missing_indices+0x8b3/0xbf0 fs/jfs/jfs_dtree.c:2663 jfs_readdir+0x1fc5/0x3c50 fs/jfs/jfs_dtree.c:3019 wrap_directory_iterator+0x91/0xd0 fs/readdir.c:65 iterate_dir+0x5a9/0x760 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:403 [inline] __se_sys_getdents64+0x1e2/0x4b0 fs/readdir.c:389 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7febcb98cde9 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:00007febcabfe038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007febcbba5fa0 RCX: 00007febcb98cde9 RDX: 0000000000001000 RSI: 0000400000000f80 RDI: 0000000000000005 RBP: 00007febcba0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007febcbba5fa0 R15: 00007fffe7a36ab8 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888078c34780 pfn:0x78c34 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001e30d48 ffffea00019334c8 0000000000000000 raw: ffff888078c34780 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5834, tgid 5834 (syz-executor), ts 66468307577, free_ts 77944572169 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4739 alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:2423 [inline] allocate_slab+0x8f/0x3a0 mm/slub.c:2587 new_slab mm/slub.c:2640 [inline] ___slab_alloc+0xc27/0x14a0 mm/slub.c:3826 __slab_alloc+0x58/0xa0 mm/slub.c:3916 __slab_alloc_node mm/slub.c:3991 [inline] slab_alloc_node mm/slub.c:4152 [inline] kmem_cache_alloc_noprof+0x268/0x380 mm/slub.c:4171 __proc_create+0x44f/0xa50 fs/proc/generic.c:427 proc_create_reg+0x90/0x110 fs/proc/generic.c:554 proc_create_net_single+0xb8/0x1b0 fs/proc/proc_net.c:214 can_init_proc+0xfd/0x360 net/can/proc.c:444 can_pernet_init+0x2ad/0x2d0 net/can/af_can.c:808 ops_init+0x31e/0x590 net/core/net_namespace.c:138 setup_net+0x287/0x9e0 net/core/net_namespace.c:362 copy_net_ns+0x33f/0x570 net/core/net_namespace.c:516 page last free pid 5945 tgid 5945 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0xe04/0x10e0 mm/page_alloc.c:2660 discard_slab mm/slub.c:2684 [inline] __put_partials+0x160/0x1c0 mm/slub.c:3153 put_cpu_partial+0x17c/0x250 mm/slub.c:3228 __slab_free+0x290/0x380 mm/slub.c:4479 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4115 [inline] slab_alloc_node mm/slub.c:4164 [inline] kmem_cache_alloc_noprof+0x1d9/0x380 mm/slub.c:4171 __kernfs_new_node+0xd8/0x870 fs/kernfs/dir.c:624 kernfs_new_node+0x137/0x240 fs/kernfs/dir.c:700 kernfs_create_link+0xa5/0x1f0 fs/kernfs/symlink.c:39 sysfs_do_create_link_sd+0x85/0x110 fs/sysfs/symlink.c:44 cfg80211_register_wdev+0x29d/0x410 net/wireless/core.c:1457 cfg80211_register_netdevice+0x1aa/0x2f0 net/wireless/core.c:1486 ieee80211_if_add+0xfa9/0x14f0 net/mac80211/iface.c:2214 ieee80211_register_hw+0x367d/0x4240 net/mac80211/main.c:1604 Memory state around the buggy address: ffff888078c33f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888078c34000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888078c34080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888078c34100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888078c34180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================