syzkaller login: [ 110.600858] BUG: Bad rss-counter state mm:000000006f8a7414 type:MM_FILEPAGES val:33 [ 110.602268] BUG: Bad rss-counter state mm:000000006f8a7414 type:MM_ANONPAGES val:22 [ 110.646331] ================================================================== [ 110.647510] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 110.648566] Read of size 8 at addr ffff888008e9c880 by task sshd/219 [ 110.649368] [ 110.649621] CPU: 1 PID: 219 Comm: sshd Tainted: G L 6.4.0-rc7-next-20230619 #1 [ 110.650674] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 110.651683] Call Trace: [ 110.652015] [ 110.652316] dump_stack_lvl+0x91/0xf0 [ 110.652815] print_report+0xcc/0x620 [ 110.653311] ? __virt_addr_valid+0x102/0x340 [ 110.653888] ? vma_interval_tree_remove+0xc75/0xec0 [ 110.654520] ? vma_interval_tree_remove+0xc75/0xec0 [ 110.655153] kasan_report+0xbe/0xf0 [ 110.655643] ? vma_interval_tree_remove+0xc75/0xec0 [ 110.656291] vma_interval_tree_remove+0xc75/0xec0 [ 110.656894] vma_prepare+0xc54/0x11a0 [ 110.657398] __split_vma+0x5af/0x950 [ 110.657890] ? __pfx___split_vma+0x10/0x10 [ 110.658435] ? find_held_lock+0x2c/0x110 [ 110.658958] do_vmi_align_munmap+0x2ba/0x11f0 [ 110.659530] ? lock_is_held_type+0x9f/0x120 [ 110.660082] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 110.660696] ? mtree_range_walk+0x632/0x900 [ 110.661274] ? mas_walk+0x5c7/0x7c0 [ 110.661779] do_vmi_munmap+0x1f1/0x2b0 [ 110.662287] mmap_region+0x1f9/0x2660 [ 110.662775] ? vm_mmap_pgoff+0x15c/0x3a0 [ 110.663304] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 110.664036] ? __pfx_lock_acquire+0x10/0x10 [ 110.664584] ? __pfx_mmap_region+0x10/0x10 [ 110.665121] ? security_mmap_addr+0x7d/0xa0 [ 110.665672] ? get_unmapped_area+0x1f5/0x3f0 [ 110.666249] do_mmap+0x854/0xf00 [ 110.666706] vm_mmap_pgoff+0x1a6/0x3a0 [ 110.667215] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 110.667790] ksys_mmap_pgoff+0x3af/0x500 [ 110.668313] do_syscall_64+0x3f/0x90 [ 110.668792] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 110.669454] RIP: 0033:0x7fe1c6ab5d82 [ 110.669915] 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 [ 110.672111] RSP: 002b:00007ffc8525a9b8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 110.673029] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fe1c6ab5d82 [ 110.673904] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fe1c5eef000 [ 110.674764] RBP: 00007fe1c5eef000 R08: 0000000000000009 R09: 0000000000001000 [ 110.675629] R10: 0000000000000812 R11: 0000000000000206 R12: 000055abb1642ec0 [ 110.676501] R13: 00007ffc8525a9d0 R14: 00007ffc8525aa00 R15: 00007ffc8525ad60 [ 110.677376] [ 110.677691] [ 110.677905] Allocated by task 212: [ 110.678354] kasan_save_stack+0x22/0x50 [ 110.678857] kasan_set_track+0x25/0x30 [ 110.679370] __kasan_slab_alloc+0x59/0x70 [ 110.679892] kmem_cache_alloc+0x16b/0x370 [ 110.680425] vm_area_dup+0x20/0x160 [ 110.680884] __split_vma+0x170/0x950 [ 110.681381] split_vma+0xc6/0x110 [ 110.681849] mprotect_fixup+0x8d2/0xb30 [ 110.682362] do_mprotect_pkey+0x87e/0xd40 [ 110.682886] __x64_sys_mprotect+0x78/0xc0 [ 110.683433] do_syscall_64+0x3f/0x90 [ 110.683911] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 110.684564] [ 110.684779] Freed by task 209: [ 110.685194] kasan_save_stack+0x22/0x50 [ 110.685720] kasan_set_track+0x25/0x30 [ 110.686243] kasan_save_free_info+0x2b/0x50 [ 110.686788] __kasan_slab_free+0x10a/0x190 [ 110.687329] kmem_cache_free+0x10d/0x4d0 [ 110.687836] rcu_core+0x8c8/0x2860 [ 110.688300] __do_softirq+0x1b7/0x7d4 [ 110.688788] [ 110.689004] Last potentially related work creation: [ 110.689629] kasan_save_stack+0x22/0x50 [ 110.690143] __kasan_record_aux_stack+0x8e/0xa0 [ 110.690733] __call_rcu_common.constprop.0+0x6a/0xb90 [ 110.691569] remove_vma+0x139/0x170 [ 110.692069] do_vmi_align_munmap+0xd4a/0x11f0 [ 110.692625] do_vmi_munmap+0x1f1/0x2b0 [ 110.693127] __vm_munmap+0x138/0x3a0 [ 110.693612] __x64_sys_munmap+0x59/0x80 [ 110.694119] do_syscall_64+0x3f/0x90 [ 110.694591] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 110.695248] [ 110.695466] Second to last potentially related work creation: [ 110.696180] kasan_save_stack+0x22/0x50 [ 110.696701] __kasan_record_aux_stack+0x8e/0xa0 [ 110.697304] __call_rcu_common.constprop.0+0x6a/0xb90 [ 110.697963] remove_vma+0x139/0x170 [ 110.698419] do_vmi_align_munmap+0xd4a/0x11f0 [ 110.698976] do_vmi_munmap+0x1f1/0x2b0 [ 110.699479] mmap_region+0x1f9/0x2660 [ 110.699963] do_mmap+0x854/0xf00 [ 110.700410] vm_mmap_pgoff+0x1a6/0x3a0 [ 110.700897] ksys_mmap_pgoff+0x3af/0x500 [ 110.701427] do_syscall_64+0x3f/0x90 [ 110.701922] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 110.702575] [ 110.702788] The buggy address belongs to the object at ffff888008e9c828 [ 110.702788] which belongs to the cache vm_area_struct of size 168 [ 110.704272] The buggy address is located 88 bytes inside of [ 110.704272] freed 168-byte region [ffff888008e9c828, ffff888008e9c8d0) [ 110.705713] [ 110.705926] The buggy address belongs to the physical page: [ 110.706629] page:0000000088842e0e refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x8e9c [ 110.707729] memcg:ffff888016cc7301 [ 110.708172] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 110.708892] page_type: 0xffffffff() [ 110.709350] raw: 0100000000000200 ffff88800879fc80 0000000000000000 dead000000000001 [ 110.710301] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff888016cc7301 [ 110.711252] page dumped because: kasan: bad access detected [ 110.711948] [ 110.712176] Memory state around the buggy address: [ 110.712769] ffff888008e9c780: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc [ 110.713647] ffff888008e9c800: fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb [ 110.714534] >ffff888008e9c880: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc [ 110.715393] ^ [ 110.715813] ffff888008e9c900: fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 110.716693] ffff888008e9c980: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 [ 110.717577] ================================================================== [ 110.718507] Disabling lock debugging due to kernel taint [ 113.638067] BUG: Bad rss-counter state mm:0000000040e57d81 type:MM_FILEPAGES val:33 [ 113.639490] BUG: Bad rss-counter state mm:0000000040e57d81 type:MM_ANONPAGES val:22 [ 114.150497] BUG: Bad rss-counter state mm:000000009ba7efdb type:MM_FILEPAGES val:33 [ 114.151478] BUG: Bad rss-counter state mm:000000009ba7efdb type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:48710' (ECDSA) to the list of known hosts. 2023/06/20 03:48:47 fuzzer started 2023/06/20 03:48:47 dialing manager at localhost:44161 2023/06/20 03:48:47 checking machine... 2023/06/20 03:48:47 checking revisions... [ 114.854484] kmemleak: Automatic memory scanning thread ended 2023/06/20 03:48:47 testing simple program... [ 114.900394] cgroup: Unknown subsys name 'net' [ 114.939415] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 03:47:58 Registers: info registers vcpu 0 RAX=dffffc0000000000 RBX=0000000000000001 RCX=ffffffff860d6801 RDX=1ffff11002b2cf26 RSI=ffffffff8180c522 RDI=ffff8880159678d8 RBP=ffff888015967930 RSP=ffff888015967868 R8 =ffffffff860d68fa R9 =ffff888015967918 R10=0000000000038001 R11=0000000000010b7e R12=ffff8880159679a0 R13=0000000000000000 R14=ffff888015ba9b40 R15=ffff8880159678d8 RIP=ffffffff8113062c 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 00007f09219ad900 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=00007f0921f650b0 CR3=000000000e600000 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=000000000000000000000000000000ff XMM02=000000000000000000000000000000ff XMM03=5320444f4854454d5f54505952434e45 XMM04=40404040404040404040404040404040 XMM05=5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a XMM06=20202020202020202020202020202020 XMM07=00000000000000000000000000000000 XMM08=ffbc64ffffbc44ffffbc34ffffbc9f00 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=0000000000000000 RBX=0000000000000002 RCX=1ffff1100d9e135e RDX=dffffc0000000000 RSI=ffffffff8180995d RDI=ffff88806cf09a98 RBP=ffff88806cf09af0 RSP=ffff88806cf09a28 R8 =0000000000000001 R9 =ffff88806cf09ad8 R10=0000000000038001 R11=0000000000020dae R12=ffff88806cf09af8 R13=ffff88806cf09ae0 R14=ffff88806cf09ad9 R15=ffff88806cf09a98 RIP=ffffffff81130706 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=00007ff3195f1ad0 CR3=000000000ca30000 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=064ab1c9e9d416916b40eb6351be820c XMM02=00000000001243e8ec2efd57dc4c00df XMM03=0000000000128ab8a3b445d98d3f1334 XMM04=0e87929491e4974800000000000ae988 XMM05=778b781ad725cb8d000000000013ad80 XMM06=806171799158d9670000000000139e20 XMM07=e042d86d42eb936e0000000000128d38 XMM08=a3b445d98d3f13340000000000124448 XMM09=00000000000000000000000000000000 XMM10=20200000000020202020202020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000