syzkaller login: [ 39.009232] BUG: Bad rss-counter state mm:00000000856dafc2 type:MM_FILEPAGES val:33 [ 39.010680] BUG: Bad rss-counter state mm:00000000856dafc2 type:MM_ANONPAGES val:22 [ 39.151233] ================================================================== [ 39.152163] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 39.153121] Read of size 8 at addr ffff888016408880 by task sshd/225 [ 39.154076] [ 39.154322] CPU: 1 PID: 225 Comm: sshd Not tainted 6.4.0-rc7-next-20230620 #1 [ 39.155216] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 39.156227] Call Trace: [ 39.156555] [ 39.156842] dump_stack_lvl+0x91/0xf0 [ 39.157335] print_report+0xcc/0x620 [ 39.157830] ? __virt_addr_valid+0x102/0x340 [ 39.158474] ? vma_interval_tree_remove+0xc75/0xec0 [ 39.159115] ? vma_interval_tree_remove+0xc75/0xec0 [ 39.159743] kasan_report+0xbe/0xf0 [ 39.160231] ? vma_interval_tree_remove+0xc75/0xec0 [ 39.160861] vma_interval_tree_remove+0xc75/0xec0 [ 39.161475] vma_prepare+0xc54/0x11a0 [ 39.161955] __split_vma+0x5af/0x950 [ 39.162462] ? __pfx___split_vma+0x10/0x10 [ 39.163005] ? find_held_lock+0x2c/0x110 [ 39.163532] do_vmi_align_munmap+0x2ba/0x11f0 [ 39.164107] ? lock_is_held_type+0x9f/0x120 [ 39.164659] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 39.165273] ? mtree_range_walk+0x632/0x900 [ 39.165838] ? mas_walk+0x5c7/0x7c0 [ 39.166343] do_vmi_munmap+0x1f1/0x2b0 [ 39.166853] mmap_region+0x1f9/0x2660 [ 39.167355] ? vm_mmap_pgoff+0x15c/0x3a0 [ 39.167892] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 39.168634] ? __pfx_lock_acquire+0x10/0x10 [ 39.169191] ? __pfx_mmap_region+0x10/0x10 [ 39.169749] ? security_mmap_addr+0x7d/0xa0 [ 39.170327] ? get_unmapped_area+0x1f5/0x3f0 [ 39.170899] do_mmap+0x854/0xf00 [ 39.171353] vm_mmap_pgoff+0x1a6/0x3a0 [ 39.171863] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 39.172454] ksys_mmap_pgoff+0x3af/0x500 [ 39.172984] do_syscall_64+0x3f/0x90 [ 39.173484] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 39.174155] RIP: 0033:0x7f7e1b7aad82 [ 39.174667] 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.176900] RSP: 002b:00007ffc96b93938 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 39.177844] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f7e1b7aad82 [ 39.178743] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f7e1abe4000 [ 39.179635] RBP: 00007f7e1abe4000 R08: 0000000000000009 R09: 0000000000001000 [ 39.180525] R10: 0000000000000812 R11: 0000000000000206 R12: 0000559bfdf59ec0 [ 39.181413] R13: 00007ffc96b93950 R14: 00007ffc96b93980 R15: 00007ffc96b93ce0 [ 39.182323] [ 39.182634] [ 39.182861] Allocated by task 218: [ 39.183315] kasan_save_stack+0x22/0x50 [ 39.183846] kasan_set_track+0x25/0x30 [ 39.184366] __kasan_slab_alloc+0x59/0x70 [ 39.184912] kmem_cache_alloc+0x16b/0x370 [ 39.185457] vm_area_dup+0x20/0x160 [ 39.185943] __split_vma+0x170/0x950 [ 39.186451] split_vma+0xc6/0x110 [ 39.186912] mprotect_fixup+0x8d2/0xb30 [ 39.187443] do_mprotect_pkey+0x87e/0xd40 [ 39.187993] __x64_sys_mprotect+0x78/0xc0 [ 39.188539] do_syscall_64+0x3f/0x90 [ 39.189043] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 39.189728] [ 39.189952] Freed by task 204: [ 39.190376] kasan_save_stack+0x22/0x50 [ 39.190902] kasan_set_track+0x25/0x30 [ 39.191427] kasan_save_free_info+0x2b/0x50 [ 39.191982] __kasan_slab_free+0x10a/0x190 [ 39.192552] kmem_cache_free+0x10d/0x4d0 [ 39.193085] rcu_core+0x8c8/0x2860 [ 39.193550] __do_softirq+0x1b7/0x7d4 [ 39.194047] [ 39.194282] Last potentially related work creation: [ 39.194897] kasan_save_stack+0x22/0x50 [ 39.195425] __kasan_record_aux_stack+0x8e/0xa0 [ 39.196022] __call_rcu_common.constprop.0+0x6a/0xb90 [ 39.196777] remove_vma+0x139/0x170 [ 39.197247] do_vmi_align_munmap+0xd4a/0x11f0 [ 39.197830] do_vmi_munmap+0x1f1/0x2b0 [ 39.198352] __vm_munmap+0x138/0x3a0 [ 39.198848] __x64_sys_munmap+0x59/0x80 [ 39.199361] do_syscall_64+0x3f/0x90 [ 39.199869] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 39.200549] [ 39.200772] The buggy address belongs to the object at ffff888016408828 [ 39.200772] which belongs to the cache vm_area_struct of size 168 [ 39.202323] The buggy address is located 88 bytes inside of [ 39.202323] freed 168-byte region [ffff888016408828, ffff8880164088d0) [ 39.203791] [ 39.204012] The buggy address belongs to the physical page: [ 39.204699] page:000000000cec5dd5 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x16408 [ 39.205848] memcg:ffff88800951c901 [ 39.206309] flags: 0x100000000000200(slab|node=0|zone=1) [ 39.206988] page_type: 0xffffffff() [ 39.207466] raw: 0100000000000200 ffff8880087a0c80 dead000000000122 0000000000000000 [ 39.208432] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800951c901 [ 39.209386] page dumped because: kasan: bad access detected [ 39.210070] [ 39.210309] Memory state around the buggy address: [ 39.210910] ffff888016408780: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc [ 39.211801] ffff888016408800: fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb [ 39.212698] >ffff888016408880: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc [ 39.213594] ^ [ 39.214020] ffff888016408900: fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.214935] ffff888016408980: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc 00 [ 39.215823] ================================================================== [ 39.216782] Disabling lock debugging due to kernel taint [ 41.253487] BUG: Bad rss-counter state mm:00000000765be875 type:MM_FILEPAGES val:33 [ 41.254686] BUG: Bad rss-counter state mm:00000000765be875 type:MM_ANONPAGES val:22 [ 41.769692] BUG: Bad rss-counter state mm:000000002cfb2401 type:MM_FILEPAGES val:33 [ 41.770698] BUG: Bad rss-counter state mm:000000002cfb2401 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:14477' (ECDSA) to the list of known hosts. 2023/06/21 10:31:24 fuzzer started 2023/06/21 10:31:25 dialing manager at localhost:36067 2023/06/21 10:31:25 checking machine... 2023/06/21 10:31:25 checking revisions... [ 42.530151] kmemleak: Automatic memory scanning thread ended 2023/06/21 10:31:25 testing simple program... [ 42.567093] cgroup: Unknown subsys name 'net' [ 42.618891] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 10:31:24 Registers: info registers vcpu 0 RAX=0000000000000001 RBX=00000000000b5060 RCX=00007f10932a4344 RDX=00007ffd5b585798 RSI=00007ffd5b585798 RDI=000055f30a136330 RBP=00007ffd5b585818 RSP=00007ffd5b585790 R8 =0000000000000288 R9 =00000000000b5060 R10=0000000000000002 R11=00007f1091c3fc78 R12=00007f1091bc1060 R13=000055f30a13f8e0 R14=0000000000000006 R15=00007ffd5b5857a0 RIP=00007f10932a4475 RFL=00000202 [-------] 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 00007f1092721900 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=00007f1091b70e90 CR3=000000000d9fe000 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=00000000000fa4585e5c10884646930b XMM01=63f0e389423c8ea0454ce539d983477c XMM02=000000000011c158d59e07bde36eea69 XMM03=000000000011c280ec2efd57dc4c00df XMM04=f81c41456af819d700000000000ae988 XMM05=8e73658b2a17ad910000000000133b50 XMM06=e8008b1642ea3e600000000000132940 XMM07=fb795ef6d65770560000000000122488 XMM08=2c67c8bc2e329bc3000000000011c280 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=0000000000000001 RBX=0000000000000002 RCX=0000000000000009 RDX=0000000000000000 RSI=ffff888015bb1200 RDI=ffff88800e8e3a74 RBP=ffff8880087b8780 RSP=ffff888017bafc70 R8 =0000000000000000 R9 =0000000000000000 R10=ffffffff85d3d357 R11=00000000000b6a61 R12=ffff888015bb1200 R13=0000000000000000 R14=ffff888017bafcd0 R15=ffffea000039dd80 RIP=ffffffff81803de3 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 00007f607a584900 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=00007ffc4f64b000 CR3=000000000c618000 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