syzkaller login: [ 81.814234] BUG: Bad rss-counter state mm:0000000004a45576 type:MM_FILEPAGES val:33 [ 81.815244] BUG: Bad rss-counter state mm:0000000004a45576 type:MM_ANONPAGES val:22 [ 81.985544] ================================================================== [ 81.986448] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 81.987378] Read of size 8 at addr ffff888016444c20 by task sshd/222 [ 81.988142] [ 81.988435] CPU: 0 PID: 222 Comm: sshd Tainted: G L 6.4.0-rc7-next-20230619 #1 [ 81.989442] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 81.990435] Call Trace: [ 81.990762] [ 81.991042] dump_stack_lvl+0x91/0xf0 [ 81.991530] print_report+0xcc/0x620 [ 81.992018] ? __virt_addr_valid+0x102/0x340 [ 81.992569] ? vma_interval_tree_remove+0xc75/0xec0 [ 81.993191] ? vma_interval_tree_remove+0xc75/0xec0 [ 81.993800] kasan_report+0xbe/0xf0 [ 81.994280] ? vma_interval_tree_remove+0xc75/0xec0 [ 81.994899] vma_interval_tree_remove+0xc75/0xec0 [ 81.995503] vma_prepare+0xc54/0x11a0 [ 81.995978] __split_vma+0x5af/0x950 [ 81.996451] ? __pfx___split_vma+0x10/0x10 [ 81.996979] ? find_held_lock+0x2c/0x110 [ 81.997492] do_vmi_align_munmap+0x2ba/0x11f0 [ 81.998048] ? lock_is_held_type+0x9f/0x120 [ 81.998598] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 81.999205] ? mtree_range_walk+0x632/0x900 [ 81.999756] ? mas_walk+0x5c7/0x7c0 [ 82.000223] do_vmi_munmap+0x1f1/0x2b0 [ 82.000713] mmap_region+0x1f9/0x2660 [ 82.001196] ? vm_mmap_pgoff+0x15c/0x3a0 [ 82.001706] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 82.002434] ? __pfx_lock_acquire+0x10/0x10 [ 82.002963] ? __pfx_mmap_region+0x10/0x10 [ 82.003492] ? security_mmap_addr+0x7d/0xa0 [ 82.004017] ? get_unmapped_area+0x1f5/0x3f0 [ 82.004570] do_mmap+0x854/0xf00 [ 82.005002] vm_mmap_pgoff+0x1a6/0x3a0 [ 82.005498] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 82.006052] ksys_mmap_pgoff+0x3af/0x500 [ 82.006593] do_syscall_64+0x3f/0x90 [ 82.007074] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 82.007711] RIP: 0033:0x7f15e998ed82 [ 82.008161] 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 [ 82.010283] RSP: 002b:00007fffe2e9b728 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 82.011172] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f15e998ed82 [ 82.012023] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f15e8dc8000 [ 82.012860] RBP: 00007f15e8dc8000 R08: 0000000000000009 R09: 0000000000001000 [ 82.013701] R10: 0000000000000812 R11: 0000000000000206 R12: 0000555df8d53f70 [ 82.014555] R13: 00007fffe2e9b740 R14: 00007fffe2e9b770 R15: 00007fffe2e9bad0 [ 82.015413] [ 82.015703] [ 82.015916] Allocated by task 215: [ 82.016341] kasan_save_stack+0x22/0x50 [ 82.016845] kasan_set_track+0x25/0x30 [ 82.017331] __kasan_slab_alloc+0x59/0x70 [ 82.017853] kmem_cache_alloc+0x16b/0x370 [ 82.018392] vm_area_dup+0x20/0x160 [ 82.018846] __split_vma+0x170/0x950 [ 82.019319] split_vma+0xc6/0x110 [ 82.019753] mprotect_fixup+0x8d2/0xb30 [ 82.020252] do_mprotect_pkey+0x87e/0xd40 [ 82.020766] __x64_sys_mprotect+0x78/0xc0 [ 82.021287] do_syscall_64+0x3f/0x90 [ 82.021759] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 82.022399] [ 82.022616] Freed by task 215: [ 82.023012] kasan_save_stack+0x22/0x50 [ 82.023598] kasan_set_track+0x25/0x30 [ 82.024188] kasan_save_free_info+0x2b/0x50 [ 82.024831] __kasan_slab_free+0x10a/0x190 [ 82.025467] kmem_cache_free+0x10d/0x4d0 [ 82.026072] rcu_core+0x8c8/0x2860 [ 82.026633] __do_softirq+0x1b7/0x7d4 [ 82.027202] [ 82.027461] Last potentially related work creation: [ 82.028167] kasan_save_stack+0x22/0x50 [ 82.028772] __kasan_record_aux_stack+0x8e/0xa0 [ 82.029456] __call_rcu_common.constprop.0+0x6a/0xb90 [ 82.030228] remove_vma+0x139/0x170 [ 82.030766] do_vmi_align_munmap+0xd4a/0x11f0 [ 82.031429] do_vmi_munmap+0x1f1/0x2b0 [ 82.031994] __vm_munmap+0x138/0x3a0 [ 82.032537] __x64_sys_munmap+0x59/0x80 [ 82.033118] do_syscall_64+0x3f/0x90 [ 82.033662] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 82.034420] [ 82.034672] The buggy address belongs to the object at ffff888016444bc8 [ 82.034672] which belongs to the cache vm_area_struct of size 168 [ 82.036379] The buggy address is located 88 bytes inside of [ 82.036379] freed 168-byte region [ffff888016444bc8, ffff888016444c70) [ 82.038026] [ 82.038303] The buggy address belongs to the physical page: [ 82.039096] page:000000001fd4b605 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x16444 [ 82.040409] memcg:ffff8880093b4a01 [ 82.040916] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 82.041753] page_type: 0xffffffff() [ 82.042294] raw: 0100000000000200 ffff88800879fc80 ffffea0000517180 0000000000000003 [ 82.043393] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff8880093b4a01 [ 82.044489] page dumped because: kasan: bad access detected [ 82.045284] [ 82.045540] Memory state around the buggy address: [ 82.046260] ffff888016444b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 82.047284] ffff888016444b80: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb [ 82.048309] >ffff888016444c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc [ 82.049337] ^ [ 82.049971] ffff888016444c80: fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 [ 82.051007] ffff888016444d00: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc [ 82.052027] ================================================================== [ 82.053294] Disabling lock debugging due to kernel taint [ 84.038737] BUG: Bad rss-counter state mm:0000000089dc1ae1 type:MM_FILEPAGES val:33 [ 84.039918] BUG: Bad rss-counter state mm:0000000089dc1ae1 type:MM_ANONPAGES val:22 [ 84.680422] BUG: Bad rss-counter state mm:0000000038c640a7 type:MM_FILEPAGES val:33 [ 84.681595] BUG: Bad rss-counter state mm:0000000038c640a7 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:31134' (ECDSA) to the list of known hosts. 2023/06/19 15:06:59 fuzzer started 2023/06/19 15:07:00 dialing manager at localhost:44161 2023/06/19 15:07:00 checking machine... 2023/06/19 15:07:00 checking revisions... [ 85.363387] kmemleak: Automatic memory scanning thread ended 2023/06/19 15:07:00 testing simple program... [ 85.410115] cgroup: Unknown subsys name 'net' [ 85.449905] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 15:06:09 Registers: info registers vcpu 0 RAX=0000000000000000 RBX=ffff888019f765c0 RCX=0000000000000000 RDX=0000000080000000 RSI=00000000000000fe RDI=ffff88800c59a4c0 RBP=ffff888019f765f8 RSP=ffff88801a107968 R8 =0000000000000001 R9 =0000000000000000 R10=0000000000000001 R11=0000000000000001 R12=ffff88801a0b6e70 R13=1ffff11003420f34 R14=ffff88800f44c910 R15=ffff88800f44c910 RIP=ffffffff84519b7b RFL=00000282 [--S----] 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 00007f65c72dd900 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=00007f65c7892650 CR3=00000000145fc000 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=ffffffff00ffffffffffffffffffffff XMM01=707465675f6c697475646f6d6d61705f XMM02=ff000000000000ff0000000000ff0000 XMM03=66207463656e6e6f6373696420646576 XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000 XMM06=0d0c0f0e09080b0a0504070601000302 XMM07=00000000000000000000000000000000 XMM08=000a0d732a2e25006c61746166003367 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=0000000000000000 RBX=0000000000000001 RCX=ffffffff8618ed8a RDX=0000000000000000 RSI=0000000000000001 RDI=0000000000000001 RBP=ffff8880159a7680 RSP=ffff8880159a75b8 R8 =ffffffff8618ed8e R9 =ffff8880159a7668 R10=0000000000038001 R11=000000000002f6f5 R12=ffff8880159a7688 R13=ffff8880159a7670 R14=0000000000000005 R15=ffff8880159a7628 RIP=ffffffff81130b39 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 00007f374bfff700 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=00007fcbbfa48dd0 CR3=0000000019be6000 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=2039353a36303a3531203931206e754a XMM01=73732878696e755f6d6170203a5d3133 XMM02=65736f6c63206e6f6973736573203a29 XMM03=755f6d6170203a5d3133325b64687373 XMM04=69662068637573206f4e203a656c6163 XMM05=3a656c696620766e65206e65706f206f XMM06=65733a6468737328766e655f6d617020 XMM07=6b7a79732039353a36303a3531203931 XMM08=3d656e696c646d632022656369767265 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000