syzkaller login: [ 106.301031] BUG: Bad rss-counter state mm:00000000758131f2 type:MM_FILEPAGES val:33 [ 106.301840] BUG: Bad rss-counter state mm:00000000758131f2 type:MM_ANONPAGES val:22 [ 106.428295] ================================================================== [ 106.428902] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 106.429555] Read of size 8 at addr ffff888013406968 by task sshd/220 [ 106.430070] [ 106.430219] CPU: 0 PID: 220 Comm: sshd Tainted: G L 6.4.0-rc7-next-20230619 #1 [ 106.430932] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 106.431580] Call Trace: [ 106.431795] [ 106.431983] dump_stack_lvl+0x91/0xf0 [ 106.432307] print_report+0xcc/0x620 [ 106.432745] ? __virt_addr_valid+0x102/0x340 [ 106.433110] ? vma_interval_tree_remove+0xc75/0xec0 [ 106.433560] ? vma_interval_tree_remove+0xc75/0xec0 [ 106.433972] kasan_report+0xbe/0xf0 [ 106.434279] ? vma_interval_tree_remove+0xc75/0xec0 [ 106.434692] vma_interval_tree_remove+0xc75/0xec0 [ 106.435102] vma_prepare+0xc54/0x11a0 [ 106.435418] __split_vma+0x5af/0x950 [ 106.435729] ? __pfx___split_vma+0x10/0x10 [ 106.436076] ? find_held_lock+0x2c/0x110 [ 106.436420] do_vmi_align_munmap+0x2ba/0x11f0 [ 106.436819] ? lock_is_held_type+0x9f/0x120 [ 106.437174] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 106.437637] ? mtree_range_walk+0x632/0x900 [ 106.438030] ? mas_walk+0x5c7/0x7c0 [ 106.438355] do_vmi_munmap+0x1f1/0x2b0 [ 106.438690] mmap_region+0x1f9/0x2660 [ 106.439019] ? vm_mmap_pgoff+0x15c/0x3a0 [ 106.439366] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 106.439848] ? __pfx_lock_acquire+0x10/0x10 [ 106.440205] ? __pfx_mmap_region+0x10/0x10 [ 106.440562] ? security_mmap_addr+0x7d/0xa0 [ 106.440920] ? get_unmapped_area+0x1f5/0x3f0 [ 106.441314] do_mmap+0x854/0xf00 [ 106.441610] vm_mmap_pgoff+0x1a6/0x3a0 [ 106.441942] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 106.442324] ksys_mmap_pgoff+0x3af/0x500 [ 106.442673] do_syscall_64+0x3f/0x90 [ 106.442998] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 106.443433] RIP: 0033:0x7f0aa74e4d82 [ 106.443771] 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 [ 106.445174] RSP: 002b:00007ffceea80e78 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 106.445783] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f0aa74e4d82 [ 106.446349] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f0aa691e000 [ 106.446918] RBP: 00007f0aa691e000 R08: 0000000000000009 R09: 0000000000001000 [ 106.447481] R10: 0000000000000812 R11: 0000000000000206 R12: 000055ac4b768b20 [ 106.448083] R13: 00007ffceea80e90 R14: 00007ffceea80ec0 R15: 00007ffceea81220 [ 106.448662] [ 106.448860] [ 106.449008] Allocated by task 213: [ 106.449334] kasan_save_stack+0x22/0x50 [ 106.449675] kasan_set_track+0x25/0x30 [ 106.450003] __kasan_slab_alloc+0x59/0x70 [ 106.450346] kmem_cache_alloc+0x16b/0x370 [ 106.450716] vm_area_dup+0x20/0x160 [ 106.451024] __split_vma+0x170/0x950 [ 106.451339] split_vma+0xc6/0x110 [ 106.451660] mprotect_fixup+0x8d2/0xb30 [ 106.452018] do_mprotect_pkey+0x87e/0xd40 [ 106.452364] __x64_sys_mprotect+0x78/0xc0 [ 106.452710] do_syscall_64+0x3f/0x90 [ 106.453028] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 106.453471] [ 106.453616] Freed by task 13: [ 106.453874] kasan_save_stack+0x22/0x50 [ 106.454209] kasan_set_track+0x25/0x30 [ 106.454538] kasan_save_free_info+0x2b/0x50 [ 106.454894] __kasan_slab_free+0x10a/0x190 [ 106.455247] kmem_cache_free+0x10d/0x4d0 [ 106.455584] rcu_core+0x8c8/0x2860 [ 106.455918] __do_softirq+0x1b7/0x7d4 [ 106.456241] [ 106.456390] Last potentially related work creation: [ 106.456786] kasan_save_stack+0x22/0x50 [ 106.457130] __kasan_record_aux_stack+0x8e/0xa0 [ 106.457528] __call_rcu_common.constprop.0+0x6a/0xb90 [ 106.457962] remove_vma+0x139/0x170 [ 106.458263] do_vmi_align_munmap+0xd4a/0x11f0 [ 106.458661] do_vmi_munmap+0x1f1/0x2b0 [ 106.459016] __vm_munmap+0x138/0x3a0 [ 106.459334] __x64_sys_munmap+0x59/0x80 [ 106.459670] do_syscall_64+0x3f/0x90 [ 106.459991] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 106.460423] [ 106.460571] The buggy address belongs to the object at ffff888013406910 [ 106.460571] which belongs to the cache vm_area_struct of size 168 [ 106.461583] The buggy address is located 88 bytes inside of [ 106.461583] freed 168-byte region [ffff888013406910, ffff8880134069b8) [ 106.462513] [ 106.462694] The buggy address belongs to the physical page: [ 106.463153] page:000000005b075f8c refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13406 [ 106.463894] memcg:ffff88801a1ac701 [ 106.464181] flags: 0x100000000000200(slab|node=0|zone=1) [ 106.464618] page_type: 0xffffffff() [ 106.464926] raw: 0100000000000200 ffff88800879fc80 dead000000000122 0000000000000000 [ 106.465577] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88801a1ac701 [ 106.466203] page dumped because: kasan: bad access detected [ 106.466659] [ 106.466831] Memory state around the buggy address: [ 106.467219] ffff888013406800: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 [ 106.467786] ffff888013406880: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc [ 106.468363] >ffff888013406900: fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb [ 106.468955] ^ [ 106.469492] ffff888013406980: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fa [ 106.470126] ffff888013406a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 106.470697] ================================================================== [ 106.471531] Disabling lock debugging due to kernel taint [ 108.038962] BUG: Bad rss-counter state mm:000000001d237d53 type:MM_FILEPAGES val:33 [ 108.039726] BUG: Bad rss-counter state mm:000000001d237d53 type:MM_ANONPAGES val:22 [ 108.396929] BUG: Bad rss-counter state mm:0000000053407083 type:MM_FILEPAGES val:33 [ 108.397671] BUG: Bad rss-counter state mm:0000000053407083 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:37127' (ECDSA) to the list of known hosts. 2023/06/20 09:17:12 fuzzer started 2023/06/20 09:17:12 dialing manager at localhost:44161 2023/06/20 09:17:12 checking machine... 2023/06/20 09:17:12 checking revisions... [ 109.024920] kmemleak: Automatic memory scanning thread ended 2023/06/20 09:17:12 testing simple program... [ 109.058448] cgroup: Unknown subsys name 'net' [ 109.110984] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 09:15:55 Registers: info registers vcpu 0 RAX=ffffffff860d68fb RBX=0000000000000001 RCX=ffffffff860d68f6 RDX=0000000000000000 RSI=1ffffffff0c1ad1f RDI=ffffffff85dbc1cc RBP=ffff88800f1d7980 RSP=ffff88800f1d78b8 R8 =ffffffff860d68c0 R9 =ffff88800f1d7968 R10=0000000000038001 R11=0000000000010b7e R12=ffff88800f1d7988 R13=ffff88800f1d7970 R14=ffff88800f1d7969 R15=ffff88800f1d7928 RIP=ffffffff81130a5b 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 00007f140d0af900 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=00007f140d666618 CR3=000000000ef20000 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=6e69676f6c5f6d61702c78756e696c65 XMM02=755f6d61702c74696d7265705f6d6170 XMM03=2c766e655f6d61702c7374696d696c5f XMM04=6d61702c766e655f6d61702c7374696d XMM05=78696e755f6d61702c74696d7265705f XMM06=6469756e69676f6c5f6d61702c78756e XMM07=672065736f6c635f6e6f69737365733a XMM08=61662029286e65706f5f746964756100 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=1ffffffff0c09c4f RBX=ffffffff8604e278 RCX=ffffffff8450d49f RDX=0000000000000000 RSI=ffffffff864b19b0 RDI=ffffffff8604e26c RBP=ffffffff8604e278 RSP=ffff88806cf099b8 R8 =ffffffff864b19b0 R9 =ffff88806cf09ab0 R10=0000000000038001 R11=00000000000b53a6 R12=ffffffff8604e27c R13=ffffffff8604e26c R14=ffffffff8604e274 R15=dffffc0000000000 RIP=ffffffff8112fc7f 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=00007febc3c68cd0 CR3=000000000cb10000 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=37313a3930203032206e754a3e36383c XMM01=7365733a646873732878696e755f6d61 XMM02=736f6c63206e6f6973736573203a296e XMM03=5f6d6170203a5d3932325b6468737320 XMM04=6456774875434142334f726f59427469 XMM05=485320415352203a3268737320303438 XMM06=206d6f726620746f6f7220726f662079 XMM07=00000000000000000000000000000000 XMM08=3a677562656420676f6c737973720000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000