================================================================== BUG: KASAN: slab-out-of-bounds in mt_slot lib/maple_tree.c:816 [inline] BUG: KASAN: slab-out-of-bounds in mas_slot lib/maple_tree.c:849 [inline] BUG: KASAN: slab-out-of-bounds in mt_validate_nulls+0xc04/0xd10 lib/maple_tree.c:7172 Read of size 8 at addr ffff88807b127100 by task syz-executor.4/11493 CPU: 1 PID: 11493 Comm: syz-executor.4 Not tainted 6.4.0-syzkaller-10173-ga901a3568fd2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:364 print_report mm/kasan/report.c:475 [inline] kasan_report+0x11d/0x130 mm/kasan/report.c:588 mt_slot lib/maple_tree.c:816 [inline] mas_slot lib/maple_tree.c:849 [inline] mt_validate_nulls+0xc04/0xd10 lib/maple_tree.c:7172 mt_validate+0x17e3/0x4370 lib/maple_tree.c:7227 validate_mm+0x9d/0x470 mm/mmap.c:300 do_vmi_align_munmap+0x1199/0x1680 mm/mmap.c:2561 do_vmi_munmap+0x266/0x430 mm/mmap.c:2619 __vm_munmap+0x137/0x380 mm/mmap.c:2899 __do_sys_munmap mm/mmap.c:2916 [inline] __se_sys_munmap mm/mmap.c:2913 [inline] __x64_sys_munmap+0x62/0x80 mm/mmap.c:2913 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fc19708c467 Code: 00 00 00 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb 85 66 2e 0f 1f 84 00 00 00 00 00 90 b8 0b 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc197e80f38 EFLAGS: 00000246 ORIG_RAX: 000000000000000b RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fc19708c467 RDX: 0000000000080000 RSI: 0000000000080000 RDI: 00007fc18d7ff000 RBP: 00007fc18d7ff000 R08: 0000000000000000 R09: 000000000000066c R10: 0000000000080000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc197e80fdc R14: 00007fc197e80fe0 R15: 00000000200008c2 Allocated by task 11493: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x7f/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:750 [inline] kmem_cache_alloc_bulk+0x2d0/0x3e0 mm/slab.c:3481 mt_alloc_bulk lib/maple_tree.c:164 [inline] mas_alloc_nodes+0x341/0x8b0 lib/maple_tree.c:1304 mas_node_count_gfp lib/maple_tree.c:1362 [inline] mas_preallocate+0x1bb/0x360 lib/maple_tree.c:5546 vma_iter_prealloc mm/internal.h:1032 [inline] __split_vma+0x1b7/0x830 mm/mmap.c:2344 do_vmi_align_munmap+0x413/0x1680 mm/mmap.c:2477 do_vmi_munmap+0x266/0x430 mm/mmap.c:2619 __vm_munmap+0x137/0x380 mm/mmap.c:2899 __do_sys_munmap mm/mmap.c:2916 [inline] __se_sys_munmap mm/mmap.c:2913 [inline] __x64_sys_munmap+0x62/0x80 mm/mmap.c:2913 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0x78/0x80 mm/kasan/generic.c:491 __call_rcu_common.constprop.0+0x99/0x7e0 kernel/rcu/tree.c:2649 ma_free_rcu lib/maple_tree.c:189 [inline] mas_free lib/maple_tree.c:1344 [inline] mas_replace+0x98c/0xfa0 lib/maple_tree.c:1785 mas_wr_node_store+0xcab/0x1170 lib/maple_tree.c:4151 mas_wr_modify+0x28b/0x10d0 lib/maple_tree.c:4346 mas_wr_store_entry.isra.0+0x495/0x1030 lib/maple_tree.c:4390 mas_store_prealloc+0xb3/0x270 lib/maple_tree.c:5529 vma_complete+0x8fd/0xdc0 mm/mmap.c:553 __split_vma+0x53b/0x830 mm/mmap.c:2381 split_vma+0xc6/0x110 mm/mmap.c:2409 mprotect_fixup+0x891/0xbd0 mm/mprotect.c:643 do_mprotect_pkey+0x883/0xd40 mm/mprotect.c:817 __do_sys_mprotect mm/mprotect.c:838 [inline] __se_sys_mprotect mm/mprotect.c:835 [inline] __x64_sys_mprotect+0x78/0xb0 mm/mprotect.c:835 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Second to last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0x78/0x80 mm/kasan/generic.c:491 __call_rcu_common.constprop.0+0x99/0x7e0 kernel/rcu/tree.c:2649 ma_free_rcu lib/maple_tree.c:189 [inline] mas_free lib/maple_tree.c:1344 [inline] mas_replace+0x98c/0xfa0 lib/maple_tree.c:1785 mas_wr_node_store+0xcab/0x1170 lib/maple_tree.c:4151 mas_wr_modify+0x28b/0x10d0 lib/maple_tree.c:4346 mas_wr_store_entry.isra.0+0x495/0x1030 lib/maple_tree.c:4390 mas_store_prealloc+0xb3/0x270 lib/maple_tree.c:5529 mmap_region+0x91c/0x2570 mm/mmap.c:2811 do_mmap+0x850/0xee0 mm/mmap.c:1362 vm_mmap_pgoff+0x1a2/0x3b0 mm/util.c:543 ksys_mmap_pgoff+0x7d/0x5b0 mm/mmap.c:1408 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88807b127000 which belongs to the cache maple_node of size 256 The buggy address is located 0 bytes to the right of allocated 256-byte region [ffff88807b127000, ffff88807b127100) The buggy address belongs to the physical page: page:ffffea0001ec49c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88807b127800 pfn:0x7b127 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0x4() raw: 00fff00000000200 ffff888012874200 ffffea00007c29d0 ffffea0000aa4350 raw: ffff88807b127800 ffff88807b127000 0000000100000004 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 0x3420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 5514, tgid 5514 (syz-executor.4), ts 244463953447, free_ts 238745938680 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0xfed/0x2d30 mm/page_alloc.c:3221 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4477 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1356 [inline] cache_grow_begin+0x9b/0x3b0 mm/slab.c:2550 cache_alloc_refill+0x289/0x3a0 mm/slab.c:2923 ____cache_alloc mm/slab.c:2999 [inline] ____cache_alloc mm/slab.c:2982 [inline] __do_cache_alloc mm/slab.c:3182 [inline] kmem_cache_alloc_bulk+0x31e/0x3e0 mm/slab.c:3467 mt_alloc_bulk lib/maple_tree.c:164 [inline] mas_alloc_nodes+0x341/0x8b0 lib/maple_tree.c:1304 mas_node_count_gfp lib/maple_tree.c:1362 [inline] mas_preallocate+0x1bb/0x360 lib/maple_tree.c:5546 vma_iter_prealloc mm/internal.h:1032 [inline] vma_expand+0x1fb/0x6e0 mm/mmap.c:665 mmap_region+0x150f/0x2570 mm/mmap.c:2711 do_mmap+0x850/0xee0 mm/mmap.c:1362 vm_mmap_pgoff+0x1a2/0x3b0 mm/util.c:543 ksys_mmap_pgoff+0x42b/0x5b0 mm/mmap.c:1408 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1161 [inline] free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2348 free_unref_page+0x33/0x370 mm/page_alloc.c:2443 slab_destroy mm/slab.c:1608 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1628 cache_flusharray mm/slab.c:3341 [inline] ___cache_free+0x2c5/0x410 mm/slab.c:3404 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x4f/0x1a0 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x195/0x220 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:750 [inline] slab_alloc_node mm/slab.c:3237 [inline] kmem_cache_alloc_node+0x2a0/0x530 mm/slab.c:3509 __alloc_skb+0x288/0x330 net/core/skbuff.c:634 alloc_skb include/linux/skbuff.h:1289 [inline] nlmsg_new include/net/netlink.h:1003 [inline] inet6_netconf_notify_devconf+0xa4/0x1f0 net/ipv6/addrconf.c:581 __addrconf_sysctl_unregister net/ipv6/addrconf.c:7122 [inline] addrconf_sysctl_unregister+0x131/0x1c0 net/ipv6/addrconf.c:7146 addrconf_ifdown.isra.0+0x1350/0x1940 net/ipv6/addrconf.c:3908 addrconf_notify+0x104/0x19b0 net/ipv6/addrconf.c:3678 notifier_call_chain+0xb6/0x3c0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1962 call_netdevice_notifiers_extack net/core/dev.c:2000 [inline] call_netdevice_notifiers net/core/dev.c:2014 [inline] unregister_netdevice_many_notify+0x75f/0x18c0 net/core/dev.c:10850 Memory state around the buggy address: ffff88807b127000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807b127080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807b127100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807b127180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807b127200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================