syzkaller login: [ 38.828484] BUG: Bad rss-counter state mm:000000007c83aab4 type:MM_FILEPAGES val:33 [ 38.830512] BUG: Bad rss-counter state mm:000000007c83aab4 type:MM_ANONPAGES val:22 [ 38.999152] ================================================================== [ 39.000160] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 39.001190] Read of size 8 at addr ffff88800d5686b0 by task sshd/220 [ 39.002127] [ 39.002369] CPU: 0 PID: 220 Comm: sshd Not tainted 6.4.0-rc7-next-20230620 #1 [ 39.003300] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 39.004446] Call Trace: [ 39.004801] [ 39.005127] dump_stack_lvl+0x91/0xf0 [ 39.005665] print_report+0xcc/0x620 [ 39.006180] ? __virt_addr_valid+0x102/0x340 [ 39.006781] ? vma_interval_tree_remove+0xc75/0xec0 [ 39.007435] ? vma_interval_tree_remove+0xc75/0xec0 [ 39.008080] kasan_report+0xbe/0xf0 [ 39.008609] ? vma_interval_tree_remove+0xc75/0xec0 [ 39.009274] vma_interval_tree_remove+0xc75/0xec0 [ 39.009905] vma_prepare+0xc54/0x11a0 [ 39.010416] __split_vma+0x5af/0x950 [ 39.010905] ? __pfx___split_vma+0x10/0x10 [ 39.011461] ? find_held_lock+0x2c/0x110 [ 39.012008] do_vmi_align_munmap+0x2ba/0x11f0 [ 39.012603] ? lock_is_held_type+0x9f/0x120 [ 39.013204] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 39.013844] ? mtree_range_walk+0x632/0x900 [ 39.014425] ? mas_walk+0x5c7/0x7c0 [ 39.014921] do_vmi_munmap+0x1f1/0x2b0 [ 39.015428] mmap_region+0x1f9/0x2660 [ 39.015935] ? vm_mmap_pgoff+0x15c/0x3a0 [ 39.016501] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 39.017250] ? __pfx_lock_acquire+0x10/0x10 [ 39.017849] ? __pfx_mmap_region+0x10/0x10 [ 39.018424] ? security_mmap_addr+0x7d/0xa0 [ 39.018978] ? get_unmapped_area+0x1f5/0x3f0 [ 39.019553] do_mmap+0x854/0xf00 [ 39.020007] vm_mmap_pgoff+0x1a6/0x3a0 [ 39.020522] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 39.021113] ksys_mmap_pgoff+0x3af/0x500 [ 39.021642] do_syscall_64+0x3f/0x90 [ 39.022142] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 39.022814] RIP: 0033:0x7f4c5c0b2d82 [ 39.023293] 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 [ 39.025521] RSP: 002b:00007fff13f66428 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 39.026459] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f4c5c0b2d82 [ 39.027341] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f4c5b4ec000 [ 39.028217] RBP: 00007f4c5b4ec000 R08: 0000000000000009 R09: 0000000000001000 [ 39.029113] R10: 0000000000000812 R11: 0000000000000206 R12: 0000563d19e52ec0 [ 39.029998] R13: 00007fff13f66440 R14: 00007fff13f66470 R15: 00007fff13f667d0 [ 39.030884] [ 39.031186] [ 39.031415] Allocated by task 213: [ 39.031860] kasan_save_stack+0x22/0x50 [ 39.032383] kasan_set_track+0x25/0x30 [ 39.032894] __kasan_slab_alloc+0x59/0x70 [ 39.033461] kmem_cache_alloc+0x16b/0x370 [ 39.033991] vm_area_dup+0x20/0x160 [ 39.034460] __split_vma+0x170/0x950 [ 39.034941] split_vma+0xc6/0x110 [ 39.035396] mprotect_fixup+0x8d2/0xb30 [ 39.035914] do_mprotect_pkey+0x87e/0xd40 [ 39.036454] __x64_sys_mprotect+0x78/0xc0 [ 39.036990] do_syscall_64+0x3f/0x90 [ 39.037495] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 39.038157] [ 39.038387] Freed by task 213: [ 39.038792] kasan_save_stack+0x22/0x50 [ 39.039310] kasan_set_track+0x25/0x30 [ 39.039818] kasan_save_free_info+0x2b/0x50 [ 39.040374] __kasan_slab_free+0x10a/0x190 [ 39.040916] kmem_cache_free+0x10d/0x4d0 [ 39.041447] rcu_core+0x8c8/0x2860 [ 39.041901] __do_softirq+0x1b7/0x7d4 [ 39.042395] [ 39.042616] Last potentially related work creation: [ 39.043221] kasan_save_stack+0x22/0x50 [ 39.043735] __kasan_record_aux_stack+0x8e/0xa0 [ 39.044327] __call_rcu_common.constprop.0+0x6a/0xb90 [ 39.044995] remove_vma+0x139/0x170 [ 39.045486] do_vmi_align_munmap+0xd4a/0x11f0 [ 39.046062] do_vmi_munmap+0x1f1/0x2b0 [ 39.046551] __vm_munmap+0x138/0x3a0 [ 39.047028] __x64_sys_munmap+0x59/0x80 [ 39.047531] do_syscall_64+0x3f/0x90 [ 39.048014] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 39.048674] [ 39.048900] Second to last potentially related work creation: [ 39.049622] kasan_save_stack+0x22/0x50 [ 39.050136] __kasan_record_aux_stack+0x8e/0xa0 [ 39.050716] __call_rcu_common.constprop.0+0x6a/0xb90 [ 39.051370] remove_vma+0x139/0x170 [ 39.051829] do_vmi_align_munmap+0xd4a/0x11f0 [ 39.052399] do_vmi_munmap+0x1f1/0x2b0 [ 39.052896] mmap_region+0x1f9/0x2660 [ 39.053386] do_mmap+0x854/0xf00 [ 39.053824] vm_mmap_pgoff+0x1a6/0x3a0 [ 39.054325] ksys_mmap_pgoff+0x3af/0x500 [ 39.054837] do_syscall_64+0x3f/0x90 [ 39.055320] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 39.055976] [ 39.056195] The buggy address belongs to the object at ffff88800d568658 [ 39.056195] which belongs to the cache vm_area_struct of size 168 [ 39.057757] The buggy address is located 88 bytes inside of [ 39.057757] freed 168-byte region [ffff88800d568658, ffff88800d568700) [ 39.059183] [ 39.059401] The buggy address belongs to the physical page: [ 39.060073] page:0000000036a27f21 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xd568 [ 39.061159] memcg:ffff88800d2e5f01 [ 39.061593] flags: 0x100000000000200(slab|node=0|zone=1) [ 39.062238] page_type: 0xffffffff() [ 39.062697] raw: 0100000000000200 ffff8880087a0c80 ffffea0000361380 dead000000000004 [ 39.063619] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800d2e5f01 [ 39.064537] page dumped because: kasan: bad access detected [ 39.065218] [ 39.065443] Memory state around the buggy address: [ 39.066024] ffff88800d568580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 39.066896] ffff88800d568600: 00 00 00 fc fc fc fc fc fc fc fc fa fb fb fb fb [ 39.067760] >ffff88800d568680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.068615] ^ [ 39.069204] ffff88800d568700: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 [ 39.070061] ffff88800d568780: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc [ 39.070915] ================================================================== [ 39.072073] Disabling lock debugging due to kernel taint [ 40.861142] BUG: Bad rss-counter state mm:000000007b136c8b type:MM_FILEPAGES val:33 [ 40.861956] BUG: Bad rss-counter state mm:000000007b136c8b type:MM_ANONPAGES val:22 [ 41.272311] BUG: Bad rss-counter state mm:00000000b633d19e type:MM_FILEPAGES val:33 [ 41.273318] BUG: Bad rss-counter state mm:00000000b633d19e type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:5153' (ECDSA) to the list of known hosts. 2023/06/21 03:05:11 fuzzer started 2023/06/21 03:05:11 dialing manager at localhost:36067 2023/06/21 03:05:11 checking machine... 2023/06/21 03:05:11 checking revisions... [ 41.975227] kmemleak: Automatic memory scanning thread ended 2023/06/21 03:05:11 testing simple program... [ 42.022554] cgroup: Unknown subsys name 'net' [ 42.057905] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 03:05:11 Registers: info registers vcpu 0 RAX=0000000000000075 RBX=000055ff4589beb0 RCX=0000000000000065 RDX=00007f1263bc14c0 RSI=00007f1263637b22 RDI=000055ff4589beb0 RBP=0000000000000010 RSP=00007ffe6a43e098 R8 =000055ff458c840d R9 =00007f1263c0ebe0 R10=000000000000006f R11=0000000000000246 R12=000055ff458b9ed0 R13=00007ffe6a43e0a8 R14=00007f1263637b22 R15=00007f126365c710 RIP=00007f1263badaf9 RFL=00000293 [--S-A-C] CPL=3 II=0 A20=1 SMM=0 HLT=0 ES =0000 0000000000000000 00000000 00000000 CS =0033 0000000000000000 ffffffff 00a0fb00 DPL=3 CS64 [-RA] SS =002b 0000000000000000 ffffffff 00c0f300 DPL=3 DS [-WA] DS =0000 0000000000000000 00000000 00000000 FS =0000 00007f126365c900 00000000 00000000 GS =0000 0000000000000000 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=00007f1263c11650 CR3=000000000ed2c000 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=ff00000000000000ff00000000000000 XMM01=01000000000000000100000000000000 XMM02=2f00646f6874656d5f74707972636e65 XMM03=0030303031200909094e494d5f444955 XMM04=40404040404040404040404040404040 XMM05=5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a XMM06=20202020202020202020202020202020 XMM07=000000000000000000ffffffffffffff XMM08=00000000000000000020202000202020 XMM09=0000ffffffffffffffffffffffffffff XMM10=00002020202020200020202020202020 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=ffffffff8180c6a2 RBX=0000000000000001 RCX=ffffffff860d8201 RDX=ffff8880145af6e0 RSI=ffffffff8180c6a2 RDI=ffff8880145af698 RBP=ffff8880145af6f0 RSP=ffff8880145af628 R8 =ffffffff860d825a R9 =ffff8880145af6d8 R10=0000000000038001 R11=0000000000010b8d R12=ffff8880145af760 R13=ffff8880145af6e0 R14=ffff888015f2d1c0 R15=ffff8880145af698 RIP=ffffffff81130641 RFL=00000246 [---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 00007f3470e23900 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=00007f3470342000 CR3=000000000cb50000 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=ffffffffffffffffffffffffffffffff XMM01=30306234386136303638616663356134 XMM02=38303062343861363036386166633561 XMM03=2f6c616e72756f6a2f676f6c2f6e7572 XMM04=0726b8796230d4f100000000000ae988 XMM05=9cd455dede9690bc0000000000133d60 XMM06=4fda316b135da52b00000000001327e0 XMM07=00000000000000000000000000000000 XMM08=415453454d49545f454d49544c414552 XMM09=00000000000000000000000000000000 XMM10=20200000000020202020202020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000