syzkaller login: [ 43.473504] BUG: Bad rss-counter state mm:00000000c380219d type:MM_FILEPAGES val:33 [ 43.474197] BUG: Bad rss-counter state mm:00000000c380219d type:MM_ANONPAGES val:22 [ 43.668857] ================================================================== [ 43.669462] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 43.670065] Read of size 8 at addr ffff88800e801c20 by task sshd/219 [ 43.670552] [ 43.670794] CPU: 1 PID: 219 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 43.671326] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 43.671980] Call Trace: [ 43.672184] [ 43.672362] dump_stack_lvl+0x91/0xf0 [ 43.672705] print_report+0xcc/0x620 [ 43.673012] ? __virt_addr_valid+0x102/0x340 [ 43.673352] ? vma_interval_tree_remove+0xc75/0xec0 [ 43.673765] ? vma_interval_tree_remove+0xc75/0xec0 [ 43.674160] kasan_report+0xbe/0xf0 [ 43.674456] ? vma_interval_tree_remove+0xc75/0xec0 [ 43.674889] vma_interval_tree_remove+0xc75/0xec0 [ 43.675354] vma_prepare+0xc54/0x11a0 [ 43.675677] __split_vma+0x5af/0x950 [ 43.675971] ? __pfx___split_vma+0x10/0x10 [ 43.676297] ? find_held_lock+0x2c/0x110 [ 43.676620] do_vmi_align_munmap+0x2ba/0x11f0 [ 43.677014] ? lock_is_held_type+0x9f/0x120 [ 43.677352] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 43.677761] ? mtree_range_walk+0x632/0x900 [ 43.678106] ? mas_walk+0x5c7/0x7c0 [ 43.678406] do_vmi_munmap+0x1f1/0x2b0 [ 43.678819] mmap_region+0x1f9/0x2660 [ 43.679125] ? vm_mmap_pgoff+0x15c/0x3a0 [ 43.679452] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 43.679910] ? __pfx_lock_acquire+0x10/0x10 [ 43.680247] ? __pfx_mmap_region+0x10/0x10 [ 43.680595] ? security_mmap_addr+0x7d/0xa0 [ 43.680944] ? get_unmapped_area+0x1f5/0x3f0 [ 43.681284] do_mmap+0x854/0xf00 [ 43.681559] vm_mmap_pgoff+0x1a6/0x3a0 [ 43.681875] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 43.682226] ksys_mmap_pgoff+0x3af/0x500 [ 43.682548] do_syscall_64+0x3f/0x90 [ 43.683981] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 43.684389] RIP: 0033:0x7f536d41cd82 [ 43.684678] 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 [ 43.686030] RSP: 002b:00007ffc76c43de8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 43.686597] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f536d41cd82 [ 43.703020] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f536c856000 [ 43.703561] RBP: 00007f536c856000 R08: 0000000000000009 R09: 0000000000001000 [ 43.704105] R10: 0000000000000812 R11: 0000000000000206 R12: 0000556934a9dec0 [ 43.704613] R13: 00007ffc76c43e00 R14: 00007ffc76c43e30 R15: 00007ffc76c44190 [ 43.705139] [ 43.705317] [ 43.705446] Allocated by task 212: [ 43.705731] kasan_save_stack+0x22/0x50 [ 43.706040] kasan_set_track+0x25/0x30 [ 43.706335] __kasan_slab_alloc+0x59/0x70 [ 43.710704] kmem_cache_alloc+0x16b/0x370 [ 43.711043] vm_area_dup+0x20/0x160 [ 43.711335] __split_vma+0x170/0x950 [ 43.711620] split_vma+0xc6/0x110 [ 43.711933] mprotect_fixup+0x8d2/0xb30 [ 43.712239] do_mprotect_pkey+0x87e/0xd40 [ 43.712557] __x64_sys_mprotect+0x78/0xc0 [ 43.712879] do_syscall_64+0x3f/0x90 [ 43.713168] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 43.713561] [ 43.713694] Freed by task 212: [ 43.713942] kasan_save_stack+0x22/0x50 [ 43.714252] kasan_set_track+0x25/0x30 [ 43.714564] kasan_save_free_info+0x2b/0x50 [ 43.714943] __kasan_slab_free+0x10a/0x190 [ 43.715291] kmem_cache_free+0x10d/0x4d0 [ 43.715618] rcu_core+0x8c8/0x2860 [ 43.715919] __do_softirq+0x1b7/0x7d4 [ 43.716215] [ 43.716350] Last potentially related work creation: [ 43.716719] kasan_save_stack+0x22/0x50 [ 43.717070] __kasan_record_aux_stack+0x8e/0xa0 [ 43.717425] __call_rcu_common.constprop.0+0x6a/0xb90 [ 43.717826] remove_vma+0x139/0x170 [ 43.718105] do_vmi_align_munmap+0xd4a/0x11f0 [ 43.718448] do_vmi_munmap+0x1f1/0x2b0 [ 43.718829] __vm_munmap+0x138/0x3a0 [ 43.719139] __x64_sys_munmap+0x59/0x80 [ 43.719447] do_syscall_64+0x3f/0x90 [ 43.719767] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 43.720162] [ 43.720295] Second to last potentially related work creation: [ 43.720720] kasan_save_stack+0x22/0x50 [ 43.721071] __kasan_record_aux_stack+0x8e/0xa0 [ 43.721431] __call_rcu_common.constprop.0+0x6a/0xb90 [ 43.721834] remove_vma+0x139/0x170 [ 43.722122] do_vmi_align_munmap+0xd4a/0x11f0 [ 43.722471] do_vmi_munmap+0x1f1/0x2b0 [ 43.726861] mmap_region+0x1f9/0x2660 [ 43.727165] do_mmap+0x854/0xf00 [ 43.727439] vm_mmap_pgoff+0x1a6/0x3a0 [ 43.727759] ksys_mmap_pgoff+0x3af/0x500 [ 43.728113] do_syscall_64+0x3f/0x90 [ 43.728411] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 43.728820] [ 43.728957] The buggy address belongs to the object at ffff88800e801bc8 [ 43.728957] which belongs to the cache vm_area_struct of size 168 [ 43.729939] The buggy address is located 88 bytes inside of [ 43.729939] freed 168-byte region [ffff88800e801bc8, ffff88800e801c70) [ 43.731883] [ 43.732022] The buggy address belongs to the physical page: [ 43.732440] page:0000000099619227 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xe801 [ 43.733173] memcg:ffff88800e802001 [ 43.733444] flags: 0x100000000000200(slab|node=0|zone=1) [ 43.733888] page_type: 0xffffffff() [ 43.734175] raw: 0100000000000200 ffff88800879fc80 ffffea000057fe80 dead000000000008 [ 43.734778] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800e802001 [ 43.735369] page dumped because: kasan: bad access detected [ 43.735802] [ 43.735940] Memory state around the buggy address: [ 43.736304] ffff88800e801b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.736845] ffff88800e801b80: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb [ 43.737384] >ffff88800e801c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc [ 43.737920] ^ [ 43.738253] ffff88800e801c80: fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 [ 43.739032] ffff88800e801d00: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc [ 43.739557] ================================================================== [ 43.740200] Disabling lock debugging due to kernel taint [ 48.104017] BUG: Bad rss-counter state mm:000000006ef3c194 type:MM_FILEPAGES val:33 [ 48.104687] BUG: Bad rss-counter state mm:000000006ef3c194 type:MM_ANONPAGES val:22 [ 49.124768] BUG: Bad rss-counter state mm:0000000055e143a6 type:MM_FILEPAGES val:33 [ 49.125408] BUG: Bad rss-counter state mm:0000000055e143a6 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:63217' (ECDSA) to the list of known hosts. 2023/06/20 10:06:18 fuzzer started 2023/06/20 10:06:19 dialing manager at localhost:44161 2023/06/20 10:06:19 checking machine... 2023/06/20 10:06:19 checking revisions... [ 50.074165] kmemleak: Automatic memory scanning thread ended 2023/06/20 10:06:19 testing simple program... [ 50.123918] cgroup: Unknown subsys name 'net' [ 50.197461] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 10:06:14 Registers: info registers vcpu 0 RAX=0000000000000000 RBX=00007f5c8405d4bb RCX=ffffffff81007b62 RDX=ffff888018d70000 RSI=0000000000000000 RDI=0000000000000005 RBP=0000000000000001 RSP=ffff88800ee9f620 R8 =0000000000000005 R9 =0000000000000002 R10=0000000000000001 R11=00000000000b6996 R12=ffff88800ee9f768 R13=0000000000000000 R14=ffff888018d70000 R15=ffff888016bef720 RIP=ffffffff814c0245 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 00007f5c83b9e900 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=00007f20d9038eb0 CR3=000000000e932000 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=ffffffffffff00000000000000000000 XMM02=ffffffffffff00000000000000000000 XMM03=00000000000000000000000000000000 XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000 XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000 XMM08=00000000000073707574726174732064 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=dffffc0000000000 RBX=00007fb2d57a5b84 RCX=ffffffff864b9d56 RDX=1ffff11001f1df26 RSI=0000000000000000 RDI=00007fb2d57a5b84 RBP=00007fb2d57a5b84 RSP=ffff88800f8ef890 R8 =ffffffff864b9d5a R9 =ffff88800f8ef918 R10=0000000000038001 R11=00000000000b6996 R12=ffff88800f8ef9a0 R13=0000000000000000 R14=ffff888018dad1c0 R15=0000000000092cc0 RIP=ffffffff811fc6f0 RFL=00000292 [--S-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 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=00007fb2d5786008 CR3=000000001cc24000 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=756e696c2d34365f3638782f62696c2f XMM01=6f732e7061727762696c2f756e672d78 XMM02=00302e6f732e7061727762696c2f756e XMM03=672d78756e696c2d34365f3638782f62 XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000 XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000 XMM08=00000000000000000000000000000000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000