syzkaller login: [ 59.392094] BUG: Bad rss-counter state mm:00000000022f3cf9 type:MM_FILEPAGES val:33 [ 59.393612] BUG: Bad rss-counter state mm:00000000022f3cf9 type:MM_ANONPAGES val:22 [ 59.539700] ================================================================== [ 59.540648] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 59.541614] Read of size 8 at addr ffff88800ebce228 by task sshd/221 [ 59.542486] [ 59.542713] CPU: 0 PID: 221 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 59.543598] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 59.544627] Call Trace: [ 59.544950] [ 59.545245] dump_stack_lvl+0x91/0xf0 [ 59.545746] print_report+0xcc/0x620 [ 59.546249] ? __virt_addr_valid+0x102/0x340 [ 59.546817] ? vma_interval_tree_remove+0xc75/0xec0 [ 59.547450] ? vma_interval_tree_remove+0xc75/0xec0 [ 59.548094] kasan_report+0xbe/0xf0 [ 59.548578] ? vma_interval_tree_remove+0xc75/0xec0 [ 59.549222] vma_interval_tree_remove+0xc75/0xec0 [ 59.549828] vma_prepare+0xc54/0x11a0 [ 59.550318] __split_vma+0x5af/0x950 [ 59.550794] ? __pfx___split_vma+0x10/0x10 [ 59.551329] ? find_held_lock+0x2c/0x110 [ 59.551854] do_vmi_align_munmap+0x2ba/0x11f0 [ 59.552437] ? lock_is_held_type+0x9f/0x120 [ 59.552986] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 59.553606] ? mtree_range_walk+0x632/0x900 [ 59.554173] ? mas_walk+0x5c7/0x7c0 [ 59.554655] do_vmi_munmap+0x1f1/0x2b0 [ 59.555156] mmap_region+0x1f9/0x2660 [ 59.555641] ? vm_mmap_pgoff+0x15c/0x3a0 [ 59.556181] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 59.556894] ? __pfx_lock_acquire+0x10/0x10 [ 59.557430] ? __pfx_mmap_region+0x10/0x10 [ 59.557977] ? security_mmap_addr+0x7d/0xa0 [ 59.558512] ? get_unmapped_area+0x1f5/0x3f0 [ 59.559063] do_mmap+0x854/0xf00 [ 59.559503] vm_mmap_pgoff+0x1a6/0x3a0 [ 59.560009] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 59.560591] ksys_mmap_pgoff+0x3af/0x500 [ 59.561099] do_syscall_64+0x3f/0x90 [ 59.561582] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 59.562231] RIP: 0033:0x7f090d7fcd82 [ 59.562693] 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 [ 59.564838] RSP: 002b:00007ffc504cdae8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 59.565748] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f090d7fcd82 [ 59.566618] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f090cc36000 [ 59.567485] RBP: 00007f090cc36000 R08: 0000000000000009 R09: 0000000000001000 [ 59.568371] R10: 0000000000000812 R11: 0000000000000206 R12: 0000563bee6d7f60 [ 59.569235] R13: 00007ffc504cdb00 R14: 00007ffc504cdb30 R15: 00007ffc504cde90 [ 59.570102] [ 59.570398] [ 59.570615] Allocated by task 214: [ 59.571049] kasan_save_stack+0x22/0x50 [ 59.571556] kasan_set_track+0x25/0x30 [ 59.572080] __kasan_slab_alloc+0x59/0x70 [ 59.572610] kmem_cache_alloc+0x16b/0x370 [ 59.573136] vm_area_dup+0x20/0x160 [ 59.573599] __split_vma+0x170/0x950 [ 59.574071] split_vma+0xc6/0x110 [ 59.574516] mprotect_fixup+0x8d2/0xb30 [ 59.575017] do_mprotect_pkey+0x87e/0xd40 [ 59.575545] __x64_sys_mprotect+0x78/0xc0 [ 59.576079] do_syscall_64+0x3f/0x90 [ 59.576556] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 59.577196] [ 59.577410] Freed by task 214: [ 59.577803] kasan_save_stack+0x22/0x50 [ 59.578307] kasan_set_track+0x25/0x30 [ 59.578799] kasan_save_free_info+0x2b/0x50 [ 59.579330] __kasan_slab_free+0x10a/0x190 [ 59.579873] kmem_cache_free+0x10d/0x4d0 [ 59.580389] rcu_core+0x8c8/0x2860 [ 59.580835] __do_softirq+0x1b7/0x7d4 [ 59.581314] [ 59.581531] Last potentially related work creation: [ 59.582120] kasan_save_stack+0x22/0x50 [ 59.582634] __kasan_record_aux_stack+0x8e/0xa0 [ 59.583209] __call_rcu_common.constprop.0+0x6a/0xb90 [ 59.583857] remove_vma+0x139/0x170 [ 59.584333] do_vmi_align_munmap+0xd4a/0x11f0 [ 59.584890] do_vmi_munmap+0x1f1/0x2b0 [ 59.585382] __vm_munmap+0x138/0x3a0 [ 59.585851] __x64_sys_munmap+0x59/0x80 [ 59.586345] do_syscall_64+0x3f/0x90 [ 59.586824] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 59.587463] [ 59.587676] Second to last potentially related work creation: [ 59.588370] kasan_save_stack+0x22/0x50 [ 59.588867] __kasan_record_aux_stack+0x8e/0xa0 [ 59.589442] __call_rcu_common.constprop.0+0x6a/0xb90 [ 59.590089] remove_vma+0x139/0x170 [ 59.590534] do_vmi_align_munmap+0xd4a/0x11f0 [ 59.591092] do_vmi_munmap+0x1f1/0x2b0 [ 59.591582] mmap_region+0x1f9/0x2660 [ 59.592078] do_mmap+0x854/0xf00 [ 59.592506] vm_mmap_pgoff+0x1a6/0x3a0 [ 59.592994] ksys_mmap_pgoff+0x3af/0x500 [ 59.593501] do_syscall_64+0x3f/0x90 [ 59.593978] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 59.594637] [ 59.594867] The buggy address belongs to the object at ffff88800ebce1d0 [ 59.594867] which belongs to the cache vm_area_struct of size 168 [ 59.596437] The buggy address is located 88 bytes inside of [ 59.596437] freed 168-byte region [ffff88800ebce1d0, ffff88800ebce278) [ 59.597913] [ 59.598140] The buggy address belongs to the physical page: [ 59.598834] page:000000002ff509a8 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88800ebce740 pfn:0xebce [ 59.600125] memcg:ffff88800ec92d01 [ 59.600564] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 59.601291] page_type: 0xffffffff() [ 59.601760] raw: 0100000000000200 ffff88800879fc80 0000000000000000 dead000000000001 [ 59.602728] raw: ffff88800ebce740 000000008011000f 00000001ffffffff ffff88800ec92d01 [ 59.603680] page dumped because: kasan: bad access detected [ 59.604405] [ 59.604634] Memory state around the buggy address: [ 59.605249] ffff88800ebce100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 59.606141] ffff88800ebce180: fb fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb [ 59.607035] >ffff88800ebce200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc [ 59.607926] ^ [ 59.608515] ffff88800ebce280: fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb fb [ 59.609411] ffff88800ebce300: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc [ 59.610302] ================================================================== [ 59.611318] Disabling lock debugging due to kernel taint [ 61.370715] BUG: Bad rss-counter state mm:000000000625604b type:MM_FILEPAGES val:33 [ 61.371331] BUG: Bad rss-counter state mm:000000000625604b type:MM_ANONPAGES val:22 [ 61.833844] BUG: Bad rss-counter state mm:000000008303a72a type:MM_FILEPAGES val:33 [ 61.834780] BUG: Bad rss-counter state mm:000000008303a72a type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:1326' (ECDSA) to the list of known hosts. 2023/06/19 22:34:01 fuzzer started 2023/06/19 22:34:01 dialing manager at localhost:44161 2023/06/19 22:34:01 checking machine... 2023/06/19 22:34:01 checking revisions... [ 62.609828] kmemleak: Automatic memory scanning thread ended 2023/06/19 22:34:01 testing simple program... [ 62.651286] cgroup: Unknown subsys name 'net' [ 62.691229] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 22:33:32 Registers: info registers vcpu 0 RAX=0000000000000000 RBX=ffff88800fb4a5a5 RCX=1ffff11001f694a0 RDX=0000000000000004 RSI=ffff88800fdda304 RDI=ffff88800fb4a59c RBP=0000000000000000 RSP=ffff888015be7680 R8 =0000000000000001 R9 =ffff88800fb4a59c R10=ffff88800fb4a553 R11=00000000000b6996 R12=dffffc0000000000 R13=ffff88800fb4a5ac R14=ffff88800fb4a59c R15=ffff88800fb4a4c0 RIP=ffffffff844d2b6b 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 00007f5f4f2dc900 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=00007ffd6b8f0000 CR3=0000000016e74000 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=74696d7265705f6d61703d73726f746e XMM02=000000000000000000000000000000ff XMM03=5320444f4854454d5f54505952434e45 XMM04=40404040404040404040404040404040 XMM05=5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a XMM06=20202020202020202020202020202020 XMM07=00000000000000000000000000000000 XMM08=61662029286e65706f5f746964756100 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=ffff888008e57d38 RBX=0000000000000001 RCX=0000000000000001 RDX=ffff888008e57c01 RSI=ffff888008e57cf0 RDI=ffff888008e57cf0 RBP=ffff888008e579d0 RSP=ffff888008e57908 R8 =0000000000000001 R9 =ffff888008e579b8 R10=0000000000038001 R11=0000000000020dae R12=ffff888008e579d8 R13=ffff888008e579c0 R14=ffff888008e57cf0 R15=ffff888008e57978 RIP=ffffffff81131236 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=00007fd88f815c30 CR3=0000000009d7e000 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=2030303a34333a3232203931206e754a XMM01=73732878696e755f6d6170203a5d3033 XMM02=65736f6c63206e6f6973736573203a29 XMM03=755f6d6170203a5d3033325b64687373 XMM04=69662068637573206f4e203a656c6163 XMM05=3a656c696620766e65206e65706f206f XMM06=65733a6468737328766e655f6d617020 XMM07=6b7a79732030303a34333a3232203931 XMM08=3d656e696c646d632022656369767265 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000