syzkaller login: [ 35.548304] BUG: Bad rss-counter state mm:00000000d745c3de type:MM_FILEPAGES val:33 [ 35.548938] BUG: Bad rss-counter state mm:00000000d745c3de type:MM_ANONPAGES val:22 [ 35.662868] ================================================================== [ 35.663628] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 35.664399] Read of size 8 at addr ffff88800cc68968 by task sshd/220 [ 35.665078] [ 35.665311] CPU: 1 PID: 220 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 35.666404] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 35.667564] Call Trace: [ 35.667919] [ 35.668221] dump_stack_lvl+0x91/0xf0 [ 35.668717] print_report+0xcc/0x620 [ 35.669154] ? __virt_addr_valid+0x102/0x340 [ 35.669597] ? vma_interval_tree_remove+0xc75/0xec0 [ 35.670050] ? vma_interval_tree_remove+0xc75/0xec0 [ 35.670481] kasan_report+0xbe/0xf0 [ 35.670794] ? vma_interval_tree_remove+0xc75/0xec0 [ 35.671196] vma_interval_tree_remove+0xc75/0xec0 [ 35.671588] vma_prepare+0xc54/0x11a0 [ 35.671910] __split_vma+0x5af/0x950 [ 35.672218] ? __pfx___split_vma+0x10/0x10 [ 35.672550] ? find_held_lock+0x2c/0x110 [ 35.672884] do_vmi_align_munmap+0x2ba/0x11f0 [ 35.673260] ? lock_is_held_type+0x9f/0x120 [ 35.673622] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 35.674017] ? mtree_range_walk+0x632/0x900 [ 35.674398] ? mas_walk+0x5c7/0x7c0 [ 35.674704] do_vmi_munmap+0x1f1/0x2b0 [ 35.675027] mmap_region+0x1f9/0x2660 [ 35.675328] ? vm_mmap_pgoff+0x15c/0x3a0 [ 35.675663] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 35.676137] ? __pfx_lock_acquire+0x10/0x10 [ 35.676494] ? __pfx_mmap_region+0x10/0x10 [ 35.676848] ? security_mmap_addr+0x7d/0xa0 [ 35.677202] ? get_unmapped_area+0x1f5/0x3f0 [ 35.677563] do_mmap+0x854/0xf00 [ 35.677855] vm_mmap_pgoff+0x1a6/0x3a0 [ 35.678182] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 35.678575] ksys_mmap_pgoff+0x3af/0x500 [ 35.678910] do_syscall_64+0x3f/0x90 [ 35.679228] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 35.679656] RIP: 0033:0x7fc139174d82 [ 35.679964] 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 [ 35.681423] RSP: 002b:00007ffcb5179658 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 35.682043] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fc139174d82 [ 35.682648] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fc1385ae000 [ 35.683228] RBP: 00007fc1385ae000 R08: 0000000000000009 R09: 0000000000001000 [ 35.683776] R10: 0000000000000812 R11: 0000000000000206 R12: 000055587d64ad90 [ 35.684329] R13: 00007ffcb5179670 R14: 00007ffcb51796a0 R15: 00007ffcb5179a00 [ 35.684893] [ 35.685095] [ 35.685241] Allocated by task 213: [ 35.685530] kasan_save_stack+0x22/0x50 [ 35.685867] kasan_set_track+0x25/0x30 [ 35.686201] __kasan_slab_alloc+0x59/0x70 [ 35.686566] kmem_cache_alloc+0x16b/0x370 [ 35.686904] vm_area_dup+0x20/0x160 [ 35.687197] __split_vma+0x170/0x950 [ 35.687496] split_vma+0xc6/0x110 [ 35.687776] mprotect_fixup+0x8d2/0xb30 [ 35.688100] do_mprotect_pkey+0x87e/0xd40 [ 35.688441] __x64_sys_mprotect+0x78/0xc0 [ 35.688788] do_syscall_64+0x3f/0x90 [ 35.689103] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 35.689532] [ 35.689676] Freed by task 213: [ 35.689937] kasan_save_stack+0x22/0x50 [ 35.690269] kasan_set_track+0x25/0x30 [ 35.690629] kasan_save_free_info+0x2b/0x50 [ 35.690924] __kasan_slab_free+0x10a/0x190 [ 35.691216] kmem_cache_free+0x10d/0x4d0 [ 35.691493] rcu_core+0x8c8/0x2860 [ 35.691734] __do_softirq+0x1b7/0x7d4 [ 35.691996] [ 35.692113] Last potentially related work creation: [ 35.692443] kasan_save_stack+0x22/0x50 [ 35.692715] __kasan_record_aux_stack+0x8e/0xa0 [ 35.693028] __call_rcu_common.constprop.0+0x6a/0xb90 [ 35.693374] remove_vma+0x139/0x170 [ 35.693620] do_vmi_align_munmap+0xd4a/0x11f0 [ 35.693917] do_vmi_munmap+0x1f1/0x2b0 [ 35.694181] __vm_munmap+0x138/0x3a0 [ 35.694448] __x64_sys_munmap+0x59/0x80 [ 35.694718] do_syscall_64+0x3f/0x90 [ 35.694974] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 35.695323] [ 35.695439] Second to last potentially related work creation: [ 35.695806] kasan_save_stack+0x22/0x50 [ 35.696076] __kasan_record_aux_stack+0x8e/0xa0 [ 35.696387] __call_rcu_common.constprop.0+0x6a/0xb90 [ 35.696732] remove_vma+0x139/0x170 [ 35.696977] do_vmi_align_munmap+0xd4a/0x11f0 [ 35.697283] do_vmi_munmap+0x1f1/0x2b0 [ 35.697544] mmap_region+0x1f9/0x2660 [ 35.697844] do_mmap+0x854/0xf00 [ 35.698090] vm_mmap_pgoff+0x1a6/0x3a0 [ 35.698363] ksys_mmap_pgoff+0x3af/0x500 [ 35.698633] do_syscall_64+0x3f/0x90 [ 35.698886] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 35.699235] [ 35.699352] The buggy address belongs to the object at ffff88800cc68910 [ 35.699352] which belongs to the cache vm_area_struct of size 168 [ 35.700151] The buggy address is located 88 bytes inside of [ 35.700151] freed 168-byte region [ffff88800cc68910, ffff88800cc689b8) [ 35.700912] [ 35.701030] The buggy address belongs to the physical page: [ 35.701389] page:00000000dcffbe58 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xcc68 [ 35.702033] memcg:ffff88800ce72901 [ 35.702298] flags: 0x100000000000200(slab|node=0|zone=1) [ 35.702669] page_type: 0xffffffff() [ 35.702927] raw: 0100000000000200 ffff88800879fc80 dead000000000100 dead000000000122 [ 35.703483] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800ce72901 [ 35.704119] page dumped because: kasan: bad access detected [ 35.704588] [ 35.704746] Memory state around the buggy address: [ 35.705158] ffff88800cc68800: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 [ 35.705743] ffff88800cc68880: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc [ 35.706448] >ffff88800cc68900: fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.707333] ^ [ 35.707995] ffff88800cc68980: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fa [ 35.708713] ffff88800cc68a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.709446] ================================================================== [ 35.710384] Disabling lock debugging due to kernel taint [ 37.405797] BUG: Bad rss-counter state mm:0000000047918cd2 type:MM_FILEPAGES val:33 [ 37.406399] BUG: Bad rss-counter state mm:0000000047918cd2 type:MM_ANONPAGES val:22 [ 37.753292] BUG: Bad rss-counter state mm:000000005c975d79 type:MM_FILEPAGES val:33 [ 37.754335] BUG: Bad rss-counter state mm:000000005c975d79 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:64825' (ECDSA) to the list of known hosts. 2023/06/20 00:06:57 fuzzer started 2023/06/20 00:06:58 dialing manager at localhost:44161 2023/06/20 00:06:58 checking machine... 2023/06/20 00:06:58 checking revisions... [ 38.497745] kmemleak: Automatic memory scanning thread ended 2023/06/20 00:06:58 testing simple program... [ 38.546488] cgroup: Unknown subsys name 'net' [ 38.579791] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 00:06:51 Registers: info registers vcpu 0 RAX=ffff8880090e0001 RBX=0000000000000001 RCX=0000000000000001 RDX=ffff8880090df601 RSI=ffff8880090df6f0 RDI=ffff8880090decc0 RBP=ffff8880090df6f0 RSP=ffff8880090dec18 R8 =0000000000000001 R9 =ffff8880090decf0 R10=0000000000038001 R11=000000000002c942 R12=0000000000000008 R13=ffff8880090d8000 R14=ffff8880090df6f0 R15=ffff8880090decb0 RIP=ffffffff811304ce 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 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=00007ffc2874b000 CR3=000000000f594000 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=000000000000001c RBX=000000000000b792 RCX=1ffff110011ae394 RDX=000000000000b408 RSI=0000000000000000 RDI=ffff888008d71ca0 RBP=ffff88806cf09d58 RSP=ffff88806cf09cd0 R8 =0000000000000001 R9 =00000000000000a1 R10=0000000000000000 R11=00000000fa83b2da R12=ffff888008d71bc0 R13=ffffffff85d3d000 R14=0000000000000473 R15=000000000000b792 RIP=ffffffff812936fd RFL=00000012 [----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 00007fb4a3ba6900 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=00007ffcf4f80508 CR3=000000000f594000 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=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