syzkaller login: [ 41.902941] BUG: Bad rss-counter state mm:00000000964826e8 type:MM_FILEPAGES val:33 [ 41.904169] BUG: Bad rss-counter state mm:00000000964826e8 type:MM_ANONPAGES val:22 [ 42.040214] ================================================================== [ 42.041239] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 42.042292] Read of size 8 at addr ffff8880097dc880 by task sshd/220 [ 42.043119] [ 42.043513] CPU: 1 PID: 220 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 42.044446] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 42.045527] Call Trace: [ 42.045873] [ 42.046223] dump_stack_lvl+0x91/0xf0 [ 42.046762] print_report+0xcc/0x620 [ 42.047292] ? __virt_addr_valid+0x102/0x340 [ 42.047902] ? vma_interval_tree_remove+0xc75/0xec0 [ 42.048590] ? vma_interval_tree_remove+0xc75/0xec0 [ 42.049273] kasan_report+0xbe/0xf0 [ 42.049812] ? vma_interval_tree_remove+0xc75/0xec0 [ 42.050511] vma_interval_tree_remove+0xc75/0xec0 [ 42.051177] vma_prepare+0xc54/0x11a0 [ 42.051704] __split_vma+0x5af/0x950 [ 42.052219] ? __pfx___split_vma+0x10/0x10 [ 42.052794] ? find_held_lock+0x2c/0x110 [ 42.053361] do_vmi_align_munmap+0x2ba/0x11f0 [ 42.053970] ? lock_is_held_type+0x9f/0x120 [ 42.054580] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 42.055241] ? mtree_range_walk+0x632/0x900 [ 42.055836] ? mas_walk+0x5c7/0x7c0 [ 42.056359] do_vmi_munmap+0x1f1/0x2b0 [ 42.056899] mmap_region+0x1f9/0x2660 [ 42.057431] ? vm_mmap_pgoff+0x15c/0x3a0 [ 42.058002] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 42.058780] ? __pfx_lock_acquire+0x10/0x10 [ 42.059360] ? __pfx_mmap_region+0x10/0x10 [ 42.059934] ? security_mmap_addr+0x7d/0xa0 [ 42.060507] ? get_unmapped_area+0x1f5/0x3f0 [ 42.061182] do_mmap+0x854/0xf00 [ 42.061726] vm_mmap_pgoff+0x1a6/0x3a0 [ 42.062366] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 42.063071] ksys_mmap_pgoff+0x3af/0x500 [ 42.063729] do_syscall_64+0x3f/0x90 [ 42.064318] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 42.065128] RIP: 0033:0x7f8930b78d82 [ 42.065717] 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 [ 42.068353] RSP: 002b:00007ffd2ed735f8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 42.069475] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f8930b78d82 [ 42.070561] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f892ffb2000 [ 42.071628] RBP: 00007f892ffb2000 R08: 0000000000000009 R09: 0000000000001000 [ 42.072676] R10: 0000000000000812 R11: 0000000000000206 R12: 000055ce12f1bec0 [ 42.073751] R13: 00007ffd2ed73610 R14: 00007ffd2ed73640 R15: 00007ffd2ed739a0 [ 42.074841] [ 42.075198] [ 42.075457] Allocated by task 213: [ 42.075985] kasan_save_stack+0x22/0x50 [ 42.076610] kasan_set_track+0x25/0x30 [ 42.077224] __kasan_slab_alloc+0x59/0x70 [ 42.077873] kmem_cache_alloc+0x16b/0x370 [ 42.078531] vm_area_dup+0x20/0x160 [ 42.079094] __split_vma+0x170/0x950 [ 42.079683] split_vma+0xc6/0x110 [ 42.080228] mprotect_fixup+0x8d2/0xb30 [ 42.080850] do_mprotect_pkey+0x87e/0xd40 [ 42.081488] __x64_sys_mprotect+0x78/0xc0 [ 42.082155] do_syscall_64+0x3f/0x90 [ 42.082731] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 42.083519] [ 42.083781] Freed by task 213: [ 42.084255] kasan_save_stack+0x22/0x50 [ 42.084876] kasan_set_track+0x25/0x30 [ 42.085575] kasan_save_free_info+0x2b/0x50 [ 42.086241] __kasan_slab_free+0x10a/0x190 [ 42.086891] kmem_cache_free+0x10d/0x4d0 [ 42.087516] rcu_core+0x8c8/0x2860 [ 42.088058] __do_softirq+0x1b7/0x7d4 [ 42.088647] [ 42.088908] Last potentially related work creation: [ 42.089630] kasan_save_stack+0x22/0x50 [ 42.090253] __kasan_record_aux_stack+0x8e/0xa0 [ 42.090964] __call_rcu_common.constprop.0+0x6a/0xb90 [ 42.091756] remove_vma+0x139/0x170 [ 42.092310] do_vmi_align_munmap+0xd4a/0x11f0 [ 42.093002] do_vmi_munmap+0x1f1/0x2b0 [ 42.093601] __vm_munmap+0x138/0x3a0 [ 42.094203] __x64_sys_munmap+0x59/0x80 [ 42.094820] do_syscall_64+0x3f/0x90 [ 42.095404] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 42.096184] [ 42.096459] Second to last potentially related work creation: [ 42.097308] kasan_save_stack+0x22/0x50 [ 42.097934] __kasan_record_aux_stack+0x8e/0xa0 [ 42.098650] __call_rcu_common.constprop.0+0x6a/0xb90 [ 42.099441] remove_vma+0x139/0x170 [ 42.099997] do_vmi_align_munmap+0xd4a/0x11f0 [ 42.100699] do_vmi_munmap+0x1f1/0x2b0 [ 42.101302] mmap_region+0x1f9/0x2660 [ 42.101897] do_mmap+0x854/0xf00 [ 42.102360] vm_mmap_pgoff+0x1a6/0x3a0 [ 42.102843] ksys_mmap_pgoff+0x3af/0x500 [ 42.103326] do_syscall_64+0x3f/0x90 [ 42.103782] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 42.104398] [ 42.104607] The buggy address belongs to the object at ffff8880097dc828 [ 42.104607] which belongs to the cache vm_area_struct of size 168 [ 42.106024] The buggy address is located 88 bytes inside of [ 42.106024] freed 168-byte region [ffff8880097dc828, ffff8880097dc8d0) [ 42.107387] [ 42.107599] The buggy address belongs to the physical page: [ 42.108238] page:0000000011ef47b3 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x97dc [ 42.109277] memcg:ffff88800ecc1301 [ 42.109682] flags: 0x100000000000200(slab|node=0|zone=1) [ 42.110301] page_type: 0xffffffff() [ 42.110735] raw: 0100000000000200 ffff88800879fc80 ffffea000067f340 dead000000000002 [ 42.111636] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800ecc1301 [ 42.112507] page dumped because: kasan: bad access detected [ 42.113141] [ 42.113347] Memory state around the buggy address: [ 42.113904] ffff8880097dc780: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc [ 42.114762] ffff8880097dc800: fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb [ 42.115587] >ffff8880097dc880: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc [ 42.116406] ^ [ 42.116800] ffff8880097dc900: fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 42.117624] ffff8880097dc980: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fa [ 42.118449] ================================================================== [ 42.119432] Disabling lock debugging due to kernel taint [ 44.534285] BUG: Bad rss-counter state mm:00000000ff25dccd type:MM_FILEPAGES val:33 [ 44.535447] BUG: Bad rss-counter state mm:00000000ff25dccd type:MM_ANONPAGES val:22 [ 44.948562] BUG: Bad rss-counter state mm:00000000803c0999 type:MM_FILEPAGES val:33 [ 44.949724] BUG: Bad rss-counter state mm:00000000803c0999 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:6394' (ECDSA) to the list of known hosts. 2023/06/19 20:09:13 fuzzer started 2023/06/19 20:09:13 dialing manager at localhost:44161 2023/06/19 20:09:13 checking machine... 2023/06/19 20:09:13 checking revisions... [ 45.696472] kmemleak: Automatic memory scanning thread ended 2023/06/19 20:09:13 testing simple program... [ 45.748792] cgroup: Unknown subsys name 'net' [ 45.791811] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 20:09:02 Registers: info registers vcpu 0 RAX=dffffc0000000000 RBX=ffff88800eac4500 RCX=ffff88806c709ef8 RDX=0000000000000000 RSI=ffff88800eac4500 RDI=ffff888008f76500 RBP=ffff888008f76500 RSP=ffff888019d07918 R8 =0000000081a26ef0 R9 =fffffbfff0ba77da R10=ffffffff85d3bed7 R11=00000000000b6996 R12=ffff888008f76500 R13=ffffea00003ab100 R14=ffffffff8366dfdf R15=ffff88800dae8b80 RIP=ffffffff8181051e RFL=00000282 [--S----] 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 00007f4da67e3700 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=00007fba572e3030 CR3=000000001030e000 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=656e6e6f637369642064657669656365 XMM02=63736964203a31313a38373432352074 XMM03=66207463656e6e6f6373696420646576 XMM04=6456774875434142334f726f59427469 XMM05=485320415352203a3268737320383734 XMM06=206d6f726620746f6f7220726f662079 XMM07=00000000000000000000000000000000 XMM08=3a677562656420676f6c737973720000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=dffffc0000000000 RBX=0000000000000001 RCX=ffffffff86136d7c RDX=0000000000000008 RSI=ffff88800cbcfbf8 RDI=ffff88800cbcf828 RBP=ffff88800cbcf880 RSP=ffff88800cbcf7b0 R8 =0000000000000001 R9 =ffff88800cbcf868 R10=0000000000038001 R11=0000000000020c48 R12=ffff88800cbcf888 R13=ffff88800cbcf870 R14=ffff88800cbcfbf8 R15=ffff88800cbcf828 RIP=ffffffff811303fa RFL=00000283 [--S---C] 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 00007f37a927c900 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=00007ffd76065000 CR3=000000000eb34000 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=ffffffffffffffffffff000000000000 XMM01=000000000000003635006b6f6c6c756e XMM02=62003d73646e756f7200323135616873 XMM03=5320444f4854454d5f54505952434e45 XMM04=40404040404040404040404040404040 XMM05=5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a XMM06=20202020202020202020202020202020 XMM07=00000000000000000000000000000000 XMM08=00000000000000000000000000202020 XMM09=ff0000ffffffffffff00000000ffffff XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000