syzkaller login: [ 25.171311] BUG: Bad rss-counter state mm:000000003f2e565d type:MM_FILEPAGES val:32 [ 25.172748] BUG: Bad rss-counter state mm:000000003f2e565d type:MM_ANONPAGES val:22 [ 25.330092] ================================================================== [ 25.330996] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 25.331936] Read of size 8 at addr ffff88800c6424e0 by task sshd/219 [ 25.332704] [ 25.332924] CPU: 0 PID: 219 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 25.333892] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 25.334879] Call Trace: [ 25.335200] [ 25.335570] dump_stack_lvl+0x91/0xf0 [ 25.336062] print_report+0xcc/0x620 [ 25.336555] ? __virt_addr_valid+0x102/0x340 [ 25.337113] ? vma_interval_tree_remove+0xc75/0xec0 [ 25.337779] ? vma_interval_tree_remove+0xc75/0xec0 [ 25.338391] kasan_report+0xbe/0xf0 [ 25.338878] ? vma_interval_tree_remove+0xc75/0xec0 [ 25.339512] vma_interval_tree_remove+0xc75/0xec0 [ 25.340115] vma_prepare+0xc54/0x11a0 [ 25.340597] __split_vma+0x5af/0x950 [ 25.341079] ? __pfx___split_vma+0x10/0x10 [ 25.341624] ? find_held_lock+0x2c/0x110 [ 25.342145] do_vmi_align_munmap+0x2ba/0x11f0 [ 25.342716] ? lock_is_held_type+0x9f/0x120 [ 25.343255] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 25.343876] ? mtree_range_walk+0x632/0x900 [ 25.344432] ? mas_walk+0x5c7/0x7c0 [ 25.344916] do_vmi_munmap+0x1f1/0x2b0 [ 25.345423] mmap_region+0x1f9/0x2660 [ 25.345911] ? vm_mmap_pgoff+0x15c/0x3a0 [ 25.346429] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 25.347153] ? __pfx_lock_acquire+0x10/0x10 [ 25.347695] ? __pfx_mmap_region+0x10/0x10 [ 25.348231] ? security_mmap_addr+0x7d/0xa0 [ 25.348768] ? get_unmapped_area+0x1f5/0x3f0 [ 25.349323] do_mmap+0x854/0xf00 [ 25.349760] vm_mmap_pgoff+0x1a6/0x3a0 [ 25.350257] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 25.350818] ksys_mmap_pgoff+0x3af/0x500 [ 25.351321] do_syscall_64+0x3f/0x90 [ 25.351795] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 25.352452] RIP: 0033:0x7f8897280d82 [ 25.352911] 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 [ 25.355062] RSP: 002b:00007ffda74fb2a8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 25.355961] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f8897280d82 [ 25.356800] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f88966ba000 [ 25.357651] RBP: 00007f88966ba000 R08: 0000000000000009 R09: 0000000000001000 [ 25.358507] R10: 0000000000000812 R11: 0000000000000206 R12: 0000563cfd4f6ec0 [ 25.359349] R13: 00007ffda74fb2c0 R14: 00007ffda74fb2f0 R15: 00007ffda74fb650 [ 25.360208] [ 25.360501] [ 25.360723] Allocated by task 212: [ 25.361153] kasan_save_stack+0x22/0x50 [ 25.361672] kasan_set_track+0x25/0x30 [ 25.362211] __kasan_slab_alloc+0x59/0x70 [ 25.362752] kmem_cache_alloc+0x16b/0x370 [ 25.363307] vm_area_dup+0x20/0x160 [ 25.363788] __split_vma+0x170/0x950 [ 25.364288] split_vma+0xc6/0x110 [ 25.364762] mprotect_fixup+0x8d2/0xb30 [ 25.365308] do_mprotect_pkey+0x87e/0xd40 [ 25.365851] __x64_sys_mprotect+0x78/0xc0 [ 25.366399] do_syscall_64+0x3f/0x90 [ 25.366894] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 25.367564] [ 25.367796] Freed by task 212: [ 25.368204] kasan_save_stack+0x22/0x50 [ 25.368728] kasan_set_track+0x25/0x30 [ 25.369238] kasan_save_free_info+0x2b/0x50 [ 25.369792] __kasan_slab_free+0x10a/0x190 [ 25.370339] kmem_cache_free+0x10d/0x4d0 [ 25.370842] rcu_core+0x8c8/0x2860 [ 25.371302] __do_softirq+0x1b7/0x7d4 [ 25.371801] [ 25.372026] Last potentially related work creation: [ 25.372633] kasan_save_stack+0x22/0x50 [ 25.373138] __kasan_record_aux_stack+0x8e/0xa0 [ 25.373732] __call_rcu_common.constprop.0+0x6a/0xb90 [ 25.374369] remove_vma+0x139/0x170 [ 25.374825] do_vmi_align_munmap+0xd4a/0x11f0 [ 25.375387] do_vmi_munmap+0x1f1/0x2b0 [ 25.375882] __vm_munmap+0x138/0x3a0 [ 25.376351] __x64_sys_munmap+0x59/0x80 [ 25.376850] do_syscall_64+0x3f/0x90 [ 25.377341] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 25.378020] [ 25.378237] The buggy address belongs to the object at ffff88800c642488 [ 25.378237] which belongs to the cache vm_area_struct of size 168 [ 25.379730] The buggy address is located 88 bytes inside of [ 25.379730] freed 168-byte region [ffff88800c642488, ffff88800c642530) [ 25.381149] [ 25.381392] The buggy address belongs to the physical page: [ 25.382053] page:00000000f0dc4562 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xc642 [ 25.383139] memcg:ffff88800ce89001 [ 25.383566] flags: 0x100000000000200(slab|node=0|zone=1) [ 25.384209] page_type: 0xffffffff() [ 25.384660] raw: 0100000000000200 ffff88800879fc80 ffffea000036c900 dead000000000004 [ 25.385599] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800ce89001 [ 25.386516] page dumped because: kasan: bad access detected [ 25.387178] [ 25.387389] Memory state around the buggy address: [ 25.387972] ffff88800c642380: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 [ 25.388825] ffff88800c642400: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 25.389700] >ffff88800c642480: fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.390559] ^ [ 25.391314] ffff88800c642500: fb fb fb fb fb fb fc fc fc fc fc fc fc fc 00 00 [ 25.392171] ffff88800c642580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 25.393028] ================================================================== [ 25.394011] Disabling lock debugging due to kernel taint [ 27.505357] BUG: Bad rss-counter state mm:00000000c4e7bda7 type:MM_FILEPAGES val:33 [ 27.506506] BUG: Bad rss-counter state mm:00000000c4e7bda7 type:MM_ANONPAGES val:22 [ 27.877343] BUG: Bad rss-counter state mm:00000000fd0abbfb type:MM_FILEPAGES val:33 [ 27.878370] BUG: Bad rss-counter state mm:00000000fd0abbfb type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:33942' (ECDSA) to the list of known hosts. 2023/06/19 14:05:08 fuzzer started 2023/06/19 14:05:08 dialing manager at localhost:44161 2023/06/19 14:05:08 checking machine... 2023/06/19 14:05:08 checking revisions... [ 28.634373] kmemleak: Automatic memory scanning thread ended 2023/06/19 14:05:08 testing simple program... [ 28.687037] cgroup: Unknown subsys name 'net' [ 28.751539] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 14:05:06 Registers: info registers vcpu 0 RAX=dffffc0000000000 RBX=0000000000000001 RCX=ffffffff8617d8a6 RDX=1ffff1100d9c135c RSI=0000000000000001 RDI=0000000000000001 RBP=ffff88806ce09af0 RSP=ffff88806ce09a28 R8 =ffffffff8617d8aa R9 =ffff88806ce09ad8 R10=0000000000038001 R11=000000000002c8cf R12=ffff88806ce09af8 R13=ffff88806ce09ae0 R14=0000000000000005 R15=ffff88806ce09a98 RIP=ffffffff81130b54 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 00007fbb733c4700 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=00007f4ada875618 CR3=000000000e9b6000 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=2037303a35303a3431203931206e754a XMM01=73732878696e755f6d6170203a5d3832 XMM02=65736f6c63206e6f6973736573203a29 XMM03=755f6d6170203a5d3832325b64687373 XMM04=69662068637573206f4e203a656c6163 XMM05=3a656c696620766e65206e65706f206f XMM06=65733a6468737328766e655f6d617020 XMM07=6b7a79732037303a35303a3431203931 XMM08=3d656e696c646d632022656369767265 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=0000000000000000 RBX=ffffffff85618098 RCX=ffffffff812e00e5 RDX=0000000000000001 RSI=0000000000000004 RDI=ffff88806cf09da8 RBP=1ffff1100d9e13b1 RSP=ffff88806cf09d80 R8 =0000000000000001 R9 =ffffed100d9e13b5 R10=0000000000000003 R11=1ffff1100d9e7479 R12=ffffffff856180a0 R13=ffffffff856180a8 R14=0000000000000200 R15=0000000000000000 RIP=ffffffff812e00f6 RFL=00000046 [---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 00007f4ada2be900 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=00007ffd5570a000 CR3=000000000fdee000 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