syzkaller login: [ 39.922078] BUG: Bad rss-counter state mm:00000000687363f2 type:MM_FILEPAGES val:33 [ 39.923767] BUG: Bad rss-counter state mm:00000000687363f2 type:MM_ANONPAGES val:22 [ 40.100460] ================================================================== [ 40.101458] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 40.102536] Read of size 8 at addr ffff88800d36f5c8 by task sshd/220 [ 40.103490] [ 40.103727] CPU: 0 PID: 220 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 40.104664] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 40.105764] Call Trace: [ 40.106123] [ 40.106452] dump_stack_lvl+0x91/0xf0 [ 40.106983] print_report+0xcc/0x620 [ 40.107528] ? __virt_addr_valid+0x102/0x340 [ 40.108133] ? vma_interval_tree_remove+0xc75/0xec0 [ 40.108811] ? vma_interval_tree_remove+0xc75/0xec0 [ 40.109479] kasan_report+0xbe/0xf0 [ 40.109993] ? vma_interval_tree_remove+0xc75/0xec0 [ 40.110714] vma_interval_tree_remove+0xc75/0xec0 [ 40.111390] vma_prepare+0xc54/0x11a0 [ 40.111910] __split_vma+0x5af/0x950 [ 40.112422] ? __pfx___split_vma+0x10/0x10 [ 40.113006] ? find_held_lock+0x2c/0x110 [ 40.113575] do_vmi_align_munmap+0x2ba/0x11f0 [ 40.114223] ? lock_is_held_type+0x9f/0x120 [ 40.114808] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 40.115478] ? mtree_range_walk+0x632/0x900 [ 40.116086] ? mas_walk+0x5c7/0x7c0 [ 40.116611] do_vmi_munmap+0x1f1/0x2b0 [ 40.117154] mmap_region+0x1f9/0x2660 [ 40.117678] ? vm_mmap_pgoff+0x15c/0x3a0 [ 40.118252] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 40.119028] ? __pfx_lock_acquire+0x10/0x10 [ 40.119598] ? __pfx_mmap_region+0x10/0x10 [ 40.120168] ? security_mmap_addr+0x7d/0xa0 [ 40.120745] ? get_unmapped_area+0x1f5/0x3f0 [ 40.121337] do_mmap+0x854/0xf00 [ 40.121805] vm_mmap_pgoff+0x1a6/0x3a0 [ 40.122352] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 40.122959] ksys_mmap_pgoff+0x3af/0x500 [ 40.123511] do_syscall_64+0x3f/0x90 [ 40.124021] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 40.124714] RIP: 0033:0x7f6775bf2d82 [ 40.125202] 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 [ 40.127538] RSP: 002b:00007ffc4e1b3e08 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 40.128596] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f6775bf2d82 [ 40.129510] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f677502c000 [ 40.130435] RBP: 00007f677502c000 R08: 0000000000000009 R09: 0000000000001000 [ 40.131335] R10: 0000000000000812 R11: 0000000000000206 R12: 0000559a3e381ec0 [ 40.132225] R13: 00007ffc4e1b3e20 R14: 00007ffc4e1b3e50 R15: 00007ffc4e1b41b0 [ 40.133134] [ 40.133442] [ 40.133670] Allocated by task 213: [ 40.134125] kasan_save_stack+0x22/0x50 [ 40.134677] kasan_set_track+0x25/0x30 [ 40.135206] __kasan_slab_alloc+0x59/0x70 [ 40.135766] kmem_cache_alloc+0x16b/0x370 [ 40.136312] vm_area_dup+0x20/0x160 [ 40.136792] __split_vma+0x170/0x950 [ 40.137289] split_vma+0xc6/0x110 [ 40.137758] mprotect_fixup+0x8d2/0xb30 [ 40.138303] do_mprotect_pkey+0x87e/0xd40 [ 40.138857] __x64_sys_mprotect+0x78/0xc0 [ 40.139409] do_syscall_64+0x3f/0x90 [ 40.139909] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 40.140593] [ 40.140822] Freed by task 213: [ 40.141238] kasan_save_stack+0x22/0x50 [ 40.141772] kasan_set_track+0x25/0x30 [ 40.142315] kasan_save_free_info+0x2b/0x50 [ 40.142878] __kasan_slab_free+0x10a/0x190 [ 40.143445] kmem_cache_free+0x10d/0x4d0 [ 40.143984] rcu_core+0x8c8/0x2860 [ 40.144453] __do_softirq+0x1b7/0x7d4 [ 40.144952] [ 40.145183] Last potentially related work creation: [ 40.145803] kasan_save_stack+0x22/0x50 [ 40.146345] __kasan_record_aux_stack+0x8e/0xa0 [ 40.146954] __call_rcu_common.constprop.0+0x6a/0xb90 [ 40.147631] remove_vma+0x139/0x170 [ 40.148109] do_vmi_align_munmap+0xd4a/0x11f0 [ 40.148695] do_vmi_munmap+0x1f1/0x2b0 [ 40.149208] __vm_munmap+0x138/0x3a0 [ 40.149705] __x64_sys_munmap+0x59/0x80 [ 40.150250] do_syscall_64+0x3f/0x90 [ 40.150754] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 40.151440] [ 40.151669] Second to last potentially related work creation: [ 40.152396] kasan_save_stack+0x22/0x50 [ 40.152927] __kasan_record_aux_stack+0x8e/0xa0 [ 40.153530] __call_rcu_common.constprop.0+0x6a/0xb90 [ 40.154213] remove_vma+0x139/0x170 [ 40.154691] do_vmi_align_munmap+0xd4a/0x11f0 [ 40.155278] do_vmi_munmap+0x1f1/0x2b0 [ 40.155787] mmap_region+0x1f9/0x2660 [ 40.156289] do_mmap+0x854/0xf00 [ 40.156742] vm_mmap_pgoff+0x1a6/0x3a0 [ 40.157256] ksys_mmap_pgoff+0x3af/0x500 [ 40.157782] do_syscall_64+0x3f/0x90 [ 40.158288] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 40.158955] [ 40.159183] The buggy address belongs to the object at ffff88800d36f570 [ 40.159183] which belongs to the cache vm_area_struct of size 168 [ 40.160734] The buggy address is located 88 bytes inside of [ 40.160734] freed 168-byte region [ffff88800d36f570, ffff88800d36f618) [ 40.162215] [ 40.162444] The buggy address belongs to the physical page: [ 40.163129] page:000000003c19f989 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xd36f [ 40.164257] memcg:ffff88800e773801 [ 40.164700] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 40.165425] page_type: 0xffffffff() [ 40.165893] raw: 0100000000000200 ffff88800879fc80 ffffea0000398f80 dead000000000005 [ 40.166851] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800e773801 [ 40.167788] page dumped because: kasan: bad access detected [ 40.168476] [ 40.168700] Memory state around the buggy address: [ 40.169302] ffff88800d36f480: fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 40.170204] ffff88800d36f500: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fa fb [ 40.171102] >ffff88800d36f580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.171982] ^ [ 40.172667] ffff88800d36f600: fb fb fb fc fc fc fc fc fc fc fc 00 00 00 00 00 [ 40.173551] ffff88800d36f680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 40.174442] ================================================================== [ 40.175529] Disabling lock debugging due to kernel taint [ 41.870924] BUG: Bad rss-counter state mm:00000000b24b8d43 type:MM_FILEPAGES val:33 [ 41.871425] BUG: Bad rss-counter state mm:00000000b24b8d43 type:MM_ANONPAGES val:22 [ 42.345910] BUG: Bad rss-counter state mm:000000007ef63786 type:MM_FILEPAGES val:33 [ 42.347155] BUG: Bad rss-counter state mm:000000007ef63786 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:58081' (ECDSA) to the list of known hosts. 2023/06/19 13:23:01 fuzzer started 2023/06/19 13:23:02 dialing manager at localhost:44161 2023/06/19 13:23:02 checking machine... 2023/06/19 13:23:02 checking revisions... [ 43.125148] kmemleak: Automatic memory scanning thread ended 2023/06/19 13:23:02 testing simple program... [ 43.172818] cgroup: Unknown subsys name 'net' [ 43.225625] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 13:23:00 Registers: info registers vcpu 0 RAX=0000000000000000 RBX=0000000000000001 RCX=ffffffff864b0246 RDX=0000000000000001 RSI=0000000000000000 RDI=0000000000000001 RBP=ffff888018c6f950 RSP=ffff888018c6f888 R8 =ffffffff864b024a R9 =ffff888018c6f938 R10=0000000000038001 R11=00000000000b4fb9 R12=ffff888018c6f958 R13=ffff888018c6f940 R14=ffff888018c6ff58 R15=ffff888018c6f8f8 RIP=ffffffff81131153 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 00007fd1327aa900 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=00007ffcf7cda000 CR3=000000000e192000 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=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 info registers vcpu 1 RAX=1ffff110018b554f RBX=dffffc0000000000 RCX=0000000000000000 RDX=ffff8880099e9b40 RSI=ffffffff818ea23d RDI=ffff88800c5aa9a8 RBP=0000000000000003 RSP=ffff8880159e7e90 R8 =0000000000000004 R9 =0000000000000003 R10=0000000000000040 R11=0000000000000000 R12=0000000000000003 R13=ffff88800c5aa9a0 R14=0000000000000003 R15=0000000000000000 RIP=ffffffff818ea271 RFL=00000212 [----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 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=00007f4f93921260 CR3=000000000df34000 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=756e696c2d34365f3638782f62696c2f XMM01=2e6f732e6d617062696c2f756e672d78 XMM02=00302e6f732e6d617062696c2f756e67 XMM03=2d78756e696c2d34365f3638782f6269 XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000 XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000 XMM08=00000000000000000000000000000000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000