syzkaller login: [ 66.556437] BUG: Bad rss-counter state mm:000000003e703b26 type:MM_FILEPAGES val:33 [ 66.557905] BUG: Bad rss-counter state mm:000000003e703b26 type:MM_ANONPAGES val:22 [ 66.705992] ================================================================== [ 66.706907] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 66.707839] Read of size 8 at addr ffff88800f6a6880 by task sshd/219 [ 66.708744] [ 66.708996] CPU: 1 PID: 219 Comm: sshd Tainted: G L 6.4.0-rc7-next-20230619 #1 [ 66.710078] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 66.711086] Call Trace: [ 66.711430] [ 66.711714] dump_stack_lvl+0x91/0xf0 [ 66.712203] print_report+0xcc/0x620 [ 66.712684] ? __virt_addr_valid+0x102/0x340 [ 66.713248] ? vma_interval_tree_remove+0xc75/0xec0 [ 66.713868] ? vma_interval_tree_remove+0xc75/0xec0 [ 66.714485] kasan_report+0xbe/0xf0 [ 66.714961] ? vma_interval_tree_remove+0xc75/0xec0 [ 66.715592] vma_interval_tree_remove+0xc75/0xec0 [ 66.716190] vma_prepare+0xc54/0x11a0 [ 66.716674] __split_vma+0x5af/0x950 [ 66.717162] ? __pfx___split_vma+0x10/0x10 [ 66.717700] ? find_held_lock+0x2c/0x110 [ 66.718226] do_vmi_align_munmap+0x2ba/0x11f0 [ 66.718797] ? lock_is_held_type+0x9f/0x120 [ 66.719343] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 66.719943] ? mtree_range_walk+0x632/0x900 [ 66.720495] ? mas_walk+0x5c7/0x7c0 [ 66.720943] do_vmi_munmap+0x1f1/0x2b0 [ 66.721439] mmap_region+0x1f9/0x2660 [ 66.721895] ? vm_mmap_pgoff+0x15c/0x3a0 [ 66.722383] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 66.723054] ? __pfx_lock_acquire+0x10/0x10 [ 66.723558] ? __pfx_mmap_region+0x10/0x10 [ 66.724065] ? security_mmap_addr+0x7d/0xa0 [ 66.724564] ? get_unmapped_area+0x1f5/0x3f0 [ 66.725090] do_mmap+0x854/0xf00 [ 66.725512] vm_mmap_pgoff+0x1a6/0x3a0 [ 66.725981] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 66.726518] ksys_mmap_pgoff+0x3af/0x500 [ 66.726998] do_syscall_64+0x3f/0x90 [ 66.727457] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 66.728069] RIP: 0033:0x7f076542cd82 [ 66.728503] 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 [ 66.730523] RSP: 002b:00007ffd43fd1a68 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 66.731375] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f076542cd82 [ 66.732175] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f0764866000 [ 66.732981] RBP: 00007f0764866000 R08: 0000000000000009 R09: 0000000000001000 [ 66.733788] R10: 0000000000000812 R11: 0000000000000206 R12: 000056084976dec0 [ 66.734734] R13: 00007ffd43fd1a80 R14: 00007ffd43fd1ab0 R15: 00007ffd43fd1e10 [ 66.735637] [ 66.735972] [ 66.736194] Allocated by task 212: [ 66.736623] kasan_save_stack+0x22/0x50 [ 66.737140] kasan_set_track+0x25/0x30 [ 66.737645] __kasan_slab_alloc+0x59/0x70 [ 66.738171] kmem_cache_alloc+0x16b/0x370 [ 66.738694] vm_area_dup+0x20/0x160 [ 66.739148] __split_vma+0x170/0x950 [ 66.739617] split_vma+0xc6/0x110 [ 66.740135] mprotect_fixup+0x8d2/0xb30 [ 66.740765] do_mprotect_pkey+0x87e/0xd40 [ 66.741432] __x64_sys_mprotect+0x78/0xc0 [ 66.742056] do_syscall_64+0x3f/0x90 [ 66.742594] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 66.743270] [ 66.743491] Freed by task 212: [ 66.743888] kasan_save_stack+0x22/0x50 [ 66.744442] kasan_set_track+0x25/0x30 [ 66.744919] kasan_save_free_info+0x2b/0x50 [ 66.745439] __kasan_slab_free+0x10a/0x190 [ 66.745945] kmem_cache_free+0x10d/0x4d0 [ 66.746430] rcu_core+0x8c8/0x2860 [ 66.746853] __do_softirq+0x1b7/0x7d4 [ 66.747303] [ 66.747508] Last potentially related work creation: [ 66.748057] kasan_save_stack+0x22/0x50 [ 66.748536] __kasan_record_aux_stack+0x8e/0xa0 [ 66.749104] __call_rcu_common.constprop.0+0x6a/0xb90 [ 66.749778] remove_vma+0x139/0x170 [ 66.750227] do_vmi_align_munmap+0xd4a/0x11f0 [ 66.750758] do_vmi_munmap+0x1f1/0x2b0 [ 66.751221] __vm_munmap+0x138/0x3a0 [ 66.751690] __x64_sys_munmap+0x59/0x80 [ 66.752185] do_syscall_64+0x3f/0x90 [ 66.752657] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 66.753317] [ 66.753536] Second to last potentially related work creation: [ 66.754227] kasan_save_stack+0x22/0x50 [ 66.754731] __kasan_record_aux_stack+0x8e/0xa0 [ 66.755298] __call_rcu_common.constprop.0+0x6a/0xb90 [ 66.755949] remove_vma+0x139/0x170 [ 66.756401] do_vmi_align_munmap+0xd4a/0x11f0 [ 66.756964] do_vmi_munmap+0x1f1/0x2b0 [ 66.757466] __vm_munmap+0x138/0x3a0 [ 66.757923] elf_map+0x26f/0x310 [ 66.758357] load_elf_binary+0xd82/0x5030 [ 66.758882] bprm_execve+0x803/0x1940 [ 66.759347] do_execveat_common+0x734/0x8e0 [ 66.759872] __x64_sys_execve+0x93/0xc0 [ 66.760357] do_syscall_64+0x3f/0x90 [ 66.760824] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 66.761490] [ 66.761707] The buggy address belongs to the object at ffff88800f6a6828 [ 66.761707] which belongs to the cache vm_area_struct of size 168 [ 66.763176] The buggy address is located 88 bytes inside of [ 66.763176] freed 168-byte region [ffff88800f6a6828, ffff88800f6a68d0) [ 66.764570] [ 66.764785] The buggy address belongs to the physical page: [ 66.765458] page:00000000bedea016 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xf6a6 [ 66.766550] memcg:ffff88800de9a601 [ 66.766977] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 66.767678] page_type: 0xffffffff() [ 66.768132] raw: 0100000000000200 ffff88800879fc80 ffffea000036f4c0 dead000000000007 [ 66.769059] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800de9a601 [ 66.769950] page dumped because: kasan: bad access detected [ 66.770615] [ 66.770827] Memory state around the buggy address: [ 66.771405] ffff88800f6a6780: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc [ 66.772258] ffff88800f6a6800: fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb [ 66.773127] >ffff88800f6a6880: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc [ 66.773978] ^ [ 66.774388] ffff88800f6a6900: fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb [ 66.775242] ffff88800f6a6980: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fa [ 66.776092] ================================================================== [ 66.777069] Disabling lock debugging due to kernel taint [ 69.122650] BUG: Bad rss-counter state mm:00000000e22d6408 type:MM_FILEPAGES val:33 [ 69.123824] BUG: Bad rss-counter state mm:00000000e22d6408 type:MM_ANONPAGES val:22 [ 69.614947] BUG: Bad rss-counter state mm:00000000823a4b24 type:MM_FILEPAGES val:33 [ 69.615960] BUG: Bad rss-counter state mm:00000000823a4b24 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:15923' (ECDSA) to the list of known hosts. 2023/06/19 18:26:40 fuzzer started 2023/06/19 18:26:40 dialing manager at localhost:44161 2023/06/19 18:26:40 checking machine... 2023/06/19 18:26:40 checking revisions... [ 70.418740] kmemleak: Automatic memory scanning thread ended 2023/06/19 18:26:40 testing simple program... [ 70.474153] cgroup: Unknown subsys name 'net' [ 70.511622] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 18:26:12 Registers: info registers vcpu 0 RAX=1ffffffff0bf4f19 RBX=ffffffff85fa78c8 RCX=ffffffff83684ed8 RDX=0000000000000000 RSI=ffffffff863b7b2e RDI=ffffffff85fa78c0 RBP=ffffffff85fa78c0 RSP=ffff888014497490 R8 =ffffffff863b7b2e R9 =ffff888014497588 R10=0000000000038001 R11=000000000008b93b R12=ffffffff85fa78d0 R13=ffffffff85fa78c0 R14=ffffffff85fa78c0 R15=dffffc0000000000 RIP=ffffffff8112fc7f RFL=00000212 [----A--] 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 00007f216d43a900 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=00007ffd03523000 CR3=00000000164b8000 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=74696d7265705f6d61703d73726f746e XMM02=000000000000000000000000000000ff XMM03=5320444f4854454d5f54505952434e45 XMM04=40404040404040404040404040404040 XMM05=5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a XMM06=20202020202020202020202020202020 XMM07=00000000000000000000000000000000 XMM08=61662029286e65706f5f746964756100 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=0000000000000000 RBX=ffffea000062f640 RCX=0000000000000000 RDX=ffff88800b9ad1c0 RSI=ffffffff816a9b30 RDI=ffffea000062f640 RBP=0000000000000000 RSP=ffff88800b84f060 R8 =0000000000000001 R9 =0000000000000000 R10=0000000000000000 R11=0000000000009293 R12=1ffff11001709e17 R13=0000000000001000 R14=0000000000000000 R15=0000000000000001 RIP=ffffffff814c07f1 RFL=00000293 [--S-A-C] 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 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=00005570abfa0222 CR3=000000000c8ce000 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=ffffffff000000000000000000000000 XMM02=ffffffff000000000000000000000000 XMM03=00000000000000000000000000777074 XMM04=00007f9fa7bd6c71000000725f646975 XMM05=00000000000000000000000000000000 XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000 XMM08=00000000726f7475636578652d7a7973 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000