================================================================== BUG: KASAN: slab-use-after-free in ma_dead_node lib/maple_tree.c:575 [inline] BUG: KASAN: slab-use-after-free in mas_rewalk_if_dead lib/maple_tree.c:4415 [inline] BUG: KASAN: slab-use-after-free in mas_next_slot+0x18b/0xb00 lib/maple_tree.c:4697 Read of size 8 at addr ffff888104b28a00 by task syz.2.46/4876 CPU: 0 UID: 0 PID: 4876 Comm: syz.2.46 Not tainted 6.16.0-rc5-syzkaller #0 PREEMPT(none) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x18a/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x230 mm/kasan/report.c:480 kasan_report+0x118/0x150 mm/kasan/report.c:593 ma_dead_node lib/maple_tree.c:575 [inline] mas_rewalk_if_dead lib/maple_tree.c:4415 [inline] mas_next_slot+0x18b/0xb00 lib/maple_tree.c:4697 mas_find+0x9cc/0xc00 lib/maple_tree.c:6062 vma_find include/linux/mm.h:855 [inline] remap_move mm/mremap.c:1819 [inline] do_mremap mm/mremap.c:1904 [inline] __do_sys_mremap mm/mremap.c:1968 [inline] __se_sys_mremap+0xb09/0xd70 mm/mremap.c:1936 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x8f/0x250 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f2fbc2fe929 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:00007f2fbbd6f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000019 RAX: ffffffffffffffda RBX: 00007f2fbc525fa0 RCX: 00007f2fbc2fe929 RDX: 0000000000600002 RSI: 0000000000600002 RDI: 0000200000000000 RBP: 00007f2fbc380b39 R08: 0000200000a00000 R09: 0000000000000000 R10: 0000000000000007 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f2fbc525fa0 R15: 00007ffd237a5788 Allocated by task 4876: 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:319 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4149 [inline] kmem_cache_alloc_bulk_noprof+0x40d/0x640 mm/slub.c:5375 mt_alloc_bulk lib/maple_tree.c:181 [inline] mas_alloc_nodes+0x3ed/0x870 lib/maple_tree.c:1277 mas_node_count_gfp lib/maple_tree.c:1337 [inline] mas_preallocate+0x809/0xd30 lib/maple_tree.c:5537 vma_iter_prealloc mm/vma.h:463 [inline] __split_vma+0x290/0xa20 mm/vma.c:528 vms_gather_munmap_vmas+0x2de/0x1030 mm/vma.c:1359 __mmap_prepare mm/vma.c:2361 [inline] __mmap_region mm/vma.c:2653 [inline] mmap_region+0x715/0x1f70 mm/vma.c:2741 do_mmap+0xc30/0x10b0 mm/mmap.c:561 vm_mmap_pgoff+0x200/0x3e0 mm/util.c:579 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x8f/0x250 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 1330: 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:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2382 [inline] slab_free mm/slub.c:4644 [inline] kmem_cache_free+0x175/0x460 mm/slub.c:4746 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0xbee/0x1530 kernel/rcu/tree.c:2832 handle_softirqs+0x19a/0x500 kernel/softirq.c:579 do_softirq+0xde/0x170 kernel/softirq.c:480 __local_bh_enable_ip+0x6b/0x70 kernel/softirq.c:407 spin_unlock_bh include/linux/spinlock.h:396 [inline] cfg80211_inform_single_bss_data+0xf62/0x18a0 net/wireless/scan.c:2383 cfg80211_inform_bss_data+0x1f0/0x3690 net/wireless/scan.c:3222 cfg80211_inform_bss_frame_data+0x3d5/0x680 net/wireless/scan.c:3313 ieee80211_bss_info_update+0x578/0x7b0 net/mac80211/scan.c:226 ieee80211_rx_bss_info net/mac80211/ibss.c:1094 [inline] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1573 [inline] ieee80211_ibss_rx_queued_mgmt+0x92d/0x2710 net/mac80211/ibss.c:1600 ieee80211_iface_process_skb net/mac80211/iface.c:1668 [inline] ieee80211_iface_work+0x7c3/0xf20 net/mac80211/iface.c:1722 cfg80211_wiphy_work+0x2e9/0x530 net/wireless/core.c:435 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xa3d/0x1530 kernel/workqueue.c:3321 worker_thread+0xa03/0xeb0 kernel/workqueue.c:3402 kthread+0x66a/0x760 kernel/kthread.c:464 ret_from_fork+0x1b7/0x380 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:548 __call_rcu_common kernel/rcu/tree.c:3094 [inline] call_rcu+0x14a/0x790 kernel/rcu/tree.c:3214 mas_wr_node_store lib/maple_tree.c:3893 [inline] mas_wr_store_entry+0x19c1/0x2960 lib/maple_tree.c:4104 mas_store_prealloc+0xc77/0x1330 lib/maple_tree.c:5510 vma_iter_store_new mm/vma.h:509 [inline] vma_complete+0x419/0xbc0 mm/vma.c:354 __split_vma+0x8df/0xa20 mm/vma.c:568 vms_gather_munmap_vmas+0x2de/0x1030 mm/vma.c:1359 do_vmi_align_munmap+0x246/0x390 mm/vma.c:1527 do_vmi_munmap+0x253/0x2e0 mm/vma.c:1584 do_munmap+0xe1/0x140 mm/mmap.c:1071 mremap_to+0x304/0x7b0 mm/mremap.c:1367 remap_move mm/mremap.c:1861 [inline] do_mremap mm/mremap.c:1904 [inline] __do_sys_mremap mm/mremap.c:1968 [inline] __se_sys_mremap+0xa85/0xd70 mm/mremap.c:1936 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x8f/0x250 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888104b28a00 which belongs to the cache maple_node of size 256 The buggy address is located 0 bytes inside of freed 256-byte region [ffff888104b28a00, ffff888104b28b00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104b28 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff888100091000 ffffea00045e3580 dead000000000002 raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 head: 0200000000000040 ffff888100091000 ffffea00045e3580 dead000000000002 head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 head: 0200000000000001 ffffea000412ca01 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x52800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP), pid 26, tgid 26 (kdevtmpfs), ts 7639518065, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x168/0x1a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x295c/0x2aa0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x26b/0x460 mm/page_alloc.c:5148 alloc_pages_mpol+0xd1/0x330 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2452 [inline] allocate_slab+0x8a/0x350 mm/slub.c:2620 new_slab mm/slub.c:2674 [inline] ___slab_alloc+0x9dc/0x10e0 mm/slub.c:3860 __kmem_cache_alloc_bulk mm/slub.c:5295 [inline] kmem_cache_alloc_bulk_noprof+0x1c7/0x640 mm/slub.c:5367 mt_alloc_bulk lib/maple_tree.c:181 [inline] mas_alloc_nodes+0x3ed/0x870 lib/maple_tree.c:1277 mas_insert+0x38c/0x7c0 lib/maple_tree.c:4325 mas_alloc_cyclic+0x20e/0x630 lib/maple_tree.c:4388 mtree_alloc_cyclic+0x196/0x220 lib/maple_tree.c:6527 simple_offset_add+0xdc/0x190 fs/libfs.c:300 shmem_mknod+0xfa/0x1d0 mm/shmem.c:3871 vfs_mknod+0x37c/0x3c0 fs/namei.c:4244 handle_create drivers/base/devtmpfs.c:233 [inline] handle drivers/base/devtmpfs.c:389 [inline] devtmpfs_work_loop+0x98b/0xcf0 drivers/base/devtmpfs.c:404 devtmpfsd+0x4d/0x50 drivers/base/devtmpfs.c:446 page_owner free stack trace missing Memory state around the buggy address: ffff888104b28900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888104b28980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888104b28a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888104b28a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888104b28b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================