syzkaller login: [ 29.009681] BUG: Bad rss-counter state mm:00000000859a0deb type:MM_FILEPAGES val:33 [ 29.010712] BUG: Bad rss-counter state mm:00000000859a0deb type:MM_ANONPAGES val:22 [ 29.180366] ================================================================== [ 29.181467] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 29.182580] Read of size 8 at addr ffff88800edf43f8 by task sshd/221 [ 29.183669] [ 29.183927] CPU: 1 PID: 221 Comm: sshd Not tainted 6.4.0-rc7-next-20230620 #1 [ 29.184938] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 29.186107] Call Trace: [ 29.186428] [ 29.186712] dump_stack_lvl+0x91/0xf0 [ 29.187209] print_report+0xcc/0x620 [ 29.187689] ? __virt_addr_valid+0x102/0x340 [ 29.188241] ? vma_interval_tree_remove+0xc75/0xec0 [ 29.188862] ? vma_interval_tree_remove+0xc75/0xec0 [ 29.189476] kasan_report+0xbe/0xf0 [ 29.189948] ? vma_interval_tree_remove+0xc75/0xec0 [ 29.190571] vma_interval_tree_remove+0xc75/0xec0 [ 29.191191] vma_prepare+0xc54/0x11a0 [ 29.191669] __split_vma+0x5af/0x950 [ 29.192137] ? __pfx___split_vma+0x10/0x10 [ 29.192657] ? find_held_lock+0x2c/0x110 [ 29.193172] do_vmi_align_munmap+0x2ba/0x11f0 [ 29.193735] ? lock_is_held_type+0x9f/0x120 [ 29.194271] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 29.194886] ? mtree_range_walk+0x632/0x900 [ 29.195434] ? mas_walk+0x5c7/0x7c0 [ 29.195911] do_vmi_munmap+0x1f1/0x2b0 [ 29.196398] mmap_region+0x1f9/0x2660 [ 29.196875] ? vm_mmap_pgoff+0x15c/0x3a0 [ 29.197377] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 29.198082] ? __pfx_lock_acquire+0x10/0x10 [ 29.198619] ? __pfx_mmap_region+0x10/0x10 [ 29.199157] ? security_mmap_addr+0x7d/0xa0 [ 29.199684] ? get_unmapped_area+0x1f5/0x3f0 [ 29.200229] do_mmap+0x854/0xf00 [ 29.200664] vm_mmap_pgoff+0x1a6/0x3a0 [ 29.201161] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 29.201728] ksys_mmap_pgoff+0x3af/0x500 [ 29.202231] do_syscall_64+0x3f/0x90 [ 29.202704] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 29.203354] RIP: 0033:0x7fbcb5754d82 [ 29.203810] 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 [ 29.205924] RSP: 002b:00007ffce4b3e1d8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 29.206836] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fbcb5754d82 [ 29.207708] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fbcb4b8e000 [ 29.208559] RBP: 00007fbcb4b8e000 R08: 0000000000000009 R09: 0000000000001000 [ 29.209402] R10: 0000000000000812 R11: 0000000000000206 R12: 000055db96cf1ec0 [ 29.210241] R13: 00007ffce4b3e1f0 R14: 00007ffce4b3e220 R15: 00007ffce4b3e580 [ 29.211105] [ 29.211395] [ 29.211606] Allocated by task 214: [ 29.212041] kasan_save_stack+0x22/0x50 [ 29.212545] kasan_set_track+0x25/0x30 [ 29.213044] __kasan_slab_alloc+0x59/0x70 [ 29.213591] kmem_cache_alloc+0x16b/0x370 [ 29.214105] vm_area_dup+0x20/0x160 [ 29.214554] __split_vma+0x170/0x950 [ 29.215031] split_vma+0xc6/0x110 [ 29.215466] mprotect_fixup+0x8d2/0xb30 [ 29.215968] do_mprotect_pkey+0x87e/0xd40 [ 29.216483] __x64_sys_mprotect+0x78/0xc0 [ 29.216999] do_syscall_64+0x3f/0x90 [ 29.217473] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 29.218108] [ 29.218320] Freed by task 214: [ 29.218709] kasan_save_stack+0x22/0x50 [ 29.219218] kasan_set_track+0x25/0x30 [ 29.219704] kasan_save_free_info+0x2b/0x50 [ 29.220227] __kasan_slab_free+0x10a/0x190 [ 29.220758] kmem_cache_free+0x10d/0x4d0 [ 29.221259] rcu_core+0x8c8/0x2860 [ 29.221694] __do_softirq+0x1b7/0x7d4 [ 29.222176] [ 29.222394] Last potentially related work creation: [ 29.222979] kasan_save_stack+0x22/0x50 [ 29.223476] __kasan_record_aux_stack+0x8e/0xa0 [ 29.224099] __call_rcu_common.constprop.0+0x6a/0xb90 [ 29.224741] remove_vma+0x139/0x170 [ 29.225187] do_vmi_align_munmap+0xd4a/0x11f0 [ 29.225740] do_vmi_munmap+0x1f1/0x2b0 [ 29.226217] __vm_munmap+0x138/0x3a0 [ 29.226682] __x64_sys_munmap+0x59/0x80 [ 29.227196] do_syscall_64+0x3f/0x90 [ 29.227671] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 29.228308] [ 29.228527] Second to last potentially related work creation: [ 29.229209] kasan_save_stack+0x22/0x50 [ 29.229704] __kasan_record_aux_stack+0x8e/0xa0 [ 29.230274] __call_rcu_common.constprop.0+0x6a/0xb90 [ 29.230921] remove_vma+0x139/0x170 [ 29.231370] do_vmi_align_munmap+0xd4a/0x11f0 [ 29.231920] do_vmi_munmap+0x1f1/0x2b0 [ 29.232406] mmap_region+0x1f9/0x2660 [ 29.232874] do_mmap+0x854/0xf00 [ 29.233299] vm_mmap_pgoff+0x1a6/0x3a0 [ 29.233788] ksys_mmap_pgoff+0x3af/0x500 [ 29.234281] do_syscall_64+0x3f/0x90 [ 29.234747] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 29.235421] [ 29.235632] The buggy address belongs to the object at ffff88800edf43a0 [ 29.235632] which belongs to the cache vm_area_struct of size 168 [ 29.237081] The buggy address is located 88 bytes inside of [ 29.237081] freed 168-byte region [ffff88800edf43a0, ffff88800edf4448) [ 29.238463] [ 29.238676] The buggy address belongs to the physical page: [ 29.239350] page:000000004c2036bd refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xedf4 [ 29.240420] memcg:ffff88800e981301 [ 29.240843] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 29.241537] page_type: 0xffffffff() [ 29.241983] raw: 0100000000000200 ffff8880087a0c80 0000000000000000 dead000000000001 [ 29.242916] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800e981301 [ 29.243816] page dumped because: kasan: bad access detected [ 29.244469] [ 29.244681] Memory state around the buggy address: [ 29.245265] ffff88800edf4280: fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 [ 29.246118] ffff88800edf4300: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc [ 29.246981] >ffff88800edf4380: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb [ 29.247829] ^ [ 29.248665] ffff88800edf4400: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 29.249503] ffff88800edf4480: fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.250358] ================================================================== [ 29.251288] Disabling lock debugging due to kernel taint [ 31.653536] BUG: Bad rss-counter state mm:0000000067e0a869 type:MM_FILEPAGES val:33 [ 31.654736] BUG: Bad rss-counter state mm:0000000067e0a869 type:MM_ANONPAGES val:22 [ 32.157674] BUG: Bad rss-counter state mm:00000000217260aa type:MM_FILEPAGES val:33 [ 32.158820] BUG: Bad rss-counter state mm:00000000217260aa type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:1718' (ECDSA) to the list of known hosts. 2023/06/20 23:39:48 fuzzer started 2023/06/20 23:39:48 dialing manager at localhost:36067 2023/06/20 23:39:48 checking machine... 2023/06/20 23:39:48 checking revisions... [ 32.903776] kmemleak: Automatic memory scanning thread ended 2023/06/20 23:39:49 testing simple program... [ 32.956186] cgroup: Unknown subsys name 'net' [ 32.993875] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 23:39:48 Registers: info registers vcpu 0 RAX=0000000000000001 RBX=0000000000000000 RCX=ffffffff815342db RDX=fffffbfff0ba7a6b RSI=0000000000000008 RDI=ffffffff85d3d350 RBP=ffffffff81807029 RSP=ffff8880164dfb08 R8 =0000000000000000 R9 =fffffbfff0ba7a6a R10=ffffffff85d3d357 R11=ffffffff81806f71 R12=ffff88800844f780 R13=ffff88806ce3de20 R14=ffff88806ce3de20 R15=ffff88806ce3de00 RIP=ffffffff815342e3 RFL=00000047 [---Z-PC] 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 00007f61fb5da900 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=00007f61fbb91618 CR3=000000000bf52000 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=ffffffff8180ca5a RBX=0000000000000002 RCX=0000000000000002 RDX=ffff88806cf09e01 RSI=ffff88806cf09e00 RDI=ffff88806cf09e00 RBP=ffff88806cf09af0 RSP=ffff88806cf09a28 R8 =ffffffff86139748 R9 =ffff88806cf09ad8 R10=0000000000038001 R11=0000000000020f03 R12=ffff88806cf09af8 R13=ffff88806cf09ae0 R14=ffff88806cf09e08 R15=ffff88806cf09a98 RIP=ffffffff81131041 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 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=00007fc80c2e8fb0 CR3=000000000cbd2000 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=03c29c9fa26872a10745b36ec6d5b1f6 XMM02=ec2efd57dc4c00df000000000011b1a8 XMM03=a183b649ec0daf97000000000011b278 XMM04=854e8ce53c18fa1400000000000ae988 XMM05=94356c01ff8fb5620000000000133358 XMM06=00c3ffa147b8d8570000000000132fe0 XMM07=e042d86d42eb936e0000000000121a70 XMM08=a183b649ec0daf97000000000011b278 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000