syzkaller login: [ 39.776510] BUG: Bad rss-counter state mm:00000000d2628edd type:MM_FILEPAGES val:33 [ 39.778394] BUG: Bad rss-counter state mm:00000000d2628edd type:MM_ANONPAGES val:22 [ 40.008095] ================================================================== [ 40.008740] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 40.009369] Read of size 8 at addr ffff88800c6a5140 by task sshd/223 [ 40.009894] [ 40.010040] CPU: 1 PID: 223 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 40.010593] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 40.019586] Call Trace: [ 40.019804] [ 40.020200] dump_stack_lvl+0x91/0xf0 [ 40.021649] print_report+0xcc/0x620 [ 40.021977] ? __virt_addr_valid+0x102/0x340 [ 40.022345] ? vma_interval_tree_remove+0xc75/0xec0 [ 40.022753] ? vma_interval_tree_remove+0xc75/0xec0 [ 40.023160] kasan_report+0xbe/0xf0 [ 40.023477] ? vma_interval_tree_remove+0xc75/0xec0 [ 40.023887] vma_interval_tree_remove+0xc75/0xec0 [ 40.024283] vma_prepare+0xc54/0x11a0 [ 40.024631] __split_vma+0x5af/0x950 [ 40.024943] ? __pfx___split_vma+0x10/0x10 [ 40.025290] ? find_held_lock+0x2c/0x110 [ 40.025633] do_vmi_align_munmap+0x2ba/0x11f0 [ 40.026003] ? lock_is_held_type+0x9f/0x120 [ 40.026355] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 40.026754] ? mtree_range_walk+0x632/0x900 [ 40.027122] ? mas_walk+0x5c7/0x7c0 [ 40.027439] do_vmi_munmap+0x1f1/0x2b0 [ 40.027767] mmap_region+0x1f9/0x2660 [ 40.028090] ? vm_mmap_pgoff+0x15c/0x3a0 [ 40.029144] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 40.029625] ? __pfx_lock_acquire+0x10/0x10 [ 40.030031] ? __pfx_mmap_region+0x10/0x10 [ 40.030392] ? security_mmap_addr+0x7d/0xa0 [ 40.030745] ? get_unmapped_area+0x1f5/0x3f0 [ 40.031193] do_mmap+0x854/0xf00 [ 40.031489] vm_mmap_pgoff+0x1a6/0x3a0 [ 40.031824] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 40.032383] ksys_mmap_pgoff+0x3af/0x500 [ 40.033191] do_syscall_64+0x3f/0x90 [ 40.033511] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 40.033939] RIP: 0033:0x7fcb3197cd82 [ 40.034290] 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 [ 40.035667] RSP: 002b:00007ffc40a6ad68 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 40.036243] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fcb3197cd82 [ 40.037075] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fcb30db6000 [ 40.037633] RBP: 00007fcb30db6000 R08: 0000000000000009 R09: 0000000000001000 [ 40.038227] R10: 0000000000000812 R11: 0000000000000206 R12: 0000559e9d278ec0 [ 40.038782] R13: 00007ffc40a6ad80 R14: 00007ffc40a6adb0 R15: 00007ffc40a6b110 [ 40.039346] [ 40.039540] [ 40.039685] Allocated by task 214: [ 40.039972] kasan_save_stack+0x22/0x50 [ 40.040307] kasan_set_track+0x25/0x30 [ 40.040655] __kasan_slab_alloc+0x59/0x70 [ 40.040995] kmem_cache_alloc+0x16b/0x370 [ 40.041327] vm_area_dup+0x20/0x160 [ 40.041620] __split_vma+0x170/0x950 [ 40.041926] split_vma+0xc6/0x110 [ 40.042214] mprotect_fixup+0x8d2/0xb30 [ 40.042537] do_mprotect_pkey+0x87e/0xd40 [ 40.042876] __x64_sys_mprotect+0x78/0xc0 [ 40.043217] do_syscall_64+0x3f/0x90 [ 40.043526] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 40.043943] [ 40.044083] Freed by task 214: [ 40.044337] kasan_save_stack+0x22/0x50 [ 40.044751] kasan_set_track+0x25/0x30 [ 40.045066] kasan_save_free_info+0x2b/0x50 [ 40.045410] __kasan_slab_free+0x10a/0x190 [ 40.045761] kmem_cache_free+0x10d/0x4d0 [ 40.046096] rcu_core+0x8c8/0x2860 [ 40.046387] __do_softirq+0x1b7/0x7d4 [ 40.046706] [ 40.046842] Last potentially related work creation: [ 40.047210] kasan_save_stack+0x22/0x50 [ 40.047517] __kasan_record_aux_stack+0x8e/0xa0 [ 40.047867] __call_rcu_common.constprop.0+0x6a/0xb90 [ 40.048276] remove_vma+0x139/0x170 [ 40.048613] do_vmi_align_munmap+0xd4a/0x11f0 [ 40.048962] do_vmi_munmap+0x1f1/0x2b0 [ 40.049264] __vm_munmap+0x138/0x3a0 [ 40.049552] __x64_sys_munmap+0x59/0x80 [ 40.049876] do_syscall_64+0x3f/0x90 [ 40.050185] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 40.050596] [ 40.050738] The buggy address belongs to the object at ffff88800c6a50e8 [ 40.050738] which belongs to the cache vm_area_struct of size 168 [ 40.051669] The buggy address is located 88 bytes inside of [ 40.051669] freed 168-byte region [ffff88800c6a50e8, ffff88800c6a5190) [ 40.053035] [ 40.053177] The buggy address belongs to the physical page: [ 40.056786] page:000000009b9e74db refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xc6a5 [ 40.057451] memcg:ffff88800e83e301 [ 40.057721] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 40.058161] page_type: 0xffffffff() [ 40.058448] raw: 0100000000000200 ffff88800879fc80 ffffea000038d3c0 dead000000000003 [ 40.059022] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800e83e301 [ 40.059584] page dumped because: kasan: bad access detected [ 40.059995] [ 40.060132] Memory state around the buggy address: [ 40.060528] ffff88800c6a5000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 40.061067] ffff88800c6a5080: 00 00 00 00 00 fc fc fc fc fc fc fc fc fa fb fb [ 40.061604] >ffff88800c6a5100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.062138] ^ [ 40.062540] ffff88800c6a5180: fb fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb [ 40.063083] ffff88800c6a5200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc [ 40.063598] ================================================================== [ 40.064250] Disabling lock debugging due to kernel taint [ 44.468131] BUG: Bad rss-counter state mm:00000000ad6d34f2 type:MM_FILEPAGES val:33 [ 44.468848] BUG: Bad rss-counter state mm:00000000ad6d34f2 type:MM_ANONPAGES val:22 [ 45.773423] BUG: Bad rss-counter state mm:0000000089521ca9 type:MM_FILEPAGES val:33 [ 45.777129] BUG: Bad rss-counter state mm:0000000089521ca9 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:63737' (ECDSA) to the list of known hosts. 2023/06/20 10:08:56 fuzzer started 2023/06/20 10:08:57 dialing manager at localhost:44161 2023/06/20 10:08:57 checking machine... 2023/06/20 10:08:57 checking revisions... [ 46.781721] kmemleak: Automatic memory scanning thread ended 2023/06/20 10:08:57 testing simple program... [ 46.842862] cgroup: Unknown subsys name 'net' [ 46.931178] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 10:08:55 Registers: info registers vcpu 0 RAX=dffffc0000000000 RBX=ffffffff813ad420 RCX=0000000000000001 RDX=1ffff11002f81ebe RSI=ffffffff84506c7f RDI=ffff888017c0f660 RBP=ffff888017c0f630 RSP=ffff888017c0f588 R8 =0000000000000001 R9 =ffff888017c0f5d8 R10=0000000000038001 R11=000000000000713e R12=ffff888017c0f660 R13=0000000000000000 R14=ffff888018d23680 R15=0000000000000cc0 RIP=ffffffff813ad42f 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 00007fdda262e900 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=00007fc4972a0328 CR3=000000000ffb2000 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=ffffffffffff00000000000000000000 XMM02=ffffffffffff00000000000000000000 XMM03=00000000000000000000000000000000 XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000 XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000 XMM08=00000000000073707574726174732064 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=0000000081c51702 RBX=00000000b5bf1ba6 RCX=ffff88800e0b7628 RDX=0000000000000012 RSI=0000000000000006 RDI=00000000246ce694 RBP=ffff88800844f780 RSP=ffff88800e0b7548 R8 =0000000004a433fa R9 =fffffbfff0ba77da R10=ffffffff85d3bed7 R11=00000000000b6996 R12=0000000000000001 R13=0000000000092cc0 R14=ffff88800e0b75b0 R15=0000000000000012 RIP=ffffffff82270ecd 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 00007f91bb5c4700 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=00007f91bb60c540 CR3=000000001027a000 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=ff000000000000000000000000000000 XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000 XMM04=246ad5c8ad8b1fb90000000000135838 XMM05=d3fdd5f48436fbd700000000000aead0 XMM06=1691bab247d3b71f00000000000ae988 XMM07=a1fcdcf819d7e1e500000000000ae728 XMM08=44495f474f4c5359530069253d595449 XMM09=00000000000000000000000000000000 XMM10=20200000000020202020202020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000