syzkaller login: [ 32.074789] BUG: Bad rss-counter state mm:000000004cc9b3dd type:MM_FILEPAGES val:33 [ 32.075601] BUG: Bad rss-counter state mm:000000004cc9b3dd type:MM_ANONPAGES val:22 [ 32.189986] ================================================================== [ 32.190652] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 32.191302] Read of size 8 at addr ffff88800e3a9968 by task sshd/222 [ 32.191854] [ 32.192033] CPU: 0 PID: 222 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 32.192654] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 32.193343] Call Trace: [ 32.193568] [ 32.193771] dump_stack_lvl+0x91/0xf0 [ 32.194195] print_report+0xcc/0x620 [ 32.194545] ? __virt_addr_valid+0x102/0x340 [ 32.194932] ? vma_interval_tree_remove+0xc75/0xec0 [ 32.195367] ? vma_interval_tree_remove+0xc75/0xec0 [ 32.195809] kasan_report+0xbe/0xf0 [ 32.196145] ? vma_interval_tree_remove+0xc75/0xec0 [ 32.196606] vma_interval_tree_remove+0xc75/0xec0 [ 32.197073] vma_prepare+0xc54/0x11a0 [ 32.197416] __split_vma+0x5af/0x950 [ 32.197768] ? __pfx___split_vma+0x10/0x10 [ 32.198177] ? find_held_lock+0x2c/0x110 [ 32.198549] do_vmi_align_munmap+0x2ba/0x11f0 [ 32.198954] ? lock_is_held_type+0x9f/0x120 [ 32.199339] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 32.199779] ? mtree_range_walk+0x632/0x900 [ 32.200170] ? mas_walk+0x5c7/0x7c0 [ 32.200505] do_vmi_munmap+0x1f1/0x2b0 [ 32.200866] mmap_region+0x1f9/0x2660 [ 32.201211] ? vm_mmap_pgoff+0x15c/0x3a0 [ 32.201576] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 32.202142] ? __pfx_lock_acquire+0x10/0x10 [ 32.202521] ? __pfx_mmap_region+0x10/0x10 [ 32.202917] ? security_mmap_addr+0x7d/0xa0 [ 32.203289] ? get_unmapped_area+0x1f5/0x3f0 [ 32.203672] do_mmap+0x854/0xf00 [ 32.203984] vm_mmap_pgoff+0x1a6/0x3a0 [ 32.204335] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 32.204735] ksys_mmap_pgoff+0x3af/0x500 [ 32.205094] do_syscall_64+0x3f/0x90 [ 32.205436] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 32.205923] RIP: 0033:0x7fc201905d82 [ 32.206288] 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 [ 32.207822] RSP: 002b:00007ffff6b04308 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 32.208475] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fc201905d82 [ 32.209067] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fc200d3f000 [ 32.209670] RBP: 00007fc200d3f000 R08: 0000000000000009 R09: 0000000000001000 [ 32.210271] R10: 0000000000000812 R11: 0000000000000206 R12: 000055655c042f70 [ 32.210893] R13: 00007ffff6b04320 R14: 00007ffff6b04350 R15: 00007ffff6b046b0 [ 32.211532] [ 32.211740] [ 32.211898] Allocated by task 214: [ 32.212199] kasan_save_stack+0x22/0x50 [ 32.212560] kasan_set_track+0x25/0x30 [ 32.212909] __kasan_slab_alloc+0x59/0x70 [ 32.213284] kmem_cache_alloc+0x16b/0x370 [ 32.213645] vm_area_dup+0x20/0x160 [ 32.213971] __split_vma+0x170/0x950 [ 32.214324] split_vma+0xc6/0x110 [ 32.214628] mprotect_fixup+0x8d2/0xb30 [ 32.214968] do_mprotect_pkey+0x87e/0xd40 [ 32.215302] __x64_sys_mprotect+0x78/0xc0 [ 32.215674] do_syscall_64+0x3f/0x90 [ 32.216053] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 32.216514] [ 32.216667] Freed by task 214: [ 32.216973] kasan_save_stack+0x22/0x50 [ 32.217325] kasan_set_track+0x25/0x30 [ 32.217679] kasan_save_free_info+0x2b/0x50 [ 32.218059] __kasan_slab_free+0x10a/0x190 [ 32.218440] kmem_cache_free+0x10d/0x4d0 [ 32.218806] rcu_core+0x8c8/0x2860 [ 32.219118] __do_softirq+0x1b7/0x7d4 [ 32.219453] [ 32.219602] Last potentially related work creation: [ 32.220017] kasan_save_stack+0x22/0x50 [ 32.220378] __kasan_record_aux_stack+0x8e/0xa0 [ 32.220777] __call_rcu_common.constprop.0+0x6a/0xb90 [ 32.221282] remove_vma+0x139/0x170 [ 32.221613] do_vmi_align_munmap+0xd4a/0x11f0 [ 32.222043] do_vmi_munmap+0x1f1/0x2b0 [ 32.222403] __vm_munmap+0x138/0x3a0 [ 32.222744] __x64_sys_munmap+0x59/0x80 [ 32.223104] do_syscall_64+0x3f/0x90 [ 32.223448] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 32.223913] [ 32.224063] Second to last potentially related work creation: [ 32.224555] kasan_save_stack+0x22/0x50 [ 32.224937] __kasan_record_aux_stack+0x8e/0xa0 [ 32.225373] __call_rcu_common.constprop.0+0x6a/0xb90 [ 32.225851] remove_vma+0x139/0x170 [ 32.226219] do_vmi_align_munmap+0xd4a/0x11f0 [ 32.226617] do_vmi_munmap+0x1f1/0x2b0 [ 32.226973] mmap_region+0x1f9/0x2660 [ 32.227314] do_mmap+0x854/0xf00 [ 32.227618] vm_mmap_pgoff+0x1a6/0x3a0 [ 32.227974] ksys_mmap_pgoff+0x3af/0x500 [ 32.228342] do_syscall_64+0x3f/0x90 [ 32.228681] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 32.229140] [ 32.229299] The buggy address belongs to the object at ffff88800e3a9910 [ 32.229299] which belongs to the cache vm_area_struct of size 168 [ 32.230416] The buggy address is located 88 bytes inside of [ 32.230416] freed 168-byte region [ffff88800e3a9910, ffff88800e3a99b8) [ 32.231444] [ 32.231597] The buggy address belongs to the physical page: [ 32.232070] page:0000000001d1b4b9 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xe3a9 [ 32.232840] memcg:ffff88800e364101 [ 32.233143] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 32.233638] page_type: 0xffffffff() [ 32.233956] raw: 0100000000000200 ffff88800879fc80 0000000000000000 dead000000000001 [ 32.234623] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800e364101 [ 32.235297] page dumped because: kasan: bad access detected [ 32.235765] [ 32.235919] Memory state around the buggy address: [ 32.236337] ffff88800e3a9800: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 [ 32.236957] ffff88800e3a9880: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc [ 32.237573] >ffff88800e3a9900: fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.238207] ^ [ 32.238755] ffff88800e3a9980: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fa [ 32.239381] ffff88800e3a9a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.240027] ================================================================== [ 32.240921] Disabling lock debugging due to kernel taint [ 33.718846] BUG: Bad rss-counter state mm:000000002d7b966c type:MM_FILEPAGES val:33 [ 33.719545] BUG: Bad rss-counter state mm:000000002d7b966c type:MM_ANONPAGES val:22 [ 34.158593] BUG: Bad rss-counter state mm:000000005844fef4 type:MM_FILEPAGES val:33 [ 34.159317] BUG: Bad rss-counter state mm:000000005844fef4 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:30235' (ECDSA) to the list of known hosts. 2023/06/20 09:06:04 fuzzer started 2023/06/20 09:06:05 dialing manager at localhost:44161 2023/06/20 09:06:05 checking machine... 2023/06/20 09:06:05 checking revisions... [ 34.677378] kmemleak: Automatic memory scanning thread ended 2023/06/20 09:06:05 testing simple program... [ 34.711351] cgroup: Unknown subsys name 'net' [ 34.765819] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 09:06:03 Registers: info registers vcpu 0 RAX=0000000000000000 RBX=ffff8880159977b8 RCX=0000000000000000 RDX=ffff888019beb680 RSI=ffffffff83664946 RDI=0000000000001140 RBP=ffff8880159977a8 RSP=ffff888015997728 R8 =0000000000000005 R9 =0000000000000280 R10=0000000000001140 R11=00000000000b6996 R12=00000000000128c0 R13=00000000ffffffff R14=00000000000928c0 R15=0000000000001140 RIP=ffffffff816cb894 RFL=00000293 [--S-A-C] 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 00007fa6c95f3900 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=00007fa6c9baa618 CR3=000000000db22000 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=dffffc0000000000 RBX=ffff88806cf09b60 RCX=ffffffff864b1901 RDX=0000000000000000 RSI=ffffffff8450d7d7 RDI=ffff88806cf09b6c RBP=000000000000000b RSP=ffff88806cf09a78 R8 =ffffffff864b19c0 R9 =ffff88806cf09ad8 R10=0000000000038001 R11=00000000000b53a6 R12=ffff88806cf09b60 R13=0000000000000000 R14=ffff888008d751c0 R15=ffff88800c3f6d90 RIP=ffffffff813ad49e RFL=00000213 [----A-C] 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=00007f1e6a7782f0 CR3=000000000c58e000 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=d45c8060c6efe2917d4854cbb2d4d2b0 XMM02=2c67c8bc2e329bc3000000000011d9c0 XMM03=fb795ef6d657705600000000001246c8 XMM04=b19b844e4f20e88300000000000ae988 XMM05=59d5b690e0af863b0000000000135528 XMM06=2408284a7cc395d50000000000134390 XMM07=e042d86d42eb936e0000000000124948 XMM08=5ff727d75e5d37e3000000000011da20 XMM09=00000000000000000000000000000000 XMM10=20200000000020202020202020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000