syzkaller login: [ 39.377804] BUG: Bad rss-counter state mm:00000000c316f399 type:MM_FILEPAGES val:33 [ 39.379210] BUG: Bad rss-counter state mm:00000000c316f399 type:MM_ANONPAGES val:22 [ 39.416979] ================================================================== [ 39.417964] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 39.418886] Read of size 8 at addr ffff88800d551798 by task sshd/221 [ 39.419649] [ 39.419867] CPU: 0 PID: 221 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 39.420724] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 39.421729] Call Trace: [ 39.422045] [ 39.422338] dump_stack_lvl+0x91/0xf0 [ 39.422829] print_report+0xcc/0x620 [ 39.423316] ? __virt_addr_valid+0x102/0x340 [ 39.423868] ? vma_interval_tree_remove+0xc75/0xec0 [ 39.424484] ? vma_interval_tree_remove+0xc75/0xec0 [ 39.425112] kasan_report+0xbe/0xf0 [ 39.425596] ? vma_interval_tree_remove+0xc75/0xec0 [ 39.426214] vma_interval_tree_remove+0xc75/0xec0 [ 39.426810] vma_prepare+0xc54/0x11a0 [ 39.427288] __split_vma+0x5af/0x950 [ 39.427756] ? __pfx___split_vma+0x10/0x10 [ 39.428278] ? find_held_lock+0x2c/0x110 [ 39.428800] do_vmi_align_munmap+0x2ba/0x11f0 [ 39.429381] ? lock_is_held_type+0x9f/0x120 [ 39.429910] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 39.430518] ? mtree_range_walk+0x632/0x900 [ 39.431060] ? mas_walk+0x5c7/0x7c0 [ 39.431529] do_vmi_munmap+0x1f1/0x2b0 [ 39.432024] mmap_region+0x1f9/0x2660 [ 39.432500] ? mark_held_locks+0x9e/0xe0 [ 39.433024] ? lockdep_hardirqs_on_prepare+0x27b/0x3f0 [ 39.433662] ? asm_common_interrupt+0x26/0x40 [ 39.434241] ? __pfx_mmap_region+0x10/0x10 [ 39.434760] ? asm_common_interrupt+0x26/0x40 [ 39.435329] ? do_mmap+0xb83/0xf00 [ 39.435782] do_mmap+0x854/0xf00 [ 39.436219] vm_mmap_pgoff+0x1a6/0x3a0 [ 39.436714] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 39.437283] ksys_mmap_pgoff+0x3af/0x500 [ 39.437783] do_syscall_64+0x3f/0x90 [ 39.438252] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 39.438897] RIP: 0033:0x7fb3fd6ead82 [ 39.439351] 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 [ 39.441482] RSP: 002b:00007ffc6ec2a6b8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 39.442373] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fb3fd6ead82 [ 39.443213] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fb3fcb24000 [ 39.444057] RBP: 00007fb3fcb24000 R08: 0000000000000009 R09: 0000000000001000 [ 39.445054] R10: 0000000000000812 R11: 0000000000000206 R12: 000055d8a8203ec0 [ 39.445896] R13: 00007ffc6ec2a6d0 R14: 00007ffc6ec2a700 R15: 00007ffc6ec2aa60 [ 39.446757] [ 39.447048] [ 39.447265] Allocated by task 214: [ 39.447689] kasan_save_stack+0x22/0x50 [ 39.448201] kasan_set_track+0x25/0x30 [ 39.448693] __kasan_slab_alloc+0x59/0x70 [ 39.449240] kmem_cache_alloc+0x16b/0x370 [ 39.449756] vm_area_dup+0x20/0x160 [ 39.450206] __split_vma+0x170/0x950 [ 39.450669] split_vma+0xc6/0x110 [ 39.451118] mprotect_fixup+0x8d2/0xb30 [ 39.451617] do_mprotect_pkey+0x87e/0xd40 [ 39.452133] __x64_sys_mprotect+0x78/0xc0 [ 39.452651] do_syscall_64+0x3f/0x90 [ 39.453125] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 39.453765] [ 39.453979] Freed by task 214: [ 39.454368] kasan_save_stack+0x22/0x50 [ 39.454868] kasan_set_track+0x25/0x30 [ 39.455359] kasan_save_free_info+0x2b/0x50 [ 39.455885] __kasan_slab_free+0x10a/0x190 [ 39.456420] kmem_cache_free+0x10d/0x4d0 [ 39.456931] rcu_core+0x8c8/0x2860 [ 39.457373] __do_softirq+0x1b7/0x7d4 [ 39.457843] [ 39.458055] Last potentially related work creation: [ 39.458638] kasan_save_stack+0x22/0x50 [ 39.459136] __kasan_record_aux_stack+0x8e/0xa0 [ 39.459703] __call_rcu_common.constprop.0+0x6a/0xb90 [ 39.460339] remove_vma+0x139/0x170 [ 39.460789] do_vmi_align_munmap+0xd4a/0x11f0 [ 39.461364] do_vmi_munmap+0x1f1/0x2b0 [ 39.461851] __vm_munmap+0x138/0x3a0 [ 39.462314] __x64_sys_munmap+0x59/0x80 [ 39.462809] do_syscall_64+0x3f/0x90 [ 39.463280] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 39.463920] [ 39.464133] Second to last potentially related work creation: [ 39.464808] kasan_save_stack+0x22/0x50 [ 39.465316] __kasan_record_aux_stack+0x8e/0xa0 [ 39.465892] __call_rcu_common.constprop.0+0x6a/0xb90 [ 39.466533] remove_vma+0x139/0x170 [ 39.466979] do_vmi_align_munmap+0xd4a/0x11f0 [ 39.467539] do_vmi_munmap+0x1f1/0x2b0 [ 39.468026] mmap_region+0x1f9/0x2660 [ 39.468497] do_mmap+0x854/0xf00 [ 39.468934] vm_mmap_pgoff+0x1a6/0x3a0 [ 39.469421] ksys_mmap_pgoff+0x3af/0x500 [ 39.469919] do_syscall_64+0x3f/0x90 [ 39.470391] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 39.471026] [ 39.471242] The buggy address belongs to the object at ffff88800d551740 [ 39.471242] which belongs to the cache vm_area_struct of size 168 [ 39.472704] The buggy address is located 88 bytes inside of [ 39.472704] freed 168-byte region [ffff88800d551740, ffff88800d5517e8) [ 39.474119] [ 39.474333] The buggy address belongs to the physical page: [ 39.474989] page:00000000a33f61e0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xd551 [ 39.476073] memcg:ffff88800ede6501 [ 39.476493] flags: 0x100000000000200(slab|node=0|zone=1) [ 39.477144] page_type: 0xffffffff() [ 39.477594] raw: 0100000000000200 ffff88800879fc80 dead000000000100 dead000000000122 [ 39.478520] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800ede6501 [ 39.479415] page dumped because: kasan: bad access detected [ 39.480068] [ 39.480282] Memory state around the buggy address: [ 39.480870] ffff88800d551680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 39.481722] ffff88800d551700: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 39.482614] >ffff88800d551780: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc [ 39.483476] ^ [ 39.483975] ffff88800d551800: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 [ 39.484855] ffff88800d551880: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc [ 39.485709] ================================================================== [ 39.486931] Disabling lock debugging due to kernel taint [ 41.409560] BUG: Bad rss-counter state mm:0000000084772f77 type:MM_FILEPAGES val:33 [ 41.410582] BUG: Bad rss-counter state mm:0000000084772f77 type:MM_ANONPAGES val:22 [ 41.856302] BUG: Bad rss-counter state mm:00000000629a2d48 type:MM_FILEPAGES val:33 [ 41.857949] BUG: Bad rss-counter state mm:00000000629a2d48 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:9191' (ECDSA) to the list of known hosts. 2023/06/19 18:51:14 fuzzer started 2023/06/19 18:51:15 dialing manager at localhost:44161 2023/06/19 18:51:15 checking machine... 2023/06/19 18:51:15 checking revisions... [ 42.545801] kmemleak: Automatic memory scanning thread ended 2023/06/19 18:51:15 testing simple program... [ 42.591911] cgroup: Unknown subsys name 'net' [ 42.650385] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 18:51:14 Registers: info registers vcpu 0 RAX=dffffc0000000000 RBX=0000000000000001 RCX=ffffffff818ad8c9 RDX=0000000000008ad8 RSI=0000000000008ad8 RDI=ffffffff8650a720 RBP=ffff88806ce09af0 RSP=ffff88806ce09a28 R8 =0000000000000000 R9 =ffff88806ce09ad8 R10=0000000000038001 R11=0000000000023842 R12=ffff88806ce09af8 R13=ffff88806ce09ae0 R14=ffff88806ce09ad9 R15=ffff88806ce09a98 RIP=ffffffff8113077a RFL=00000216 [----AP-] 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 00007f85f5a53900 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=00007f85f4ed79e0 CR3=000000000c638000 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=ffffffffffffffffffffffffffffffff XMM01=30306234386136303638616663356134 XMM02=38303062343861363036386166633561 XMM03=2f6c616e72756f6a2f676f6c2f6e7572 XMM04=c42a3b32ad79484e00000000000ae988 XMM05=b014a8a2d74cb5b600000000001367d8 XMM06=c291bd5c70af25b90000000000135258 XMM07=00000000000000000000000000000000 XMM08=415453454d49545f454d49544c414552 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=000000000000002d RBX=0000000000000040 RCX=00007ff1ec3630a6 RDX=000000000000231c RSI=00007ffcc2ff6f20 RDI=0000000000000008 RBP=0000000000000008 RSP=00007ffcc2ff4b48 R8 =00007ffcc2ff4b6c R9 =00007ffcc2ff4b68 R10=0000000000000040 R11=0000000000000246 R12=00007ffcc2ff6f20 R13=00007ffcc2ff4b68 R14=00007ffcc2ff4b6c R15=00007ffcc2ff6f10 RIP=ffffffff84600010 RFL=00000002 [-------] 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 00007ff1ebe70900 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=00007ffcc2ff5000 CR3=000000000e6b6000 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=635f6e6f69737365733a4d41503d706f XMM01=6f6c5f6d61702c78756e696c65735f6d XMM02=61702c74696d7265705f6d61702c7469 XMM03=655f6d61702c7374696d696c5f6d6170 XMM04=3d6c616e696d72657420322e322e302e XMM05=3d656d616e74736f682022646873732f XMM06=746f6f72223d746363612078756e696c XMM07=6e655f6d61702c7374696d696c5f6d61 XMM08=652075253d64692073253d706f000000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000