syzkaller login: [ 32.648310] BUG: Bad rss-counter state mm:00000000217b5265 type:MM_FILEPAGES val:33 [ 32.649973] BUG: Bad rss-counter state mm:00000000217b5265 type:MM_ANONPAGES val:22 [ 32.807801] ================================================================== [ 32.808865] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 32.810050] Read of size 8 at addr ffff888013a46b38 by task sshd/218 [ 32.811143] [ 32.811430] CPU: 0 PID: 218 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 32.812457] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 32.813673] Call Trace: [ 32.814084] [ 32.814459] dump_stack_lvl+0x91/0xf0 [ 32.815043] print_report+0xcc/0x620 [ 32.815645] ? __virt_addr_valid+0x102/0x340 [ 32.816315] ? vma_interval_tree_remove+0xc75/0xec0 [ 32.817048] ? vma_interval_tree_remove+0xc75/0xec0 [ 32.817847] kasan_report+0xbe/0xf0 [ 32.818414] ? vma_interval_tree_remove+0xc75/0xec0 [ 32.819160] vma_interval_tree_remove+0xc75/0xec0 [ 32.819891] vma_prepare+0xc54/0x11a0 [ 32.820470] __split_vma+0x5af/0x950 [ 32.821033] ? __pfx___split_vma+0x10/0x10 [ 32.821662] ? find_held_lock+0x2c/0x110 [ 32.822325] do_vmi_align_munmap+0x2ba/0x11f0 [ 32.823021] ? lock_is_held_type+0x9f/0x120 [ 32.823728] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 32.824463] ? mtree_range_walk+0x632/0x900 [ 32.825148] ? mas_walk+0x5c7/0x7c0 [ 32.825725] do_vmi_munmap+0x1f1/0x2b0 [ 32.826381] mmap_region+0x1f9/0x2660 [ 32.826968] ? vm_mmap_pgoff+0x15c/0x3a0 [ 32.827588] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 32.828340] ? __pfx_lock_acquire+0x10/0x10 [ 32.828855] ? __pfx_mmap_region+0x10/0x10 [ 32.829354] ? security_mmap_addr+0x7d/0xa0 [ 32.829855] ? get_unmapped_area+0x1f5/0x3f0 [ 32.830377] do_mmap+0x854/0xf00 [ 32.830788] vm_mmap_pgoff+0x1a6/0x3a0 [ 32.831258] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 32.831816] ksys_mmap_pgoff+0x3af/0x500 [ 32.832302] do_syscall_64+0x3f/0x90 [ 32.832750] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 32.833358] RIP: 0033:0x7f726046ad82 [ 32.833790] 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 [ 32.835842] RSP: 002b:00007ffcfb863288 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 32.836767] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f726046ad82 [ 32.837574] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f725f8a4000 [ 32.838417] RBP: 00007f725f8a4000 R08: 0000000000000009 R09: 0000000000001000 [ 32.839288] R10: 0000000000000812 R11: 0000000000000206 R12: 000055ec7f2d2f70 [ 32.840128] R13: 00007ffcfb8632a0 R14: 00007ffcfb8632d0 R15: 00007ffcfb863630 [ 32.840950] [ 32.841244] [ 32.841457] Allocated by task 211: [ 32.841874] kasan_save_stack+0x22/0x50 [ 32.842417] kasan_set_track+0x25/0x30 [ 32.842896] __kasan_slab_alloc+0x59/0x70 [ 32.843404] kmem_cache_alloc+0x16b/0x370 [ 32.843902] vm_area_dup+0x20/0x160 [ 32.844339] __split_vma+0x170/0x950 [ 32.844797] split_vma+0xc6/0x110 [ 32.845260] mprotect_fixup+0x8d2/0xb30 [ 32.845738] do_mprotect_pkey+0x87e/0xd40 [ 32.846292] __x64_sys_mprotect+0x78/0xc0 [ 32.846790] do_syscall_64+0x3f/0x90 [ 32.847234] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 32.847877] [ 32.848090] Freed by task 211: [ 32.848467] kasan_save_stack+0x22/0x50 [ 32.848959] kasan_set_track+0x25/0x30 [ 32.849440] kasan_save_free_info+0x2b/0x50 [ 32.849958] __kasan_slab_free+0x10a/0x190 [ 32.850514] kmem_cache_free+0x10d/0x4d0 [ 32.851007] rcu_core+0x8c8/0x2860 [ 32.851490] __do_softirq+0x1b7/0x7d4 [ 32.851958] [ 32.852166] Last potentially related work creation: [ 32.852732] kasan_save_stack+0x22/0x50 [ 32.853224] __kasan_record_aux_stack+0x8e/0xa0 [ 32.853772] __call_rcu_common.constprop.0+0x6a/0xb90 [ 32.854431] remove_vma+0x139/0x170 [ 32.854866] do_vmi_align_munmap+0xd4a/0x11f0 [ 32.855456] do_vmi_munmap+0x1f1/0x2b0 [ 32.855928] __vm_munmap+0x138/0x3a0 [ 32.856386] __x64_sys_munmap+0x59/0x80 [ 32.856871] do_syscall_64+0x3f/0x90 [ 32.857325] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 32.857938] [ 32.858171] Second to last potentially related work creation: [ 32.858845] kasan_save_stack+0x22/0x50 [ 32.859401] __kasan_record_aux_stack+0x8e/0xa0 [ 32.859956] __call_rcu_common.constprop.0+0x6a/0xb90 [ 32.860571] remove_vma+0x139/0x170 [ 32.861013] do_vmi_align_munmap+0xd4a/0x11f0 [ 32.861579] do_vmi_munmap+0x1f1/0x2b0 [ 32.862047] mmap_region+0x1f9/0x2660 [ 32.862541] do_mmap+0x854/0xf00 [ 32.862951] vm_mmap_pgoff+0x1a6/0x3a0 [ 32.863415] ksys_mmap_pgoff+0x3af/0x500 [ 32.863891] do_syscall_64+0x3f/0x90 [ 32.864341] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 32.864946] [ 32.865152] The buggy address belongs to the object at ffff888013a46ae0 [ 32.865152] which belongs to the cache vm_area_struct of size 168 [ 32.866560] The buggy address is located 88 bytes inside of [ 32.866560] freed 168-byte region [ffff888013a46ae0, ffff888013a46b88) [ 32.867879] [ 32.868088] The buggy address belongs to the physical page: [ 32.868737] page:0000000079a67d23 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13a46 [ 32.869797] memcg:ffff888016d2e701 [ 32.870208] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 32.870890] page_type: 0xffffffff() [ 32.871340] raw: 0100000000000200 ffff88800879fc80 ffffea00005a6ac0 dead000000000007 [ 32.872239] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff888016d2e701 [ 32.873120] page dumped because: kasan: bad access detected [ 32.873766] [ 32.873973] Memory state around the buggy address: [ 32.874533] ffff888013a46a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 32.875376] ffff888013a46a80: 00 00 00 00 fc fc fc fc fc fc fc fc fa fb fb fb [ 32.876212] >ffff888013a46b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.877043] ^ [ 32.877646] ffff888013a46b80: fb fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 [ 32.878480] ffff888013a46c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc [ 32.879315] ================================================================== [ 32.880330] Disabling lock debugging due to kernel taint [ 34.908329] BUG: Bad rss-counter state mm:0000000049699a70 type:MM_FILEPAGES val:33 [ 34.909564] BUG: Bad rss-counter state mm:0000000049699a70 type:MM_ANONPAGES val:22 [ 35.323695] BUG: Bad rss-counter state mm:0000000064041144 type:MM_FILEPAGES val:33 [ 35.324809] BUG: Bad rss-counter state mm:0000000064041144 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:27932' (ECDSA) to the list of known hosts. 2023/06/20 03:50:34 fuzzer started 2023/06/20 03:50:34 dialing manager at localhost:44161 2023/06/20 03:50:34 checking machine... 2023/06/20 03:50:34 checking revisions... [ 36.042510] kmemleak: Automatic memory scanning thread ended 2023/06/20 03:50:34 testing simple program... [ 36.079806] cgroup: Unknown subsys name 'net' [ 36.117830] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 03:50:30 Registers: info registers vcpu 0 RAX=dffffc0000000000 RBX=0000000000000001 RCX=ffffffff8614b950 RDX=1ffff110028e3e7f RSI=0000000000000001 RDI=0000000000000001 RBP=ffff88801471f408 RSP=ffff88801471f340 R8 =ffffffff8614b954 R9 =ffff88801471f3f0 R10=0000000000038001 R11=0000000000024396 R12=ffff88801471f410 R13=ffff88801471f3f8 R14=0000000000000005 R15=ffff88801471f3b0 RIP=ffffffff81130b54 RFL=00000246 [---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 00007f06e0b1a900 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=00007f06dff06d90 CR3=0000000009a6e000 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=cdb37345fb92f56900000000000ae988 XMM05=853249a8c543362800000000001367b0 XMM06=806171799158d96700000000001355a0 XMM07=00000000000000000000000000000000 XMM08=415453454d49545f454d49544c414552 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=000000000008b7e4 RBX=0000000000000001 RCX=ffffffff83677d47 RDX=000000000008b7e4 RSI=000000000002677d RDI=00000000001a27ac RBP=ffff8880102876d8 RSP=ffff888010287610 R8 =ffffffff863b7324 R9 =ffff8880102876c0 R10=0000000000038001 R11=000000000008b7e4 R12=ffff8880102876e0 R13=ffff8880102876c8 R14=ffff8880102876c1 R15=ffff888010287680 RIP=ffffffff81130843 RFL=00000246 [---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 00007f8502ab9900 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=0000558b97d21954 CR3=000000000e4a4000 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=6720646572637465733a4d41503d706f XMM01=652022746f6f72223d74636361207469 XMM02=3d6c616e696d72657420322e322e302e XMM03=3d656d616e74736f682022646873732f XMM04=40404040404040404040404040404040 XMM05=5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a XMM06=20202020202020202020202020202020 XMM07=00000000000000000000000000000000 XMM08=652075253d64692073253d706f000000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000