syzkaller login: [ 28.721503] BUG: Bad rss-counter state mm:000000006aba7340 type:MM_FILEPAGES val:33 [ 28.723226] BUG: Bad rss-counter state mm:000000006aba7340 type:MM_ANONPAGES val:22 [ 28.884598] ================================================================== [ 28.885703] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 28.886828] Read of size 8 at addr ffff88800d4ac140 by task sshd/221 [ 28.887857] [ 28.888077] CPU: 0 PID: 221 Comm: sshd Not tainted 6.4.0-rc7-next-20230620 #1 [ 28.888958] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 28.889969] Call Trace: [ 28.890293] [ 28.890580] dump_stack_lvl+0x91/0xf0 [ 28.891086] print_report+0xcc/0x620 [ 28.891573] ? __virt_addr_valid+0x102/0x340 [ 28.892138] ? vma_interval_tree_remove+0xc75/0xec0 [ 28.892790] ? vma_interval_tree_remove+0xc75/0xec0 [ 28.893423] kasan_report+0xbe/0xf0 [ 28.893905] ? vma_interval_tree_remove+0xc75/0xec0 [ 28.894533] vma_interval_tree_remove+0xc75/0xec0 [ 28.895152] vma_prepare+0xc54/0x11a0 [ 28.895641] __split_vma+0x5af/0x950 [ 28.896129] ? __pfx___split_vma+0x10/0x10 [ 28.896691] ? find_held_lock+0x2c/0x110 [ 28.897220] do_vmi_align_munmap+0x2ba/0x11f0 [ 28.897795] ? lock_is_held_type+0x9f/0x120 [ 28.898336] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 28.898944] ? mtree_range_walk+0x632/0x900 [ 28.899503] ? mas_walk+0x5c7/0x7c0 [ 28.899993] do_vmi_munmap+0x1f1/0x2b0 [ 28.900514] mmap_region+0x1f9/0x2660 [ 28.900999] ? vm_mmap_pgoff+0x15c/0x3a0 [ 28.901520] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 28.902249] ? __pfx_lock_acquire+0x10/0x10 [ 28.902784] ? __pfx_mmap_region+0x10/0x10 [ 28.903316] ? security_mmap_addr+0x7d/0xa0 [ 28.903856] ? get_unmapped_area+0x1f5/0x3f0 [ 28.904430] do_mmap+0x854/0xf00 [ 28.904874] vm_mmap_pgoff+0x1a6/0x3a0 [ 28.905377] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 28.905950] ksys_mmap_pgoff+0x3af/0x500 [ 28.906462] do_syscall_64+0x3f/0x90 [ 28.906964] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 28.907615] RIP: 0033:0x7ff76dbcfd82 [ 28.908086] 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 [ 28.910228] RSP: 002b:00007ffc8b640828 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 28.911145] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007ff76dbcfd82 [ 28.912019] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007ff76d009000 [ 28.912886] RBP: 00007ff76d009000 R08: 0000000000000009 R09: 0000000000001000 [ 28.913741] R10: 0000000000000812 R11: 0000000000000206 R12: 000055fe9a432ec0 [ 28.914590] R13: 00007ffc8b640840 R14: 00007ffc8b640870 R15: 00007ffc8b640bd0 [ 28.915467] [ 28.915762] [ 28.915982] Allocated by task 214: [ 28.916423] kasan_save_stack+0x22/0x50 [ 28.916941] kasan_set_track+0x25/0x30 [ 28.917439] __kasan_slab_alloc+0x59/0x70 [ 28.917969] kmem_cache_alloc+0x16b/0x370 [ 28.918486] vm_area_dup+0x20/0x160 [ 28.918946] __split_vma+0x170/0x950 [ 28.919419] split_vma+0xc6/0x110 [ 28.919869] mprotect_fixup+0x8d2/0xb30 [ 28.920390] do_mprotect_pkey+0x87e/0xd40 [ 28.920916] __x64_sys_mprotect+0x78/0xc0 [ 28.921449] do_syscall_64+0x3f/0x90 [ 28.921927] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 28.922580] [ 28.922800] Freed by task 214: [ 28.923204] kasan_save_stack+0x22/0x50 [ 28.923710] kasan_set_track+0x25/0x30 [ 28.924205] kasan_save_free_info+0x2b/0x50 [ 28.924762] __kasan_slab_free+0x10a/0x190 [ 28.925303] kmem_cache_free+0x10d/0x4d0 [ 28.925818] rcu_core+0x8c8/0x2860 [ 28.926271] __do_softirq+0x1b7/0x7d4 [ 28.926752] [ 28.926967] Last potentially related work creation: [ 28.927576] kasan_save_stack+0x22/0x50 [ 28.928082] __kasan_record_aux_stack+0x8e/0xa0 [ 28.928669] __call_rcu_common.constprop.0+0x6a/0xb90 [ 28.929320] remove_vma+0x139/0x170 [ 28.929776] do_vmi_align_munmap+0xd4a/0x11f0 [ 28.930340] do_vmi_munmap+0x1f1/0x2b0 [ 28.930828] __vm_munmap+0x138/0x3a0 [ 28.931297] __x64_sys_munmap+0x59/0x80 [ 28.931796] do_syscall_64+0x3f/0x90 [ 28.932274] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 28.932932] [ 28.933147] Second to last potentially related work creation: [ 28.933828] kasan_save_stack+0x22/0x50 [ 28.934335] __kasan_record_aux_stack+0x8e/0xa0 [ 28.934916] __call_rcu_common.constprop.0+0x6a/0xb90 [ 28.935572] remove_vma+0x139/0x170 [ 28.936036] do_vmi_align_munmap+0xd4a/0x11f0 [ 28.936615] do_vmi_munmap+0x1f1/0x2b0 [ 28.937121] mmap_region+0x1f9/0x2660 [ 28.937599] do_mmap+0x854/0xf00 [ 28.938038] vm_mmap_pgoff+0x1a6/0x3a0 [ 28.938528] ksys_mmap_pgoff+0x3af/0x500 [ 28.939031] do_syscall_64+0x3f/0x90 [ 28.939508] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 28.940167] [ 28.940392] The buggy address belongs to the object at ffff88800d4ac0e8 [ 28.940392] which belongs to the cache vm_area_struct of size 168 [ 28.941874] The buggy address is located 88 bytes inside of [ 28.941874] freed 168-byte region [ffff88800d4ac0e8, ffff88800d4ac190) [ 28.943293] [ 28.943513] The buggy address belongs to the physical page: [ 28.944186] page:00000000ee672ca6 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xd4ac [ 28.945284] memcg:ffff88800c677401 [ 28.945718] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 28.946417] page_type: 0xffffffff() [ 28.946871] raw: 0100000000000200 ffff8880087a0c80 ffffea0000395540 dead000000000005 [ 28.947799] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800c677401 [ 28.948727] page dumped because: kasan: bad access detected [ 28.949395] [ 28.949615] Memory state around the buggy address: [ 28.950194] ffff88800d4ac000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 28.951057] ffff88800d4ac080: 00 00 00 00 00 fc fc fc fc fc fc fc fc fa fb fb [ 28.951913] >ffff88800d4ac100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.952784] ^ [ 28.953423] ffff88800d4ac180: fb fb fc fc fc fc fc fc fc fc 00 00 00 00 00 00 [ 28.954284] ffff88800d4ac200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 28.955140] ================================================================== [ 28.956194] Disabling lock debugging due to kernel taint [ 31.177047] BUG: Bad rss-counter state mm:000000005d6421f0 type:MM_FILEPAGES val:33 [ 31.178217] BUG: Bad rss-counter state mm:000000005d6421f0 type:MM_ANONPAGES val:22 [ 31.540675] BUG: Bad rss-counter state mm:000000004e876d7d type:MM_FILEPAGES val:33 [ 31.541765] BUG: Bad rss-counter state mm:000000004e876d7d type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:4858' (ECDSA) to the list of known hosts. 2023/06/20 13:37:45 fuzzer started 2023/06/20 13:37:45 dialing manager at localhost:36067 2023/06/20 13:37:45 checking machine... 2023/06/20 13:37:45 checking revisions... [ 32.239377] kmemleak: Automatic memory scanning thread ended 2023/06/20 13:37:46 testing simple program... [ 32.291969] cgroup: Unknown subsys name 'net' [ 32.335303] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 13:37:45 Registers: info registers vcpu 0 RAX=ffff88800da26608 RBX=ffff88800da26600 RCX=0000000000000000 RDX=ffff888015ebd1c0 RSI=ffffffff844a4e91 RDI=ffff88800da266f0 RBP=ffff88800da26608 RSP=ffff888015d1fcc8 R8 =0000000000000005 R9 =0000000000000003 R10=0000000000000003 R11=0000000000000000 R12=0000000000000000 R13=0000000000000006 R14=0000000000000000 R15=00007f6074f91fff RIP=ffffffff844a4e94 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 =0000 0000000000000000 00000000 00000000 DS =0000 0000000000000000 00000000 00000000 FS =0000 00007f60749b1900 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=00007f6073e0c950 CR3=0000000009a0a000 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=454d49544c4145525f454352554f535f XMM01=3d504d415453454d49545f454d49544c XMM02=ffffffffffffffffffffffffffffffff XMM03=2f6c616e72756f6a2f676f6c2f6e7572 XMM04=796270a98efdd6e700000000000ae988 XMM05=424577d6377410a60000000000133560 XMM06=312b291fc7d350f40000000000132608 XMM07=00000000000000000000000000000000 XMM08=415453454d49545f454d49544c414552 XMM09=00000000000000000000000000000000 XMM10=20200000000020202020202020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=0000000001158a3c RBX=0000000000039500 RCX=1ffff1100d9e7416 RDX=0000000001158a3c RSI=0000000000000000 RDI=ffff88806cf3a0b0 RBP=ffff88806cf39500 RSP=ffff88806cf09d98 R8 =0000000000000007 R9 =0000000000000000 R10=0000000000000000 R11=ffff88806cf09ff8 R12=ffff888008d951c0 R13=ffff88806cf2c240 R14=0000000000000000 R15=dffffc0000000000 RIP=ffffffff8129a230 RFL=00000046 [---Z-P-] 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=00007ffdf98455e8 CR3=0000000014422000 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=2035343a37333a3331203032206e754a XMM01=657463656e6e6f63736944203a5d3133 XMM02=302e303120746f6f722072657375206d XMM03=203a5d3133325b646873732072656c6c XMM04=69662068637573206f4e203a656c6163 XMM05=3a656c696620766e65206e65706f206f XMM06=65733a6468737328766e655f6d617020 XMM07=6b7a79732035343a37333a3331203032 XMM08=3d656e696c646d632022656369767265 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000