syzkaller login: [ 57.946985] BUG: Bad rss-counter state mm:000000009572f93e type:MM_FILEPAGES val:33 [ 57.948269] BUG: Bad rss-counter state mm:000000009572f93e type:MM_ANONPAGES val:22 [ 58.094225] ================================================================== [ 58.095132] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 58.096078] Read of size 8 at addr ffff88800c6f9968 by task sshd/220 [ 58.096954] [ 58.097176] CPU: 1 PID: 220 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 58.098041] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 58.099014] Call Trace: [ 58.099334] [ 58.099618] dump_stack_lvl+0x91/0xf0 [ 58.100128] print_report+0xcc/0x620 [ 58.100618] ? __virt_addr_valid+0x102/0x340 [ 58.101173] ? vma_interval_tree_remove+0xc75/0xec0 [ 58.101788] ? vma_interval_tree_remove+0xc75/0xec0 [ 58.102412] kasan_report+0xbe/0xf0 [ 58.102885] ? vma_interval_tree_remove+0xc75/0xec0 [ 58.103505] vma_interval_tree_remove+0xc75/0xec0 [ 58.104140] vma_prepare+0xc54/0x11a0 [ 58.104639] __split_vma+0x5af/0x950 [ 58.105127] ? __pfx___split_vma+0x10/0x10 [ 58.105674] ? find_held_lock+0x2c/0x110 [ 58.106217] do_vmi_align_munmap+0x2ba/0x11f0 [ 58.106782] ? lock_is_held_type+0x9f/0x120 [ 58.107324] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 58.107977] ? mtree_range_walk+0x632/0x900 [ 58.108541] ? mas_walk+0x5c7/0x7c0 [ 58.109021] do_vmi_munmap+0x1f1/0x2b0 [ 58.109515] mmap_region+0x1f9/0x2660 [ 58.110005] ? vm_mmap_pgoff+0x15c/0x3a0 [ 58.110527] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 58.111253] ? __pfx_lock_acquire+0x10/0x10 [ 58.111811] ? __pfx_mmap_region+0x10/0x10 [ 58.112339] ? security_mmap_addr+0x7d/0xa0 [ 58.112883] ? get_unmapped_area+0x1f5/0x3f0 [ 58.113437] do_mmap+0x854/0xf00 [ 58.113892] vm_mmap_pgoff+0x1a6/0x3a0 [ 58.114387] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 58.114957] ksys_mmap_pgoff+0x3af/0x500 [ 58.115460] do_syscall_64+0x3f/0x90 [ 58.115955] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 58.116606] RIP: 0033:0x7f88353b9d82 [ 58.117069] 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 [ 58.119189] RSP: 002b:00007ffd87a51bf8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 58.120094] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f88353b9d82 [ 58.120942] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f88347f3000 [ 58.121786] RBP: 00007f88347f3000 R08: 0000000000000009 R09: 0000000000001000 [ 58.122630] R10: 0000000000000812 R11: 0000000000000206 R12: 000055b548f78b20 [ 58.123478] R13: 00007ffd87a51c10 R14: 00007ffd87a51c40 R15: 00007ffd87a51fa0 [ 58.124356] [ 58.124647] [ 58.124861] Allocated by task 213: [ 58.125292] kasan_save_stack+0x22/0x50 [ 58.125792] kasan_set_track+0x25/0x30 [ 58.126286] __kasan_slab_alloc+0x59/0x70 [ 58.126816] kmem_cache_alloc+0x16b/0x370 [ 58.127332] vm_area_dup+0x20/0x160 [ 58.127795] __split_vma+0x170/0x950 [ 58.128269] split_vma+0xc6/0x110 [ 58.128716] mprotect_fixup+0x8d2/0xb30 [ 58.129221] do_mprotect_pkey+0x87e/0xd40 [ 58.129737] __x64_sys_mprotect+0x78/0xc0 [ 58.130265] do_syscall_64+0x3f/0x90 [ 58.130738] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 58.131380] [ 58.131597] Freed by task 210: [ 58.131991] kasan_save_stack+0x22/0x50 [ 58.132492] kasan_set_track+0x25/0x30 [ 58.132988] kasan_save_free_info+0x2b/0x50 [ 58.133525] __kasan_slab_free+0x10a/0x190 [ 58.134056] kmem_cache_free+0x10d/0x4d0 [ 58.134565] rcu_core+0x8c8/0x2860 [ 58.135018] __do_softirq+0x1b7/0x7d4 [ 58.135494] [ 58.135722] Last potentially related work creation: [ 58.136312] kasan_save_stack+0x22/0x50 [ 58.136817] __kasan_record_aux_stack+0x8e/0xa0 [ 58.137396] __call_rcu_common.constprop.0+0x6a/0xb90 [ 58.138041] remove_vma+0x139/0x170 [ 58.138579] do_vmi_align_munmap+0xd4a/0x11f0 [ 58.139135] do_vmi_munmap+0x1f1/0x2b0 [ 58.139623] __vm_munmap+0x138/0x3a0 [ 58.140099] __x64_sys_munmap+0x59/0x80 [ 58.140606] do_syscall_64+0x3f/0x90 [ 58.141088] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 58.141730] [ 58.141947] The buggy address belongs to the object at ffff88800c6f9910 [ 58.141947] which belongs to the cache vm_area_struct of size 168 [ 58.143409] The buggy address is located 88 bytes inside of [ 58.143409] freed 168-byte region [ffff88800c6f9910, ffff88800c6f99b8) [ 58.144824] [ 58.145040] The buggy address belongs to the physical page: [ 58.145702] page:00000000d4045753 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xc6f9 [ 58.146773] memcg:ffff8880145f3d01 [ 58.147203] flags: 0x100000000000200(slab|node=0|zone=1) [ 58.147850] page_type: 0xffffffff() [ 58.148302] raw: 0100000000000200 ffff88800879fc80 dead000000000122 0000000000000000 [ 58.149225] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff8880145f3d01 [ 58.150129] page dumped because: kasan: bad access detected [ 58.150789] [ 58.151006] Memory state around the buggy address: [ 58.151585] ffff88800c6f9800: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 [ 58.152458] ffff88800c6f9880: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc [ 58.153318] >ffff88800c6f9900: fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb [ 58.154174] ^ [ 58.154959] ffff88800c6f9980: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fa [ 58.155866] ffff88800c6f9a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 58.156719] ================================================================== [ 58.157654] Disabling lock debugging due to kernel taint [ 60.631427] BUG: Bad rss-counter state mm:00000000ab475628 type:MM_FILEPAGES val:33 [ 60.632661] BUG: Bad rss-counter state mm:00000000ab475628 type:MM_ANONPAGES val:22 [ 61.052778] BUG: Bad rss-counter state mm:000000008881041d type:MM_FILEPAGES val:33 [ 61.053977] BUG: Bad rss-counter state mm:000000008881041d type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:4504' (ECDSA) to the list of known hosts. 2023/06/19 19:04:26 fuzzer started 2023/06/19 19:04:26 dialing manager at localhost:44161 2023/06/19 19:04:26 checking machine... 2023/06/19 19:04:26 checking revisions... [ 61.736795] kmemleak: Automatic memory scanning thread ended 2023/06/19 19:04:26 testing simple program... [ 61.778322] cgroup: Unknown subsys name 'net' [ 61.815897] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 19:03:57 Registers: info registers vcpu 0 RAX=dffffc0000000000 RBX=0000000000000001 RCX=0000000000000001 RDX=1ffff110028eaebe RSI=ffff8880147579a8 RDI=ffff8880147575f8 RBP=ffff88800e2573c0 RSP=ffff888014757538 R8 =0000000000000001 R9 =ffff8880147575e8 R10=0000000000038001 R11=000000000008b93b R12=ffff888014757608 R13=ffff8880147575f0 R14=ffff8880147579a8 R15=ffff8880147575a8 RIP=ffffffff81131c60 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 00007fbfba407900 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=00007fbfba9be618 CR3=000000000f32e000 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=6e69676f6c5f6d61702c78756e696c65 XMM02=755f6d61702c74696d7265705f6d6170 XMM03=2c766e655f6d61702c7374696d696c5f XMM04=6d61702c766e655f6d61702c7374696d XMM05=78696e755f6d61702c74696d7265705f XMM06=6469756e69676f6c5f6d61702c78756e XMM07=672065736f6c635f6e6f69737365733a XMM08=61662029286e65706f5f746964756100 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=dffffc0000000000 RBX=ffff888008e57a40 RCX=ffffffff86137501 RDX=1ffff110011caf48 RSI=ffffffff8180f43b RDI=ffff888008e57a4c RBP=0000000000000002 RSP=ffff888008e57958 R8 =ffffffff86137542 R9 =ffff888008e579b8 R10=0000000000038001 R11=0000000000020d8a R12=ffff888008e57a40 R13=0000000000000000 R14=ffff888008e2d1c0 R15=ffff88801605a8d0 RIP=ffffffff813ad4cf 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 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=00007f017c762b80 CR3=000000000c6da000 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=cf166de8ac3ddb8bff467bdd8d240bcf XMM02=00000000001202d0eff9b2d0a8fce9cb XMM03=00000000001203a02c67c8bc2e329bc3 XMM04=31414851a62eb0fb00000000000ae988 XMM05=edf3c76928af29b30000000000135490 XMM06=4fda316b135da52b0000000000134530 XMM07=e042d86d42eb936e0000000000124cf8 XMM08=dfa1026c1232ff7d00000000001203a0 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000