syzkaller login: [ 31.313330] BUG: Bad rss-counter state mm:000000006b688c4b type:MM_FILEPAGES val:33 [ 31.314577] BUG: Bad rss-counter state mm:000000006b688c4b type:MM_ANONPAGES val:22 [ 31.386685] ================================================================== [ 31.387776] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 31.388907] Read of size 8 at addr ffff88800d916880 by task sshd/219 [ 31.389955] [ 31.390235] CPU: 1 PID: 219 Comm: sshd Not tainted 6.4.0-rc7-next-20230620 #1 [ 31.391215] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 31.392285] Call Trace: [ 31.392630] [ 31.392943] dump_stack_lvl+0x91/0xf0 [ 31.393477] print_report+0xcc/0x620 [ 31.394002] ? __virt_addr_valid+0x102/0x340 [ 31.394597] ? vma_interval_tree_remove+0xc75/0xec0 [ 31.395261] ? vma_interval_tree_remove+0xc75/0xec0 [ 31.395925] kasan_report+0xbe/0xf0 [ 31.396432] ? vma_interval_tree_remove+0xc75/0xec0 [ 31.397082] vma_interval_tree_remove+0xc75/0xec0 [ 31.397687] vma_prepare+0xc54/0x11a0 [ 31.398213] __split_vma+0x5af/0x950 [ 31.398727] ? __pfx___split_vma+0x10/0x10 [ 31.399290] ? find_held_lock+0x2c/0x110 [ 31.399851] do_vmi_align_munmap+0x2ba/0x11f0 [ 31.400452] ? lock_is_held_type+0x9f/0x120 [ 31.401032] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 31.401685] ? mtree_range_walk+0x632/0x900 [ 31.402299] ? mas_walk+0x5c7/0x7c0 [ 31.402812] do_vmi_munmap+0x1f1/0x2b0 [ 31.403343] mmap_region+0x1f9/0x2660 [ 31.403865] ? vm_mmap_pgoff+0x15c/0x3a0 [ 31.404415] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 31.405193] ? __pfx_lock_acquire+0x10/0x10 [ 31.405768] ? __pfx_mmap_region+0x10/0x10 [ 31.406350] ? security_mmap_addr+0x7d/0xa0 [ 31.406923] ? get_unmapped_area+0x1f5/0x3f0 [ 31.407517] do_mmap+0x854/0xf00 [ 31.407988] vm_mmap_pgoff+0x1a6/0x3a0 [ 31.408523] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 31.409121] ksys_mmap_pgoff+0x3af/0x500 [ 31.409668] do_syscall_64+0x3f/0x90 [ 31.410200] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 31.410904] RIP: 0033:0x7f9810097d82 [ 31.411394] 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 [ 31.413692] RSP: 002b:00007ffc99697938 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 31.414674] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f9810097d82 [ 31.415588] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f980f4d1000 [ 31.416451] RBP: 00007f980f4d1000 R08: 0000000000000009 R09: 0000000000001000 [ 31.417345] R10: 0000000000000812 R11: 0000000000000206 R12: 000055d9b3f5aec0 [ 31.418270] R13: 00007ffc99697950 R14: 00007ffc99697980 R15: 00007ffc99697ce0 [ 31.419195] [ 31.419513] [ 31.419746] Allocated by task 212: [ 31.420177] kasan_save_stack+0x22/0x50 [ 31.420678] kasan_set_track+0x25/0x30 [ 31.421224] __kasan_slab_alloc+0x59/0x70 [ 31.421797] kmem_cache_alloc+0x16b/0x370 [ 31.422378] vm_area_dup+0x20/0x160 [ 31.422872] __split_vma+0x170/0x950 [ 31.423376] split_vma+0xc6/0x110 [ 31.423848] mprotect_fixup+0x8d2/0xb30 [ 31.424391] do_mprotect_pkey+0x87e/0xd40 [ 31.424947] __x64_sys_mprotect+0x78/0xc0 [ 31.425465] do_syscall_64+0x3f/0x90 [ 31.425966] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 31.426678] [ 31.426917] Freed by task 212: [ 31.427345] kasan_save_stack+0x22/0x50 [ 31.427889] kasan_set_track+0x25/0x30 [ 31.428428] kasan_save_free_info+0x2b/0x50 [ 31.429011] __kasan_slab_free+0x10a/0x190 [ 31.429604] kmem_cache_free+0x10d/0x4d0 [ 31.430161] rcu_core+0x8c8/0x2860 [ 31.430675] __do_softirq+0x1b7/0x7d4 [ 31.431198] [ 31.431432] Last potentially related work creation: [ 31.432049] kasan_save_stack+0x22/0x50 [ 31.432548] __kasan_record_aux_stack+0x8e/0xa0 [ 31.433158] __call_rcu_common.constprop.0+0x6a/0xb90 [ 31.433864] remove_vma+0x139/0x170 [ 31.434362] do_vmi_align_munmap+0xd4a/0x11f0 [ 31.434966] do_vmi_munmap+0x1f1/0x2b0 [ 31.435495] __vm_munmap+0x138/0x3a0 [ 31.435995] __x64_sys_munmap+0x59/0x80 [ 31.436491] do_syscall_64+0x3f/0x90 [ 31.436995] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 31.437709] [ 31.437945] Second to last potentially related work creation: [ 31.438706] kasan_save_stack+0x22/0x50 [ 31.439254] __kasan_record_aux_stack+0x8e/0xa0 [ 31.439880] __call_rcu_common.constprop.0+0x6a/0xb90 [ 31.440520] remove_vma+0x139/0x170 [ 31.441025] do_vmi_align_munmap+0xd4a/0x11f0 [ 31.441657] do_vmi_munmap+0x1f1/0x2b0 [ 31.442200] mmap_region+0x1f9/0x2660 [ 31.442717] do_mmap+0x854/0xf00 [ 31.443184] vm_mmap_pgoff+0x1a6/0x3a0 [ 31.443712] ksys_mmap_pgoff+0x3af/0x500 [ 31.444261] do_syscall_64+0x3f/0x90 [ 31.444780] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 31.445473] [ 31.445707] The buggy address belongs to the object at ffff88800d916828 [ 31.445707] which belongs to the cache vm_area_struct of size 168 [ 31.447322] The buggy address is located 88 bytes inside of [ 31.447322] freed 168-byte region [ffff88800d916828, ffff88800d9168d0) [ 31.448920] [ 31.449156] The buggy address belongs to the physical page: [ 31.449874] page:00000000673f87c5 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xd916 [ 31.451078] memcg:ffff88800da0a701 [ 31.451542] flags: 0x100000000000200(slab|node=0|zone=1) [ 31.452243] page_type: 0xffffffff() [ 31.452734] raw: 0100000000000200 ffff8880087a0c80 ffffea0000392180 dead000000000006 [ 31.453751] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800da0a701 [ 31.454758] page dumped because: kasan: bad access detected [ 31.455480] [ 31.455715] Memory state around the buggy address: [ 31.456361] ffff88800d916780: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc [ 31.457270] ffff88800d916800: fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb [ 31.458200] >ffff88800d916880: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc [ 31.459177] ^ [ 31.459649] ffff88800d916900: fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.460537] ffff88800d916980: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc 00 [ 31.461473] ================================================================== [ 31.462858] Disabling lock debugging due to kernel taint [ 33.488535] BUG: Bad rss-counter state mm:000000000801c7f6 type:MM_FILEPAGES val:33 [ 33.489541] BUG: Bad rss-counter state mm:000000000801c7f6 type:MM_ANONPAGES val:22 [ 33.975505] BUG: Bad rss-counter state mm:000000003675a792 type:MM_FILEPAGES val:33 [ 33.976706] BUG: Bad rss-counter state mm:000000003675a792 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:9317' (ECDSA) to the list of known hosts. 2023/06/20 14:27:45 fuzzer started 2023/06/20 14:27:46 dialing manager at localhost:36067 2023/06/20 14:27:46 checking machine... 2023/06/20 14:27:46 checking revisions... [ 34.750849] kmemleak: Automatic memory scanning thread ended 2023/06/20 14:27:46 testing simple program... [ 34.798765] cgroup: Unknown subsys name 'net' [ 34.850084] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 14:27:45 Registers: info registers vcpu 0 RAX=ffff88801a158c38 RBX=ffff88801a1f82c8 RCX=1ffff11003431c14 RDX=dffffc0000000000 RSI=ffff88801a158ed8 RDI=ffff88801a1f82f8 RBP=ffff88801a18e070 RSP=ffff88800d027ca8 R8 =0000000000000001 R9 =0000000000000246 R10=0000000000000003 R11=00000000000b6a61 R12=ffff88801a158e60 R13=0000000000000000 R14=ffff88800eb8f2a8 R15=ffff88800eb8f260 RIP=ffffffff81847688 RFL=00000046 [---Z-P-] 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 00007f3388398900 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=00007f338894d650 CR3=000000001a096000 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=00000000000000000000000000000000 XMM01=000000000000000000000000000000ff XMM02=000000000000000000000000000000ff XMM03=5320444f4854454d5f54505952434e45 XMM04=40404040404040404040404040404040 XMM05=5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a XMM06=20202020202020202020202020202020 XMM07=00000000000000000000000000000000 XMM08=ffbc64ffffbc44ffffbc34ffffbc9f00 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=0000000000000001 RBX=0000000000000005 RCX=ffffffff813782c0 RDX=fffffbfff0ba7a6b RSI=0000000000000008 RDI=ffffffff85d3d350 RBP=0000000000000006 RSP=ffff88806cf09e68 R8 =0000000000000000 R9 =fffffbfff0ba7a6a R10=ffffffff85d3d357 R11=00000000000b6d53 R12=dffffc0000000000 R13=ffff88806cf09ee8 R14=0000000000000001 R15=ffff88800d699b30 RIP=ffffffff8137892c RFL=00000247 [---Z-PC] 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 =0000 0000000000000000 00000000 00000000 DS =0000 0000000000000000 00000000 00000000 FS =0000 00007f9a7e219900 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=00007f9a7d656290 CR3=000000000c7aa000 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=656e6e6f637369443d4547415353454d XMM01=2e303120746f6f722072657375206d6f XMM02=ffffffffffffffffffffffffffffffff XMM03=2f6c616e72756f6a2f676f6c2f6e7572 XMM04=344cf291f306399600000000000ae988 XMM05=0604a7a87c4e9dea0000000000133ec0 XMM06=806171799158d9670000000000132bf0 XMM07=00000000000000000000000000000000 XMM08=415453454d49545f454d49544c414552 XMM09=00000000000000000000000000000000 XMM10=20200000000020202020202020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000