syzkaller login: [ 52.686360] BUG: Bad rss-counter state mm:00000000f6847447 type:MM_FILEPAGES val:33 [ 52.687857] BUG: Bad rss-counter state mm:00000000f6847447 type:MM_ANONPAGES val:22 [ 52.861447] ================================================================== [ 52.862356] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 52.863455] Read of size 8 at addr ffff8880094f46b0 by task sshd/222 [ 52.864231] [ 52.864450] CPU: 1 PID: 222 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 52.865338] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 52.866343] Call Trace: [ 52.866669] [ 52.866961] dump_stack_lvl+0x91/0xf0 [ 52.867448] print_report+0xcc/0x620 [ 52.867930] ? __virt_addr_valid+0x102/0x340 [ 52.868485] ? vma_interval_tree_remove+0xc75/0xec0 [ 52.869107] ? vma_interval_tree_remove+0xc75/0xec0 [ 52.869751] kasan_report+0xbe/0xf0 [ 52.870223] ? vma_interval_tree_remove+0xc75/0xec0 [ 52.870846] vma_interval_tree_remove+0xc75/0xec0 [ 52.871448] vma_prepare+0xc54/0x11a0 [ 52.871925] __split_vma+0x5af/0x950 [ 52.872394] ? __pfx___split_vma+0x10/0x10 [ 52.872915] ? find_held_lock+0x2c/0x110 [ 52.873430] do_vmi_align_munmap+0x2ba/0x11f0 [ 52.874000] ? lock_is_held_type+0x9f/0x120 [ 52.874530] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 52.875128] ? mtree_range_walk+0x632/0x900 [ 52.875674] ? mas_walk+0x5c7/0x7c0 [ 52.876142] do_vmi_munmap+0x1f1/0x2b0 [ 52.876632] mmap_region+0x1f9/0x2660 [ 52.877112] ? vm_mmap_pgoff+0x15c/0x3a0 [ 52.877637] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 52.878351] ? __pfx_lock_acquire+0x10/0x10 [ 52.878881] ? __pfx_mmap_region+0x10/0x10 [ 52.879407] ? security_mmap_addr+0x7d/0xa0 [ 52.879946] ? get_unmapped_area+0x1f5/0x3f0 [ 52.880496] do_mmap+0x854/0xf00 [ 52.880937] vm_mmap_pgoff+0x1a6/0x3a0 [ 52.881428] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 52.881996] ksys_mmap_pgoff+0x3af/0x500 [ 52.882504] do_syscall_64+0x3f/0x90 [ 52.882976] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 52.883615] RIP: 0033:0x7f3bd8912d82 [ 52.884072] Code: eb aa 66 0f 1f 44 00 00 41 f7 c1 ff 0f 00 00 75 27 55 48 89 fd 53 89 cb 48 85 ff 74 33 41 89 da 48 89 ef b8 09 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 56 5b 5d c3 0f 1f 00 c7 05 ae 03 01 00 16 00 [ 52.886186] RSP: 002b:00007ffe0fdee348 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 52.887084] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f3bd8912d82 [ 52.887931] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f3bd7d4c000 [ 52.888786] RBP: 00007f3bd7d4c000 R08: 0000000000000009 R09: 0000000000001000 [ 52.889657] R10: 0000000000000812 R11: 0000000000000206 R12: 00005650889e9ec0 [ 52.890518] R13: 00007ffe0fdee360 R14: 00007ffe0fdee390 R15: 00007ffe0fdee6f0 [ 52.891375] [ 52.891666] [ 52.891888] Allocated by task 215: [ 52.892327] kasan_save_stack+0x22/0x50 [ 52.892832] kasan_set_track+0x25/0x30 [ 52.893322] __kasan_slab_alloc+0x59/0x70 [ 52.893853] kmem_cache_alloc+0x16b/0x370 [ 52.894367] vm_area_dup+0x20/0x160 [ 52.894817] __split_vma+0x170/0x950 [ 52.895279] split_vma+0xc6/0x110 [ 52.895722] mprotect_fixup+0x8d2/0xb30 [ 52.896229] do_mprotect_pkey+0x87e/0xd40 [ 52.896747] __x64_sys_mprotect+0x78/0xc0 [ 52.897270] do_syscall_64+0x3f/0x90 [ 52.897756] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 52.898388] [ 52.898600] Freed by task 215: [ 52.898992] kasan_save_stack+0x22/0x50 [ 52.899495] kasan_set_track+0x25/0x30 [ 52.899984] kasan_save_free_info+0x2b/0x50 [ 52.900510] __kasan_slab_free+0x10a/0x190 [ 52.901036] kmem_cache_free+0x10d/0x4d0 [ 52.901549] rcu_core+0x8c8/0x2860 [ 52.902010] __do_softirq+0x1b7/0x7d4 [ 52.902494] [ 52.902709] Last potentially related work creation: [ 52.903299] kasan_save_stack+0x22/0x50 [ 52.903802] __kasan_record_aux_stack+0x8e/0xa0 [ 52.904465] __call_rcu_common.constprop.0+0x6a/0xb90 [ 52.905106] remove_vma+0x139/0x170 [ 52.905555] do_vmi_align_munmap+0xd4a/0x11f0 [ 52.906129] do_vmi_munmap+0x1f1/0x2b0 [ 52.906608] __vm_munmap+0x138/0x3a0 [ 52.907078] __x64_sys_munmap+0x59/0x80 [ 52.907578] do_syscall_64+0x3f/0x90 [ 52.908056] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 52.908694] [ 52.908911] Second to last potentially related work creation: [ 52.909580] kasan_save_stack+0x22/0x50 [ 52.910094] __kasan_record_aux_stack+0x8e/0xa0 [ 52.910663] __call_rcu_common.constprop.0+0x6a/0xb90 [ 52.911298] remove_vma+0x139/0x170 [ 52.911744] do_vmi_align_munmap+0xd4a/0x11f0 [ 52.912301] do_vmi_munmap+0x1f1/0x2b0 [ 52.912783] mmap_region+0x1f9/0x2660 [ 52.913258] do_mmap+0x854/0xf00 [ 52.913699] vm_mmap_pgoff+0x1a6/0x3a0 [ 52.914186] ksys_mmap_pgoff+0x3af/0x500 [ 52.914684] do_syscall_64+0x3f/0x90 [ 52.915158] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 52.915804] [ 52.916016] The buggy address belongs to the object at ffff8880094f4658 [ 52.916016] which belongs to the cache vm_area_struct of size 168 [ 52.917466] The buggy address is located 88 bytes inside of [ 52.917466] freed 168-byte region [ffff8880094f4658, ffff8880094f4700) [ 52.918878] [ 52.919095] The buggy address belongs to the physical page: [ 52.919744] page:00000000ca131bd2 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x94f4 [ 52.920824] memcg:ffff88800e870f01 [ 52.921250] flags: 0x100000000000200(slab|node=0|zone=1) [ 52.921899] page_type: 0xffffffff() [ 52.922347] raw: 0100000000000200 ffff88800879fc80 ffffea00003ba2c0 dead000000000004 [ 52.923264] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800e870f01 [ 52.924184] page dumped because: kasan: bad access detected [ 52.924841] [ 52.925057] Memory state around the buggy address: [ 52.925653] ffff8880094f4580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 52.926511] ffff8880094f4600: 00 00 00 fc fc fc fc fc fc fc fc fa fb fb fb fb [ 52.927370] >ffff8880094f4680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 52.928221] ^ [ 52.928807] ffff8880094f4700: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 [ 52.929673] ffff8880094f4780: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc [ 52.930538] ================================================================== [ 52.931451] Disabling lock debugging due to kernel taint [ 55.045215] BUG: Bad rss-counter state mm:000000001b9dcbe5 type:MM_FILEPAGES val:33 [ 55.046234] BUG: Bad rss-counter state mm:000000001b9dcbe5 type:MM_ANONPAGES val:22 [ 55.512917] BUG: Bad rss-counter state mm:000000001c2e4777 type:MM_FILEPAGES val:33 [ 55.514059] BUG: Bad rss-counter state mm:000000001c2e4777 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:54082' (ECDSA) to the list of known hosts. 2023/06/20 04:25:02 fuzzer started 2023/06/20 04:25:02 dialing manager at localhost:44161 2023/06/20 04:25:02 checking machine... 2023/06/20 04:25:02 checking revisions... [ 56.235850] kmemleak: Automatic memory scanning thread ended 2023/06/20 04:25:02 testing simple program... [ 56.297328] cgroup: Unknown subsys name 'net' [ 56.363597] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 04:24:40 Registers: info registers vcpu 0 RAX=ffff8880102d0001 RBX=ffff88806ce09a98 RCX=0000000000000001 RDX=ffff8880102cff01 RSI=ffff8880102cff48 RDI=ffff88806ce09aa8 RBP=ffff8880102cff48 RSP=ffff88806ce099f0 R8 =0000000000000001 R9 =ffff88806ce09ad8 R10=0000000000038001 R11=00000000000b4fb9 R12=0000000000000008 R13=ffff8880102c8000 R14=ffff8880102cff48 R15=ffff88806ce09a98 RIP=ffffffff811304c9 RFL=00000202 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =0000 0000000000000000 00000000 00000000 CS =0010 0000000000000000 ffffffff 00a09b00 DPL=0 CS64 [-RA] SS =0018 0000000000000000 ffffffff 00c09300 DPL=0 DS [-WA] DS =0000 0000000000000000 00000000 00000000 FS =0000 00007fbb27d87900 00000000 00000000 GS =0000 ffff88806ce00000 00000000 00000000 LDT=0000 fffffe0000000000 00000000 00000000 TR =0040 fffffe0000003000 00004087 00008b00 DPL=0 TSS64-busy GDT= fffffe0000001000 0000007f IDT= fffffe0000000000 00000fff CR0=80050033 CR2=00007ffdbc9eb000 CR3=000000000cb9c000 CR4=00350ef0 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 DR6=00000000ffff0ff0 DR7=0000000000000400 EFER=0000000000000d01 FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80 FPR0=0000000000000000 0000 FPR1=0000000000000000 0000 FPR2=0000000000000000 0000 FPR3=0000000000000000 0000 FPR4=0000000000000000 0000 FPR5=0000000000000000 0000 FPR6=0000000000000000 0000 FPR7=0000000000000000 0000 XMM00=635f6e6f69737365733a4d41503d706f XMM01=6f6c5f6d61702c78756e696c65735f6d XMM02=61702c74696d7265705f6d61702c7469 XMM03=655f6d61702c7374696d696c5f6d6170 XMM04=3d6c616e696d72657420322e322e302e XMM05=3d656d616e74736f682022646873732f XMM06=746f6f72223d746363612078756e696c XMM07=6e655f6d61702c7374696d696c5f6d61 XMM08=652075253d64692073253d706f000000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=ffff88806cf35000 RBX=0000000000000001 RCX=ffffffff8450c50e RDX=ffffed100d9e6a01 RSI=0000000000000004 RDI=ffffffff812889a5 RBP=dffffc0000000000 RSP=ffff888008e27e70 R8 =0000000000000000 R9 =ffffed100d9e6a00 R10=ffff88806cf35003 R11=0000000000000001 R12=ffffffff85d3bed0 R13=1ffff110011c4fd3 R14=0000000000000000 R15=0000000000000000 RIP=ffffffff8450d49f RFL=00000246 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=1 ES =0000 0000000000000000 00000000 00000000 CS =0010 0000000000000000 ffffffff 00a09b00 DPL=0 CS64 [-RA] SS =0018 0000000000000000 ffffffff 00c09300 DPL=0 DS [-WA] DS =0000 0000000000000000 00000000 00000000 FS =0000 0000000000000000 00000000 00000000 GS =0000 ffff88806cf00000 00000000 00000000 LDT=0000 fffffe0000000000 00000000 00000000 TR =0040 fffffe000004a000 00004087 00008b00 DPL=0 TSS64-busy GDT= fffffe0000048000 0000007f IDT= fffffe0000000000 00000fff CR0=80050033 CR2=00007f0d16d394f0 CR3=000000000f610000 CR4=00350ee0 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 DR6=00000000ffff0ff0 DR7=0000000000000400 EFER=0000000000000d01 FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80 FPR0=0000000000000000 0000 FPR1=0000000000000000 0000 FPR2=0000000000000000 0000 FPR3=0000000000000000 0000 FPR4=0000000000000000 0000 FPR5=0000000000000000 0000 FPR6=0000000000000000 0000 FPR7=0000000000000000 0000 XMM00=00000000000000000000000000000000 XMM01=363e0222ff3aca954e425de50773bc2e XMM02=2c67c8bc2e329bc3000000000011cc08 XMM03=fb795ef6d657705600000000001240a8 XMM04=29b7488a102465a900000000000ae988 XMM05=59d5b690e0af863b0000000000134f88 XMM06=97d77c6bd33dea600000000000133df0 XMM07=e042d86d42eb936e0000000000124328 XMM08=f0a01524e2f60b0b000000000011cc68 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000