syzkaller login: [ 39.780484] BUG: Bad rss-counter state mm:0000000072de204b type:MM_FILEPAGES val:33 [ 39.781479] BUG: Bad rss-counter state mm:0000000072de204b type:MM_ANONPAGES val:22 [ 39.957457] ================================================================== [ 39.958703] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 39.959949] Read of size 8 at addr ffff88800df70798 by task sshd/219 [ 39.960735] [ 39.960956] CPU: 1 PID: 219 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 39.961836] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 39.962840] Call Trace: [ 39.963164] [ 39.963451] dump_stack_lvl+0x91/0xf0 [ 39.963944] print_report+0xcc/0x620 [ 39.964435] ? __virt_addr_valid+0x102/0x340 [ 39.964999] ? vma_interval_tree_remove+0xc75/0xec0 [ 39.965617] ? vma_interval_tree_remove+0xc75/0xec0 [ 39.966240] kasan_report+0xbe/0xf0 [ 39.966751] ? vma_interval_tree_remove+0xc75/0xec0 [ 39.967388] vma_interval_tree_remove+0xc75/0xec0 [ 39.967998] vma_prepare+0xc54/0x11a0 [ 39.968486] __split_vma+0x5af/0x950 [ 39.968973] ? __pfx___split_vma+0x10/0x10 [ 39.969524] ? find_held_lock+0x2c/0x110 [ 39.970077] do_vmi_align_munmap+0x2ba/0x11f0 [ 39.970689] ? lock_is_held_type+0x9f/0x120 [ 39.971252] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 39.971880] ? mtree_range_walk+0x632/0x900 [ 39.972453] ? mas_walk+0x5c7/0x7c0 [ 39.972936] do_vmi_munmap+0x1f1/0x2b0 [ 39.973449] mmap_region+0x1f9/0x2660 [ 39.973944] ? vm_mmap_pgoff+0x15c/0x3a0 [ 39.974468] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 39.975210] ? __pfx_lock_acquire+0x10/0x10 [ 39.975782] ? __pfx_mmap_region+0x10/0x10 [ 39.976330] ? security_mmap_addr+0x7d/0xa0 [ 39.976887] ? get_unmapped_area+0x1f5/0x3f0 [ 39.977452] do_mmap+0x854/0xf00 [ 39.977891] vm_mmap_pgoff+0x1a6/0x3a0 [ 39.978398] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 39.978981] ksys_mmap_pgoff+0x3af/0x500 [ 39.979508] do_syscall_64+0x3f/0x90 [ 39.979986] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 39.980646] RIP: 0033:0x7fe463192d82 [ 39.981106] 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 [ 39.983333] RSP: 002b:00007ffdffdb95d8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 39.984262] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fe463192d82 [ 39.985136] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fe4625cc000 [ 39.986022] RBP: 00007fe4625cc000 R08: 0000000000000009 R09: 0000000000001000 [ 39.986922] R10: 0000000000000812 R11: 0000000000000206 R12: 000055fcfbfd6f60 [ 39.987791] R13: 00007ffdffdb95f0 R14: 00007ffdffdb9620 R15: 00007ffdffdb9980 [ 39.988656] [ 39.988956] [ 39.989173] Allocated by task 212: [ 39.989608] kasan_save_stack+0x22/0x50 [ 39.990124] kasan_set_track+0x25/0x30 [ 39.990639] __kasan_slab_alloc+0x59/0x70 [ 39.991175] kmem_cache_alloc+0x16b/0x370 [ 39.991704] vm_area_dup+0x20/0x160 [ 39.992186] __split_vma+0x170/0x950 [ 39.992664] split_vma+0xc6/0x110 [ 39.993107] mprotect_fixup+0x8d2/0xb30 [ 39.993616] do_mprotect_pkey+0x87e/0xd40 [ 39.994135] __x64_sys_mprotect+0x78/0xc0 [ 39.994666] do_syscall_64+0x3f/0x90 [ 39.995138] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 39.995772] [ 39.995987] Freed by task 212: [ 39.996394] kasan_save_stack+0x22/0x50 [ 39.996917] kasan_set_track+0x25/0x30 [ 39.997413] kasan_save_free_info+0x2b/0x50 [ 39.997942] __kasan_slab_free+0x10a/0x190 [ 39.998474] kmem_cache_free+0x10d/0x4d0 [ 39.998989] rcu_core+0x8c8/0x2860 [ 39.999448] __do_softirq+0x1b7/0x7d4 [ 39.999924] [ 40.000141] Last potentially related work creation: [ 40.000791] kasan_save_stack+0x22/0x50 [ 40.001311] __kasan_record_aux_stack+0x8e/0xa0 [ 40.001912] __call_rcu_common.constprop.0+0x6a/0xb90 [ 40.002572] remove_vma+0x139/0x170 [ 40.003053] do_vmi_align_munmap+0xd4a/0x11f0 [ 40.003627] do_vmi_munmap+0x1f1/0x2b0 [ 40.004129] __vm_munmap+0x138/0x3a0 [ 40.004605] __x64_sys_munmap+0x59/0x80 [ 40.005110] do_syscall_64+0x3f/0x90 [ 40.005586] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 40.006318] [ 40.006558] Second to last potentially related work creation: [ 40.007332] kasan_save_stack+0x22/0x50 [ 40.007911] __kasan_record_aux_stack+0x8e/0xa0 [ 40.008569] __call_rcu_common.constprop.0+0x6a/0xb90 [ 40.009305] remove_vma+0x139/0x170 [ 40.009825] do_vmi_align_munmap+0xd4a/0x11f0 [ 40.010466] do_vmi_munmap+0x1f1/0x2b0 [ 40.011042] mmap_region+0x1f9/0x2660 [ 40.011591] do_mmap+0x854/0xf00 [ 40.012087] vm_mmap_pgoff+0x1a6/0x3a0 [ 40.012648] ksys_mmap_pgoff+0x3af/0x500 [ 40.013238] do_syscall_64+0x3f/0x90 [ 40.013793] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 40.014541] [ 40.014806] The buggy address belongs to the object at ffff88800df70740 [ 40.014806] which belongs to the cache vm_area_struct of size 168 [ 40.016468] The buggy address is located 88 bytes inside of [ 40.016468] freed 168-byte region [ffff88800df70740, ffff88800df707e8) [ 40.018049] [ 40.018292] The buggy address belongs to the physical page: [ 40.019047] page:0000000009607a4c refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xdf70 [ 40.020271] memcg:ffff88800d965001 [ 40.020755] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 40.021558] page_type: 0xffffffff() [ 40.022067] raw: 0100000000000200 ffff88800879fc80 ffffea000038a600 dead000000000003 [ 40.023105] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800d965001 [ 40.024113] page dumped because: kasan: bad access detected [ 40.024845] [ 40.025095] Memory state around the buggy address: [ 40.025756] ffff88800df70680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 40.026743] ffff88800df70700: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 40.027714] >ffff88800df70780: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc [ 40.028643] ^ [ 40.029184] ffff88800df70800: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 [ 40.030129] ffff88800df70880: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc [ 40.031113] ================================================================== [ 40.032195] Disabling lock debugging due to kernel taint [ 42.044129] BUG: Bad rss-counter state mm:0000000050a77c80 type:MM_FILEPAGES val:33 [ 42.045353] BUG: Bad rss-counter state mm:0000000050a77c80 type:MM_ANONPAGES val:22 [ 42.566625] BUG: Bad rss-counter state mm:00000000192982c5 type:MM_FILEPAGES val:33 [ 42.567692] BUG: Bad rss-counter state mm:00000000192982c5 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:3682' (ECDSA) to the list of known hosts. 2023/06/20 08:12:44 fuzzer started 2023/06/20 08:12:44 dialing manager at localhost:44161 2023/06/20 08:12:44 checking machine... 2023/06/20 08:12:44 checking revisions... [ 43.370875] kmemleak: Automatic memory scanning thread ended 2023/06/20 08:12:44 testing simple program... [ 43.420753] cgroup: Unknown subsys name 'net' [ 43.510820] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 08:12:42 Registers: info registers vcpu 0 RAX=fffffffffffffe10 RBX=00005644a5a0c0c0 RCX=0000000000000000 RDX=0000000000000000 RSI=0000000000000023 RDI=00005644a5a0c0c0 RBP=0000000000000045 RSP=00007ffc376dd588 R8 =00005644a5a10315 R9 =00007f0dc5337be0 R10=0000000000000100 R11=0000000000000246 R12=00005644a5a01d00 R13=00007ffc376dd598 R14=00007f0dc4d60b22 R15=00007f0dc4d85710 RIP=00007f0dc51adab7 RFL=00000206 [-----P-] CPL=3 II=0 A20=1 SMM=0 HLT=0 ES =0000 0000000000000000 00000000 00000000 CS =0033 0000000000000000 ffffffff 00a0fb00 DPL=3 CS64 [-RA] SS =002b 0000000000000000 ffffffff 00c0f300 DPL=3 DS [-WA] DS =0000 0000000000000000 00000000 00000000 FS =0000 00007f0dc4d85900 00000000 00000000 GS =0000 0000000000000000 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=00007ffc376d7000 CR3=000000000d974000 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=23232323232323232323232323232323 XMM01=000000000000000000000000000000ff XMM02=00000000000000000000000000000000 XMM03=6d6f73202c6465696669636570736e75 XMM04=3d6c616e696d72657420322e322e302e XMM05=3d656d616e74736f682022646873732f XMM06=746f6f72223d746363612078756e696c XMM07=6e655f6d61702c7374696d696c5f6d61 XMM08=6465696669636570736e752066492023 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=ffff88806cf35000 RBX=0000000000000001 RCX=ffffffff8450c50e RDX=ffffed100d9e6a01 RSI=0000000000000004 RDI=ffffffff812889a5 RBP=dffffc0000000000 RSP=ffff888008e27e70 R8 =0000000000000000 R9 =ffffed100d9e6a00 R10=ffff88806cf35003 R11=0000000000000001 R12=ffffffff85d3bed0 R13=1ffff110011c4fd3 R14=0000000000000000 R15=0000000000000000 RIP=ffffffff8450d49f RFL=00000246 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=1 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=00007f719ae4f490 CR3=000000000f25c000 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=9647ac5764b8428d04425dc880527521 XMM02=000000000011da28eff9b2d0a8fce9cb XMM03=000000000011daf82c67c8bc2e329bc3 XMM04=36367d06358953b400000000000ae988 XMM05=dfcdbad4f1609c370000000000135070 XMM06=ec2bdaa2bce6a1500000000000134248 XMM07=e042d86d42eb936e0000000000124730 XMM08=20ba8b527eef88fe000000000011daf8 XMM09=00000000000000000000000000000000 XMM10=20200000000020202020202020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000