syzkaller login: [ 30.142683] BUG: Bad rss-counter state mm:00000000ede54170 type:MM_FILEPAGES val:33 [ 30.143905] BUG: Bad rss-counter state mm:00000000ede54170 type:MM_ANONPAGES val:22 [ 30.182037] ================================================================== [ 30.182983] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 30.183959] Read of size 8 at addr ffff888015ced5c8 by task sshd/220 [ 30.184809] [ 30.185029] CPU: 0 PID: 220 Comm: sshd Not tainted 6.4.0-rc7-next-20230620 #1 [ 30.185948] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 30.187017] Call Trace: [ 30.187349] [ 30.187640] dump_stack_lvl+0x91/0xf0 [ 30.188147] print_report+0xcc/0x620 [ 30.188644] ? __virt_addr_valid+0x102/0x340 [ 30.189213] ? vma_interval_tree_remove+0xc75/0xec0 [ 30.189834] ? vma_interval_tree_remove+0xc75/0xec0 [ 30.190463] kasan_report+0xbe/0xf0 [ 30.190942] ? vma_interval_tree_remove+0xc75/0xec0 [ 30.191565] vma_interval_tree_remove+0xc75/0xec0 [ 30.192177] vma_prepare+0xc54/0x11a0 [ 30.192662] __split_vma+0x5af/0x950 [ 30.193139] ? __pfx___split_vma+0x10/0x10 [ 30.193667] ? find_held_lock+0x2c/0x110 [ 30.194214] do_vmi_align_munmap+0x2ba/0x11f0 [ 30.194812] ? lock_is_held_type+0x9f/0x120 [ 30.195356] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 30.195997] ? mtree_range_walk+0x632/0x900 [ 30.196574] ? mas_walk+0x5c7/0x7c0 [ 30.197055] do_vmi_munmap+0x1f1/0x2b0 [ 30.197558] mmap_region+0x1f9/0x2660 [ 30.198057] ? vm_mmap_pgoff+0x15c/0x3a0 [ 30.198593] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 30.199331] ? __pfx_lock_acquire+0x10/0x10 [ 30.199902] ? __pfx_mmap_region+0x10/0x10 [ 30.200468] ? security_mmap_addr+0x7d/0xa0 [ 30.200995] ? get_unmapped_area+0x1f5/0x3f0 [ 30.201551] do_mmap+0x854/0xf00 [ 30.202010] vm_mmap_pgoff+0x1a6/0x3a0 [ 30.202508] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 30.203078] ksys_mmap_pgoff+0x3af/0x500 [ 30.203586] do_syscall_64+0x3f/0x90 [ 30.204064] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 30.204715] RIP: 0033:0x7f02530f0d82 [ 30.205194] 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 [ 30.207400] RSP: 002b:00007fff0a27cc18 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 30.208323] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f02530f0d82 [ 30.209342] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f025252a000 [ 30.210406] RBP: 00007f025252a000 R08: 0000000000000009 R09: 0000000000001000 [ 30.211462] R10: 0000000000000812 R11: 0000000000000206 R12: 0000556136a72ec0 [ 30.212544] R13: 00007fff0a27cc30 R14: 00007fff0a27cc60 R15: 00007fff0a27cfc0 [ 30.213565] [ 30.213909] [ 30.214163] Allocated by task 213: [ 30.214677] kasan_save_stack+0x22/0x50 [ 30.215271] kasan_set_track+0x25/0x30 [ 30.215876] __kasan_slab_alloc+0x59/0x70 [ 30.216527] kmem_cache_alloc+0x16b/0x370 [ 30.217154] vm_area_dup+0x20/0x160 [ 30.217710] __split_vma+0x170/0x950 [ 30.218294] split_vma+0xc6/0x110 [ 30.218809] mprotect_fixup+0x8d2/0xb30 [ 30.219319] do_mprotect_pkey+0x87e/0xd40 [ 30.219864] __x64_sys_mprotect+0x78/0xc0 [ 30.220405] do_syscall_64+0x3f/0x90 [ 30.220906] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 30.221555] [ 30.221774] Freed by task 213: [ 30.222187] kasan_save_stack+0x22/0x50 [ 30.222714] kasan_set_track+0x25/0x30 [ 30.223208] kasan_save_free_info+0x2b/0x50 [ 30.223740] __kasan_slab_free+0x10a/0x190 [ 30.224275] kmem_cache_free+0x10d/0x4d0 [ 30.224784] rcu_core+0x8c8/0x2860 [ 30.225226] __do_softirq+0x1b7/0x7d4 [ 30.225703] [ 30.225917] Last potentially related work creation: [ 30.226543] kasan_save_stack+0x22/0x50 [ 30.227052] __kasan_record_aux_stack+0x8e/0xa0 [ 30.227652] __call_rcu_common.constprop.0+0x6a/0xb90 [ 30.228318] remove_vma+0x139/0x170 [ 30.228788] do_vmi_align_munmap+0xd4a/0x11f0 [ 30.229354] do_vmi_munmap+0x1f1/0x2b0 [ 30.229858] __vm_munmap+0x138/0x3a0 [ 30.230331] __x64_sys_munmap+0x59/0x80 [ 30.230853] do_syscall_64+0x3f/0x90 [ 30.231339] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 30.231987] [ 30.232202] The buggy address belongs to the object at ffff888015ced570 [ 30.232202] which belongs to the cache vm_area_struct of size 168 [ 30.233699] The buggy address is located 88 bytes inside of [ 30.233699] freed 168-byte region [ffff888015ced570, ffff888015ced618) [ 30.235134] [ 30.235351] The buggy address belongs to the physical page: [ 30.236007] page:00000000875a64b0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x15ced [ 30.237095] memcg:ffff88800cbd2401 [ 30.237522] flags: 0x100000000000200(slab|node=0|zone=1) [ 30.238171] page_type: 0xffffffff() [ 30.238625] raw: 0100000000000200 ffff8880087a0c80 dead000000000122 0000000000000000 [ 30.239540] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800cbd2401 [ 30.240455] page dumped because: kasan: bad access detected [ 30.241117] [ 30.241335] Memory state around the buggy address: [ 30.241923] ffff888015ced480: fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 30.242802] ffff888015ced500: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fa fb [ 30.243652] >ffff888015ced580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.244499] ^ [ 30.245161] ffff888015ced600: fb fb fb fc fc fc fc fc fc fc fc fa fb fb fb fb [ 30.246028] ffff888015ced680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.246894] ================================================================== [ 30.248030] Disabling lock debugging due to kernel taint [ 32.185080] BUG: Bad rss-counter state mm:00000000deb678aa type:MM_FILEPAGES val:33 [ 32.186221] BUG: Bad rss-counter state mm:00000000deb678aa type:MM_ANONPAGES val:22 [ 32.737191] BUG: Bad rss-counter state mm:00000000521ba954 type:MM_FILEPAGES val:33 [ 32.738402] BUG: Bad rss-counter state mm:00000000521ba954 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:43811' (ECDSA) to the list of known hosts. 2023/06/21 05:36:48 fuzzer started 2023/06/21 05:36:48 dialing manager at localhost:36067 2023/06/21 05:36:48 checking machine... 2023/06/21 05:36:48 checking revisions... [ 33.330631] kmemleak: Automatic memory scanning thread ended 2023/06/21 05:36:48 testing simple program... [ 33.383969] cgroup: Unknown subsys name 'net' [ 33.451385] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 05:36:48 Registers: info registers vcpu 0 RAX=0000000000000000 RBX=00007f86a647398d RCX=000000000000000d RDX=0000000000000cc0 RSI=00007f86a647398d RDI=00007ffd7a222070 RBP=00007ffd7a222060 RSP=00007ffd7a221b10 R8 =00000000ffffffff R9 =000000000000001b R10=00007f86a6473978 R11=0000000000000000 R12=00007ffd7a222070 R13=00007f86a6473985 R14=00007ffd7a2221b0 R15=00007f86a5ef8560 RIP=00007f86a5da23d4 RFL=00000246 [---Z-P-] 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 00007f86a5944900 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=00007f86a5efc0b0 CR3=0000000015fbc000 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=25252525252525252525252525252525 XMM01=00000000000000000000000000ff00ff XMM02=00000000000000000000000000ff0000 XMM03=0000000000006f7300766e655f6d6170 XMM04=40404040404040404040404040404040 XMM05=5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a XMM06=20202020202020202020202020202020 XMM07=00000000000000000000000000000000 XMM08=2029286e65706f5f7469647561007325 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=0000000000000000 RBX=ec2efd57dc4c00df RCX=00007f0d6be70f68 RDX=0000000000000029 RSI=00007ffd98fdae40 RDI=00007f0d6be70fa8 RBP=0000000000000029 RSP=00007ffd98fdaa18 R8 =0000000000000069 R9 =000000000011cf68 R10=0000000000000002 R11=000000000052545f R12=00007ffd98fdae40 R13=00007ffd98fdaa58 R14=0000559e29d94570 R15=00007ffd98fdaa60 RIP=00007f0d6d2900e2 RFL=00000206 [-----P-] 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 00007f0d6c969900 00000000 00000000 GS =0000 0000000000000000 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=00007f0d6bd72f30 CR3=000000000ebde000 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=ffffffffffffffffffffffffffffffff XMM01=0000000000000000646873733d4d4d4f XMM02=ffffffffffffffffffffffffffffffff XMM03=2f6c616e72756f6a2f676f6c2f6e7572 XMM04=d5e9d6df34577cbb00000000000ae988 XMM05=e19ffe8601b7c45e0000000000132620 XMM06=19e9129bd510f23500000000001314d8 XMM07=00000000000000000000000000000000 XMM08=415453454d49545f454d49544c414552 XMM09=00000000000000000000000000000000 XMM10=20200000000020202020202020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000