syzkaller login: [ 34.036556] BUG: Bad rss-counter state mm:00000000db193889 type:MM_FILEPAGES val:33 [ 34.037217] BUG: Bad rss-counter state mm:00000000db193889 type:MM_ANONPAGES val:22 [ 34.161610] ================================================================== [ 34.162246] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 34.162885] Read of size 8 at addr ffff88801a9185c8 by task sshd/220 [ 34.163391] [ 34.163544] CPU: 1 PID: 220 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 34.164110] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 34.164795] Call Trace: [ 34.165018] [ 34.165210] dump_stack_lvl+0x91/0xf0 [ 34.165547] print_report+0xcc/0x620 [ 34.166079] ? __virt_addr_valid+0x102/0x340 [ 34.166498] ? vma_interval_tree_remove+0xc75/0xec0 [ 34.166902] ? vma_interval_tree_remove+0xc75/0xec0 [ 34.167300] kasan_report+0xbe/0xf0 [ 34.167624] ? vma_interval_tree_remove+0xc75/0xec0 [ 34.168039] vma_interval_tree_remove+0xc75/0xec0 [ 34.168509] vma_prepare+0xc54/0x11a0 [ 34.168831] __split_vma+0x5af/0x950 [ 34.169146] ? __pfx___split_vma+0x10/0x10 [ 34.169504] ? find_held_lock+0x2c/0x110 [ 34.169854] do_vmi_align_munmap+0x2ba/0x11f0 [ 34.170232] ? lock_is_held_type+0x9f/0x120 [ 34.170596] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 34.170995] ? mtree_range_walk+0x632/0x900 [ 34.171362] ? mas_walk+0x5c7/0x7c0 [ 34.171679] do_vmi_munmap+0x1f1/0x2b0 [ 34.172003] mmap_region+0x1f9/0x2660 [ 34.172338] ? vm_mmap_pgoff+0x15c/0x3a0 [ 34.172672] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 34.173146] ? __pfx_lock_acquire+0x10/0x10 [ 34.173495] ? __pfx_mmap_region+0x10/0x10 [ 34.173832] ? security_mmap_addr+0x7d/0xa0 [ 34.174172] ? get_unmapped_area+0x1f5/0x3f0 [ 34.174519] do_mmap+0x854/0xf00 [ 34.174813] vm_mmap_pgoff+0x1a6/0x3a0 [ 34.175142] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 34.175509] ksys_mmap_pgoff+0x3af/0x500 [ 34.175840] do_syscall_64+0x3f/0x90 [ 34.176167] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 34.176653] RIP: 0033:0x7fabc89d2d82 [ 34.176947] 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 [ 34.178333] RSP: 002b:00007ffdcdfb9728 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 34.178930] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fabc89d2d82 [ 34.179469] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fabc7e0c000 [ 34.180011] RBP: 00007fabc7e0c000 R08: 0000000000000009 R09: 0000000000001000 [ 34.180600] R10: 0000000000000812 R11: 0000000000000206 R12: 0000558915b4eec0 [ 34.181147] R13: 00007ffdcdfb9740 R14: 00007ffdcdfb9770 R15: 00007ffdcdfb9ad0 [ 34.181700] [ 34.181890] [ 34.182031] Allocated by task 213: [ 34.182305] kasan_save_stack+0x22/0x50 [ 34.182634] kasan_set_track+0x25/0x30 [ 34.182954] __kasan_slab_alloc+0x59/0x70 [ 34.183302] kmem_cache_alloc+0x16b/0x370 [ 34.183648] vm_area_dup+0x20/0x160 [ 34.183949] __split_vma+0x170/0x950 [ 34.184262] split_vma+0xc6/0x110 [ 34.184584] mprotect_fixup+0x8d2/0xb30 [ 34.184910] do_mprotect_pkey+0x87e/0xd40 [ 34.185250] __x64_sys_mprotect+0x78/0xc0 [ 34.185606] do_syscall_64+0x3f/0x90 [ 34.185927] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 34.186338] [ 34.186475] Freed by task 213: [ 34.186740] kasan_save_stack+0x22/0x50 [ 34.187079] kasan_set_track+0x25/0x30 [ 34.187385] kasan_save_free_info+0x2b/0x50 [ 34.187726] __kasan_slab_free+0x10a/0x190 [ 34.188067] kmem_cache_free+0x10d/0x4d0 [ 34.188483] rcu_core+0x8c8/0x2860 [ 34.188802] __do_softirq+0x1b7/0x7d4 [ 34.189140] [ 34.189276] Last potentially related work creation: [ 34.189678] kasan_save_stack+0x22/0x50 [ 34.190023] __kasan_record_aux_stack+0x8e/0xa0 [ 34.190418] __call_rcu_common.constprop.0+0x6a/0xb90 [ 34.190846] remove_vma+0x139/0x170 [ 34.191129] do_vmi_align_munmap+0xd4a/0x11f0 [ 34.191492] do_vmi_munmap+0x1f1/0x2b0 [ 34.191812] __vm_munmap+0x138/0x3a0 [ 34.192177] __x64_sys_munmap+0x59/0x80 [ 34.192561] do_syscall_64+0x3f/0x90 [ 34.192913] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 34.193389] [ 34.193538] The buggy address belongs to the object at ffff88801a918570 [ 34.193538] which belongs to the cache vm_area_struct of size 168 [ 34.194521] The buggy address is located 88 bytes inside of [ 34.194521] freed 168-byte region [ffff88801a918570, ffff88801a918618) [ 34.195480] [ 34.195625] The buggy address belongs to the physical page: [ 34.196069] page:00000000d97e51a7 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1a918 [ 34.196883] memcg:ffff88800ccece01 [ 34.197184] flags: 0x100000000000200(slab|node=0|zone=1) [ 34.197618] page_type: 0xffffffff() [ 34.197926] raw: 0100000000000200 ffff88800879fc80 dead000000000122 0000000000000000 [ 34.198548] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800ccece01 [ 34.199110] page dumped because: kasan: bad access detected [ 34.199517] [ 34.199656] Memory state around the buggy address: [ 34.200013] ffff88801a918480: fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 34.200605] ffff88801a918500: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fa fb [ 34.201206] >ffff88801a918580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.201797] ^ [ 34.202317] ffff88801a918600: fb fb fb fc fc fc fc fc fc fc fc fa fb fb fb fb [ 34.202950] ffff88801a918680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.203522] ================================================================== [ 34.204327] Disabling lock debugging due to kernel taint [ 35.636998] BUG: Bad rss-counter state mm:0000000036cde27b type:MM_FILEPAGES val:33 [ 35.638215] BUG: Bad rss-counter state mm:0000000036cde27b type:MM_ANONPAGES val:22 [ 36.005955] BUG: Bad rss-counter state mm:00000000e3793b03 type:MM_FILEPAGES val:33 [ 36.006730] BUG: Bad rss-counter state mm:00000000e3793b03 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:60087' (ECDSA) to the list of known hosts. 2023/06/20 09:01:09 fuzzer started 2023/06/20 09:01:09 dialing manager at localhost:44161 2023/06/20 09:01:09 checking machine... 2023/06/20 09:01:09 checking revisions... [ 36.614626] kmemleak: Automatic memory scanning thread ended 2023/06/20 09:01:09 testing simple program... [ 36.649669] cgroup: Unknown subsys name 'net' [ 36.693206] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 09:01:06 Registers: info registers vcpu 0 RAX=ffffffff860d68fb RBX=0000000000000001 RCX=ffffffff860d68f6 RDX=0000000000000000 RSI=0000000000000000 RDI=0000000000000001 RBP=ffff88806ce09aa8 RSP=ffff88806ce099e0 R8 =ffffffff860d68fa R9 =ffff88806ce09a90 R10=0000000000038001 R11=0000000000010b7e R12=ffff88806ce09ab0 R13=ffff88806ce09a98 R14=ffff888014227ac0 R15=ffff88806ce09a50 RIP=ffffffff81131136 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 00007f1374b8b900 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=00007f3ef5cf5650 CR3=000000000cb2c000 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=ffffffffffffffffffffffffffffffff XMM01=30306234386136303638616663356134 XMM02=38303062343861363036386166633561 XMM03=2f6c616e72756f6a2f676f6c2f6e7572 XMM04=47f4b738e601b4c500000000000ae988 XMM05=9a005b782c4c19ac0000000000135318 XMM06=19e9129bd510f23500000000001341d0 XMM07=00000000000000000000000000000000 XMM08=415453454d49545f454d49544c414552 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=0000000000000001 RBX=0000000000000001 RCX=ffffffff863b1228 RDX=0000000000000000 RSI=0000000000000000 RDI=0000000000000001 RBP=ffff888006b3fb08 RSP=ffff888006b3fa40 R8 =ffffffff863b122c R9 =ffff888006b3faf0 R10=0000000000038001 R11=000000000008a7ac R12=ffff888006b3fb10 R13=ffff888006b3faf8 R14=ffff888006b3fdb0 R15=ffff888006b3fab0 RIP=ffffffff81130ba2 RFL=00000202 [-------] 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 00007f3ef5740900 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=00007f3ef5cf7618 CR3=00000000168de000 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=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