syzkaller login: [ 31.952683] BUG: Bad rss-counter state mm:0000000077c91618 type:MM_FILEPAGES val:33 [ 31.954203] BUG: Bad rss-counter state mm:0000000077c91618 type:MM_ANONPAGES val:22 [ 32.093167] ================================================================== [ 32.094100] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 32.095041] Read of size 8 at addr ffff8880094f9c20 by task sshd/219 [ 32.095810] [ 32.096030] CPU: 1 PID: 219 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 32.097067] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 32.098052] Call Trace: [ 32.098378] [ 32.098664] dump_stack_lvl+0x91/0xf0 [ 32.099155] print_report+0xcc/0x620 [ 32.099654] ? __virt_addr_valid+0x102/0x340 [ 32.100210] ? vma_interval_tree_remove+0xc75/0xec0 [ 32.100834] ? vma_interval_tree_remove+0xc75/0xec0 [ 32.101452] kasan_report+0xbe/0xf0 [ 32.101948] ? vma_interval_tree_remove+0xc75/0xec0 [ 32.102567] vma_interval_tree_remove+0xc75/0xec0 [ 32.103169] vma_prepare+0xc54/0x11a0 [ 32.103659] __split_vma+0x5af/0x950 [ 32.104139] ? __pfx___split_vma+0x10/0x10 [ 32.104669] ? find_held_lock+0x2c/0x110 [ 32.105190] do_vmi_align_munmap+0x2ba/0x11f0 [ 32.105763] ? lock_is_held_type+0x9f/0x120 [ 32.106306] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 32.106918] ? mtree_range_walk+0x632/0x900 [ 32.107473] ? mas_walk+0x5c7/0x7c0 [ 32.107956] do_vmi_munmap+0x1f1/0x2b0 [ 32.108445] mmap_region+0x1f9/0x2660 [ 32.108924] ? vm_mmap_pgoff+0x15c/0x3a0 [ 32.109432] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 32.110161] ? __pfx_lock_acquire+0x10/0x10 [ 32.110690] ? __pfx_mmap_region+0x10/0x10 [ 32.111219] ? security_mmap_addr+0x7d/0xa0 [ 32.111747] ? get_unmapped_area+0x1f5/0x3f0 [ 32.112291] do_mmap+0x854/0xf00 [ 32.112731] vm_mmap_pgoff+0x1a6/0x3a0 [ 32.113231] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 32.113790] ksys_mmap_pgoff+0x3af/0x500 [ 32.114303] do_syscall_64+0x3f/0x90 [ 32.114777] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 32.115423] RIP: 0033:0x7fbff34ebd82 [ 32.115886] 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 [ 32.118035] RSP: 002b:00007ffdb1d81ab8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 32.118933] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fbff34ebd82 [ 32.119774] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fbff2925000 [ 32.120624] RBP: 00007fbff2925000 R08: 0000000000000009 R09: 0000000000001000 [ 32.121470] R10: 0000000000000812 R11: 0000000000000206 R12: 000055e148616ec0 [ 32.122325] R13: 00007ffdb1d81ad0 R14: 00007ffdb1d81b00 R15: 00007ffdb1d81e60 [ 32.123175] [ 32.123465] [ 32.123681] Allocated by task 212: [ 32.124107] kasan_save_stack+0x22/0x50 [ 32.124620] kasan_set_track+0x25/0x30 [ 32.125111] __kasan_slab_alloc+0x59/0x70 [ 32.125638] kmem_cache_alloc+0x16b/0x370 [ 32.126164] vm_area_dup+0x20/0x160 [ 32.126618] __split_vma+0x170/0x950 [ 32.127092] split_vma+0xc6/0x110 [ 32.127534] mprotect_fixup+0x8d2/0xb30 [ 32.128035] do_mprotect_pkey+0x87e/0xd40 [ 32.128554] __x64_sys_mprotect+0x78/0xc0 [ 32.129081] do_syscall_64+0x3f/0x90 [ 32.129553] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 32.130225] [ 32.130439] Freed by task 212: [ 32.130838] kasan_save_stack+0x22/0x50 [ 32.131347] kasan_set_track+0x25/0x30 [ 32.131848] kasan_save_free_info+0x2b/0x50 [ 32.132394] __kasan_slab_free+0x10a/0x190 [ 32.132939] kmem_cache_free+0x10d/0x4d0 [ 32.133446] rcu_core+0x8c8/0x2860 [ 32.133905] __do_softirq+0x1b7/0x7d4 [ 32.134392] [ 32.134610] Last potentially related work creation: [ 32.135196] kasan_save_stack+0x22/0x50 [ 32.135703] __kasan_record_aux_stack+0x8e/0xa0 [ 32.136278] __call_rcu_common.constprop.0+0x6a/0xb90 [ 32.136992] remove_vma+0x139/0x170 [ 32.137448] do_vmi_align_munmap+0xd4a/0x11f0 [ 32.138024] do_vmi_munmap+0x1f1/0x2b0 [ 32.138509] __vm_munmap+0x138/0x3a0 [ 32.138978] __x64_sys_munmap+0x59/0x80 [ 32.139472] do_syscall_64+0x3f/0x90 [ 32.139949] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 32.140591] [ 32.140810] The buggy address belongs to the object at ffff8880094f9bc8 [ 32.140810] which belongs to the cache vm_area_struct of size 168 [ 32.142282] The buggy address is located 88 bytes inside of [ 32.142282] freed 168-byte region [ffff8880094f9bc8, ffff8880094f9c70) [ 32.143688] [ 32.143903] The buggy address belongs to the physical page: [ 32.144557] page:00000000cd626c28 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x94f9 [ 32.145634] memcg:ffff88801a01a901 [ 32.146065] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 32.146759] page_type: 0xffffffff() [ 32.147210] raw: 0100000000000200 ffff88800879fc80 ffffea000031ba00 dead000000000007 [ 32.148125] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88801a01a901 [ 32.149029] page dumped because: kasan: bad access detected [ 32.149682] [ 32.149918] Memory state around the buggy address: [ 32.150500] ffff8880094f9b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.151351] ffff8880094f9b80: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb [ 32.152209] >ffff8880094f9c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc [ 32.153060] ^ [ 32.153593] ffff8880094f9c80: fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 [ 32.154461] ffff8880094f9d00: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc [ 32.155314] ================================================================== [ 32.156348] Disabling lock debugging due to kernel taint [ 34.213778] BUG: Bad rss-counter state mm:0000000098543176 type:MM_FILEPAGES val:33 [ 34.214759] BUG: Bad rss-counter state mm:0000000098543176 type:MM_ANONPAGES val:22 [ 34.675757] BUG: Bad rss-counter state mm:000000004fd1bb75 type:MM_FILEPAGES val:33 [ 34.677000] BUG: Bad rss-counter state mm:000000004fd1bb75 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:47320' (ECDSA) to the list of known hosts. 2023/06/20 00:36:38 fuzzer started 2023/06/20 00:36:38 dialing manager at localhost:44161 2023/06/20 00:36:38 checking machine... 2023/06/20 00:36:38 checking revisions... [ 35.440054] kmemleak: Automatic memory scanning thread ended 2023/06/20 00:36:39 testing simple program... [ 35.492024] cgroup: Unknown subsys name 'net' [ 35.534283] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 00:36:37 Registers: info registers vcpu 0 RAX=0000000080000000 RBX=ffff88801cd9fd80 RCX=ffffffff83874956 RDX=ffff88800cbf3680 RSI=0000000000000000 RDI=0000000000000007 RBP=00000000000000f4 RSP=ffff88801cd9fbe0 R8 =0000000000000007 R9 =0000000000000000 R10=0000000000000000 R11=0000000000000000 R12=ffff8880088ddc00 R13=0000000000000000 R14=0000000000000019 R15=0000000000000000 RIP=ffffffff814c07eb 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 00007f11e03e5900 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=00007ffe73358000 CR3=000000001a210000 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=0000000000000000 RBX=0000000000000001 RCX=0000000000000001 RDX=0000000000000001 RSI=ffffffff81288f48 RDI=ffff88806cf09a98 RBP=ffff88806cf09af0 RSP=ffff88806cf09a28 R8 =0000000000000001 R9 =ffff88806cf09ad8 R10=0000000000038001 R11=000000000000ba82 R12=ffff88806cf09af8 R13=ffff88806cf09ae0 R14=ffff88806cf09ad9 R15=ffff88806cf09a98 RIP=ffffffff811306ec 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=00007f17066cb880 CR3=000000000ca26000 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=b222d3c3c46a5294824e8052df44ab20 XMM02=000000000011ec38eff9b2d0a8fce9cb XMM03=000000000011ed082c67c8bc2e329bc3 XMM04=5a2091e72537554b00000000000ae988 XMM05=0437f58d9dc4a7e50000000000135020 XMM06=806171799158d96700000000001341c0 XMM07=e042d86d42eb936e0000000000124d28 XMM08=6aa042b0a450be67000000000011ed08 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000