syzkaller login: [ 38.734543] BUG: Bad rss-counter state mm:000000000a48433c type:MM_FILEPAGES val:33 [ 38.735902] BUG: Bad rss-counter state mm:000000000a48433c type:MM_ANONPAGES val:22 [ 38.883854] ================================================================== [ 38.885196] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 38.886475] Read of size 8 at addr ffff88800dd01880 by task sshd/220 [ 38.887363] [ 38.887635] CPU: 1 PID: 220 Comm: sshd Not tainted 6.4.0-rc7-next-20230620 #1 [ 38.888636] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 38.889767] Call Trace: [ 38.890156] [ 38.890485] dump_stack_lvl+0x91/0xf0 [ 38.891056] print_report+0xcc/0x620 [ 38.891625] ? __virt_addr_valid+0x102/0x340 [ 38.892272] ? vma_interval_tree_remove+0xc75/0xec0 [ 38.892993] ? vma_interval_tree_remove+0xc75/0xec0 [ 38.893712] kasan_report+0xbe/0xf0 [ 38.894287] ? vma_interval_tree_remove+0xc75/0xec0 [ 38.895005] vma_interval_tree_remove+0xc75/0xec0 [ 38.895710] vma_prepare+0xc54/0x11a0 [ 38.896283] __split_vma+0x5af/0x950 [ 38.896861] ? __pfx___split_vma+0x10/0x10 [ 38.897509] ? find_held_lock+0x2c/0x110 [ 38.898150] do_vmi_align_munmap+0x2ba/0x11f0 [ 38.898822] ? lock_is_held_type+0x9f/0x120 [ 38.899477] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 38.900221] ? mtree_range_walk+0x632/0x900 [ 38.900898] ? mas_walk+0x5c7/0x7c0 [ 38.901486] do_vmi_munmap+0x1f1/0x2b0 [ 38.902092] mmap_region+0x1f9/0x2660 [ 38.902692] ? vm_mmap_pgoff+0x15c/0x3a0 [ 38.903325] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 38.904209] ? __pfx_lock_acquire+0x10/0x10 [ 38.904867] ? __pfx_mmap_region+0x10/0x10 [ 38.905515] ? security_mmap_addr+0x7d/0xa0 [ 38.906178] ? get_unmapped_area+0x1f5/0x3f0 [ 38.906846] do_mmap+0x854/0xf00 [ 38.907376] vm_mmap_pgoff+0x1a6/0x3a0 [ 38.907981] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 38.908665] ksys_mmap_pgoff+0x3af/0x500 [ 38.909284] do_syscall_64+0x3f/0x90 [ 38.909873] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.910661] RIP: 0033:0x7fb8c3a10d82 [ 38.911215] 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 [ 38.913794] RSP: 002b:00007ffefd185b98 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 38.914904] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fb8c3a10d82 [ 38.915930] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fb8c2e4a000 [ 38.916962] RBP: 00007fb8c2e4a000 R08: 0000000000000009 R09: 0000000000001000 [ 38.918001] R10: 0000000000000812 R11: 0000000000000206 R12: 0000560847357b20 [ 38.919033] R13: 00007ffefd185bb0 R14: 00007ffefd185be0 R15: 00007ffefd185f40 [ 38.920073] [ 38.920428] [ 38.920688] Allocated by task 213: [ 38.921204] kasan_save_stack+0x22/0x50 [ 38.921816] kasan_set_track+0x25/0x30 [ 38.922430] __kasan_slab_alloc+0x59/0x70 [ 38.923063] kmem_cache_alloc+0x16b/0x370 [ 38.923683] vm_area_dup+0x20/0x160 [ 38.924235] __split_vma+0x170/0x950 [ 38.924799] split_vma+0xc6/0x110 [ 38.925325] mprotect_fixup+0x8d2/0xb30 [ 38.925935] do_mprotect_pkey+0x87e/0xd40 [ 38.926567] __x64_sys_mprotect+0x78/0xc0 [ 38.927306] do_syscall_64+0x3f/0x90 [ 38.927886] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.928662] [ 38.928918] Freed by task 213: [ 38.929392] kasan_save_stack+0x22/0x50 [ 38.930018] kasan_set_track+0x25/0x30 [ 38.930617] kasan_save_free_info+0x2b/0x50 [ 38.931254] __kasan_slab_free+0x10a/0x190 [ 38.931898] kmem_cache_free+0x10d/0x4d0 [ 38.932522] rcu_core+0x8c8/0x2860 [ 38.933053] __do_softirq+0x1b7/0x7d4 [ 38.933636] [ 38.933900] Last potentially related work creation: [ 38.934601] kasan_save_stack+0x22/0x50 [ 38.935209] __kasan_record_aux_stack+0x8e/0xa0 [ 38.935909] __call_rcu_common.constprop.0+0x6a/0xb90 [ 38.936690] remove_vma+0x139/0x170 [ 38.937234] do_vmi_align_munmap+0xd4a/0x11f0 [ 38.937917] do_vmi_munmap+0x1f1/0x2b0 [ 38.938500] __vm_munmap+0x138/0x3a0 [ 38.939062] __x64_sys_munmap+0x59/0x80 [ 38.939667] do_syscall_64+0x3f/0x90 [ 38.940238] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.941025] [ 38.941283] The buggy address belongs to the object at ffff88800dd01828 [ 38.941283] which belongs to the cache vm_area_struct of size 168 [ 38.943063] The buggy address is located 88 bytes inside of [ 38.943063] freed 168-byte region [ffff88800dd01828, ffff88800dd018d0) [ 38.944763] [ 38.945025] The buggy address belongs to the physical page: [ 38.945818] page:0000000055177ad8 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xdd01 [ 38.947084] memcg:ffff88800dec6701 [ 38.947578] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 38.948377] page_type: 0xffffffff() [ 38.948903] raw: 0100000000000200 ffff8880087a0c80 0000000000000000 dead000000000001 [ 38.949972] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800dec6701 [ 38.951025] page dumped because: kasan: bad access detected [ 38.951779] [ 38.952028] Memory state around the buggy address: [ 38.952692] ffff88800dd01780: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc [ 38.953670] ffff88800dd01800: fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb [ 38.954671] >ffff88800dd01880: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc [ 38.955674] ^ [ 38.956166] ffff88800dd01900: fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 38.957184] ffff88800dd01980: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fa [ 38.958200] ================================================================== [ 38.959293] Disabling lock debugging due to kernel taint [ 41.760916] BUG: Bad rss-counter state mm:000000001254705f type:MM_FILEPAGES val:33 [ 41.762247] BUG: Bad rss-counter state mm:000000001254705f type:MM_ANONPAGES val:22 [ 42.208517] BUG: Bad rss-counter state mm:0000000035015594 type:MM_FILEPAGES val:33 [ 42.209490] BUG: Bad rss-counter state mm:0000000035015594 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:60275' (ECDSA) to the list of known hosts. 2023/06/21 05:13:04 fuzzer started 2023/06/21 05:13:04 dialing manager at localhost:36067 2023/06/21 05:13:04 checking machine... 2023/06/21 05:13:04 checking revisions... [ 42.919212] kmemleak: Automatic memory scanning thread ended 2023/06/21 05:13:04 testing simple program... [ 42.971862] cgroup: Unknown subsys name 'net' [ 43.016743] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 05:13:04 Registers: info registers vcpu 0 RAX=dffffc0000000000 RBX=ffff88800f0b7f40 RCX=0000000000000001 RDX=1ffff11001e16f0c RSI=ffff88800f0b7f10 RDI=ffff88800f0b7860 RBP=ffff88800f0b7f48 RSP=ffff88800f0b77e8 R8 =0000000000000001 R9 =ffff88800f0b7898 R10=0000000000038001 R11=000000000001e365 R12=ffff88800f0b78b8 R13=ffff88800f0b78a0 R14=ffff88800f0b7f10 R15=ffff88800f0b7858 RIP=ffffffff81131c83 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 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=00007f7ea4813260 CR3=000000000eb5a000 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=756e696c2d34365f3638782f62696c2f XMM01=6f732e3562726b62696c2f756e672d78 XMM02=00332e6f732e3562726b62696c2f756e XMM03=672d78756e696c2d34365f3638782f62 XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000 XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000 XMM08=00000000000000000000000000000000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=dffffc0000000000 RBX=ffffffff8121b48b RCX=ffffffff860a1201 RDX=1ffff110011c6f3a RSI=0000000000000000 RDI=ffffffff8121b48b RBP=ffffffff8121b48b RSP=ffff888008e37920 R8 =ffffffff860a12fa R9 =ffff888008e379b8 R10=0000000000038001 R11=00000000000078fb R12=ffff888008e37a40 R13=0000000000000000 R14=ffff888008e0d1c0 R15=ffff8880101b1d90 RIP=ffffffff811fc6f7 RFL=00000292 [--S-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=00007f5cd26c6020 CR3=0000000016594000 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=ff0000000000ffff0000000000ff0000 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