================================================================== BUG: KASAN: slab-use-after-free in crc_itu_t+0xd7/0xe0 lib/crc-itu-t.c:60 Read of size 1 at addr ffff88807b634000 by task syz-executor948/5094 CPU: 1 PID: 5094 Comm: syz-executor948 Not tainted 6.7.0-rc4-syzkaller-00009-gbee0e7762ad2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 crc_itu_t+0xd7/0xe0 lib/crc-itu-t.c:60 udf_finalize_lvid+0xf2/0x1f0 fs/udf/super.c:1984 udf_close_lvid+0x462/0x5c0 fs/udf/super.c:2052 udf_put_super+0x19c/0x200 fs/udf/super.c:2322 generic_shutdown_super+0x161/0x3d0 fs/super.c:696 kill_block_super+0x3b/0x90 fs/super.c:1667 deactivate_locked_super+0xbc/0x1a0 fs/super.c:484 deactivate_super+0xde/0x100 fs/super.c:517 cleanup_mnt+0x222/0x450 fs/namespace.c:1256 task_work_run+0x14d/0x240 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x217/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1e/0x60 kernel/entry/common.c:296 do_syscall_64+0x4d/0x110 arch/x86/entry/common.c:88 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f3aa0f336c7 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffd48e7e208 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f3aa0f336c7 RDX: 0000000000000000 RSI: 000000000000000a RDI: 00007ffd48e7e2c0 RBP: 00007ffd48e7e2c0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffd48e7f330 R13: 00005555561846c0 R14: 431bde82d7b634db R15: 00007ffd48e7f350 Allocated by task 4720: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:763 [inline] kmem_cache_alloc_bulk+0x32e/0x3f0 mm/slab.c:3481 mt_alloc_bulk lib/maple_tree.c:165 [inline] mas_alloc_nodes+0x39c/0x830 lib/maple_tree.c:1287 mas_node_count_gfp+0x105/0x130 lib/maple_tree.c:1345 mas_preallocate+0x2d7/0xda0 lib/maple_tree.c:5520 vma_iter_prealloc mm/internal.h:1149 [inline] __split_vma+0x431/0x1070 mm/mmap.c:2378 do_vmi_align_munmap+0x2c3/0x1600 mm/mmap.c:2566 do_vmi_munmap+0x20e/0x450 mm/mmap.c:2725 mmap_region+0x18c/0x2830 mm/mmap.c:2776 do_mmap+0x893/0xef0 mm/mmap.c:1379 vm_mmap_pgoff+0x1a8/0x3c0 mm/util.c:556 ksys_mmap_pgoff+0x422/0x5b0 mm/mmap.c:1425 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:86 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0x78/0x80 mm/kasan/generic.c:492 __call_rcu_common.constprop.0+0x9a/0x7a0 kernel/rcu/tree.c:2681 mas_free lib/maple_tree.c:1327 [inline] mas_replace_node lib/maple_tree.c:1761 [inline] mas_wr_node_store+0xdfb/0x1890 lib/maple_tree.c:3995 mas_wr_modify lib/maple_tree.c:4229 [inline] mas_wr_store_entry.isra.0+0x548/0xe40 lib/maple_tree.c:4269 mas_store_gfp+0xba/0x190 lib/maple_tree.c:5437 vma_iter_store_gfp mm/internal.h:1209 [inline] do_brk_flags+0x714/0x1860 mm/mmap.c:3212 __do_sys_brk+0x6d8/0xb20 mm/mmap.c:259 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b Second to last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0x78/0x80 mm/kasan/generic.c:492 __call_rcu_common.constprop.0+0x9a/0x7a0 kernel/rcu/tree.c:2681 mas_free lib/maple_tree.c:1327 [inline] mas_replace_node lib/maple_tree.c:1761 [inline] mas_wr_node_store+0xdfb/0x1890 lib/maple_tree.c:3995 mas_wr_modify lib/maple_tree.c:4229 [inline] mas_wr_store_entry.isra.0+0x548/0xe40 lib/maple_tree.c:4269 mas_store_prealloc+0xb3/0x270 lib/maple_tree.c:5460 vma_complete+0x8ff/0xdf0 mm/mmap.c:532 __split_vma+0xd35/0x1070 mm/mmap.c:2411 do_vmi_align_munmap+0x360/0x1600 mm/mmap.c:2579 do_vmi_munmap+0x20e/0x450 mm/mmap.c:2725 mmap_region+0x18c/0x2830 mm/mmap.c:2776 do_mmap+0x893/0xef0 mm/mmap.c:1379 vm_mmap_pgoff+0x1a8/0x3c0 mm/util.c:556 ksys_mmap_pgoff+0x422/0x5b0 mm/mmap.c:1425 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:86 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff88807b634000 which belongs to the cache maple_node of size 256 The buggy address is located 0 bytes inside of freed 256-byte region [ffff88807b634000, ffff88807b634100) The buggy address belongs to the physical page: page:ffffea0001ed8d00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88807b634800 pfn:0x7b634 flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0x6() raw: 00fff00000000800 ffff888013074200 ffffea0001e514d0 ffffea0001e9ff10 raw: ffff88807b634800 ffff88807b634000 0000000100000006 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 0x242000(__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 4570, tgid 4570 (v4l_id), ts 34462777700, free_ts 34456480106 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0xa25/0x36d0 mm/page_alloc.c:3312 __alloc_pages+0x22e/0x2420 mm/page_alloc.c:4568 __alloc_pages_node include/linux/gfp.h:238 [inline] kmem_getpages mm/slab.c:1356 [inline] cache_grow_begin+0x99/0x3a0 mm/slab.c:2550 cache_alloc_refill+0x295/0x3b0 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+0x263/0x3f0 mm/slab.c:3467 mt_alloc_bulk lib/maple_tree.c:165 [inline] mas_alloc_nodes+0x39c/0x830 lib/maple_tree.c:1287 mas_node_count_gfp+0x105/0x130 lib/maple_tree.c:1345 mas_node_count lib/maple_tree.c:1359 [inline] mas_wr_spanning_store.isra.0+0x293/0x1010 lib/maple_tree.c:3857 mas_wr_store_entry.isra.0+0x904/0xe40 lib/maple_tree.c:4257 mas_store_gfp+0xba/0x190 lib/maple_tree.c:5437 vma_iter_clear_gfp mm/internal.h:1161 [inline] do_vmi_align_munmap+0xca1/0x1600 mm/mmap.c:2637 do_vmi_munmap+0x20e/0x450 mm/mmap.c:2725 mmap_region+0x18c/0x2830 mm/mmap.c:2776 do_mmap+0x893/0xef0 mm/mmap.c:1379 vm_mmap_pgoff+0x1a8/0x3c0 mm/util.c:556 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x4fa/0xaa0 mm/page_alloc.c:2347 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2487 slab_destroy mm/slab.c:1608 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1628 cache_flusharray mm/slab.c:3341 [inline] ___cache_free+0x2b7/0x420 mm/slab.c:3404 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x4c/0x1b0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:763 [inline] slab_alloc_node mm/slab.c:3237 [inline] slab_alloc mm/slab.c:3246 [inline] __kmem_cache_alloc_lru mm/slab.c:3423 [inline] kmem_cache_alloc+0x159/0x360 mm/slab.c:3432 vm_area_alloc+0x1f/0x220 kernel/fork.c:485 mmap_region+0x3a5/0x2830 mm/mmap.c:2836 do_mmap+0x893/0xef0 mm/mmap.c:1379 vm_mmap_pgoff+0x1a8/0x3c0 mm/util.c:556 ksys_mmap_pgoff+0x422/0x5b0 mm/mmap.c:1425 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:86 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b Memory state around the buggy address: ffff88807b633f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807b633f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807b634000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807b634080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807b634100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================