syzkaller login: [ 37.954211] BUG: Bad rss-counter state mm:000000001609eb47 type:MM_FILEPAGES val:33 [ 37.955444] BUG: Bad rss-counter state mm:000000001609eb47 type:MM_ANONPAGES val:22 [ 37.993187] ================================================================== [ 37.994238] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 37.995213] Read of size 8 at addr ffff888008dcba50 by task sshd/227 [ 37.996042] [ 37.996270] CPU: 0 PID: 227 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 37.997204] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 37.998212] Call Trace: [ 37.998555] [ 37.998845] dump_stack_lvl+0x91/0xf0 [ 37.999348] print_report+0xcc/0x620 [ 37.999879] ? __virt_addr_valid+0x102/0x340 [ 38.000477] ? vma_interval_tree_remove+0xc75/0xec0 [ 38.001123] ? vma_interval_tree_remove+0xc75/0xec0 [ 38.001796] kasan_report+0xbe/0xf0 [ 38.002285] ? vma_interval_tree_remove+0xc75/0xec0 [ 38.003025] vma_interval_tree_remove+0xc75/0xec0 [ 38.003648] vma_prepare+0xc54/0x11a0 [ 38.004148] __split_vma+0x5af/0x950 [ 38.004670] ? __pfx___split_vma+0x10/0x10 [ 38.005240] ? find_held_lock+0x2c/0x110 [ 38.005792] do_vmi_align_munmap+0x2ba/0x11f0 [ 38.006376] ? lock_is_held_type+0x9f/0x120 [ 38.006938] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 38.007586] ? mtree_range_walk+0x632/0x900 [ 38.008150] ? mas_walk+0x5c7/0x7c0 [ 38.008668] do_vmi_munmap+0x1f1/0x2b0 [ 38.009173] mmap_region+0x1f9/0x2660 [ 38.009692] ? mark_held_locks+0x9e/0xe0 [ 38.010214] ? lockdep_hardirqs_on_prepare+0x27b/0x3f0 [ 38.010889] ? asm_common_interrupt+0x26/0x40 [ 38.011490] ? __pfx_mmap_region+0x10/0x10 [ 38.012034] ? asm_common_interrupt+0x26/0x40 [ 38.012665] ? do_mmap+0x393/0xf00 [ 38.013132] do_mmap+0x854/0xf00 [ 38.013607] vm_mmap_pgoff+0x1a6/0x3a0 [ 38.014115] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 38.014698] ksys_mmap_pgoff+0x3af/0x500 [ 38.015219] do_syscall_64+0x3f/0x90 [ 38.015716] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.016415] RIP: 0033:0x7f2a548f0d82 [ 38.016937] 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 [ 38.019245] RSP: 002b:00007ffd56c6b638 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 38.020223] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f2a548f0d82 [ 38.021168] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f2a53d2a000 [ 38.022069] RBP: 00007f2a53d2a000 R08: 0000000000000009 R09: 0000000000001000 [ 38.022974] R10: 0000000000000812 R11: 0000000000000206 R12: 0000563a68bf2ec0 [ 38.023870] R13: 00007ffd56c6b650 R14: 00007ffd56c6b680 R15: 00007ffd56c6b9e0 [ 38.024813] [ 38.025129] [ 38.025362] Allocated by task 220: [ 38.025832] kasan_save_stack+0x22/0x50 [ 38.026355] kasan_set_track+0x25/0x30 [ 38.026879] __kasan_slab_alloc+0x59/0x70 [ 38.027422] kmem_cache_alloc+0x16b/0x370 [ 38.027963] vm_area_dup+0x20/0x160 [ 38.028456] __split_vma+0x170/0x950 [ 38.028943] split_vma+0xc6/0x110 [ 38.029399] mprotect_fixup+0x8d2/0xb30 [ 38.029960] do_mprotect_pkey+0x87e/0xd40 [ 38.030512] __x64_sys_mprotect+0x78/0xc0 [ 38.031060] do_syscall_64+0x3f/0x90 [ 38.031563] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.032224] [ 38.032491] Freed by task 220: [ 38.032912] kasan_save_stack+0x22/0x50 [ 38.033441] kasan_set_track+0x25/0x30 [ 38.033971] kasan_save_free_info+0x2b/0x50 [ 38.034567] __kasan_slab_free+0x10a/0x190 [ 38.035115] kmem_cache_free+0x10d/0x4d0 [ 38.035653] rcu_core+0x8c8/0x2860 [ 38.036122] __do_softirq+0x1b7/0x7d4 [ 38.036604] [ 38.036824] Last potentially related work creation: [ 38.037412] kasan_save_stack+0x22/0x50 [ 38.037940] __kasan_record_aux_stack+0x8e/0xa0 [ 38.038517] __call_rcu_common.constprop.0+0x6a/0xb90 [ 38.039181] remove_vma+0x139/0x170 [ 38.039635] do_vmi_align_munmap+0xd4a/0x11f0 [ 38.040207] do_vmi_munmap+0x1f1/0x2b0 [ 38.040712] __vm_munmap+0x138/0x3a0 [ 38.041184] __x64_sys_munmap+0x59/0x80 [ 38.041683] do_syscall_64+0x3f/0x90 [ 38.042177] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.042827] [ 38.043043] Second to last potentially related work creation: [ 38.043752] kasan_save_stack+0x22/0x50 [ 38.044257] __kasan_record_aux_stack+0x8e/0xa0 [ 38.044855] __call_rcu_common.constprop.0+0x6a/0xb90 [ 38.045524] remove_vma+0x139/0x170 [ 38.045975] do_vmi_align_munmap+0xd4a/0x11f0 [ 38.046622] do_vmi_munmap+0x1f1/0x2b0 [ 38.047204] mmap_region+0x1f9/0x2660 [ 38.047769] do_mmap+0x854/0xf00 [ 38.048289] vm_mmap_pgoff+0x1a6/0x3a0 [ 38.048880] ksys_mmap_pgoff+0x3af/0x500 [ 38.049485] do_syscall_64+0x3f/0x90 [ 38.050051] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.050824] [ 38.051083] The buggy address belongs to the object at ffff888008dcb9f8 [ 38.051083] which belongs to the cache vm_area_struct of size 168 [ 38.052849] The buggy address is located 88 bytes inside of [ 38.052849] freed 168-byte region [ffff888008dcb9f8, ffff888008dcbaa0) [ 38.054527] [ 38.054783] The buggy address belongs to the physical page: [ 38.055579] page:00000000ef7ae5d2 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x8dcb [ 38.056889] memcg:ffff888013cf3201 [ 38.057399] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 38.058228] page_type: 0xffffffff() [ 38.058774] raw: 0100000000000200 ffff88800879fc80 ffffea00006740c0 0000000000000003 [ 38.059878] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff888013cf3201 [ 38.060978] page dumped because: kasan: bad access detected [ 38.061773] [ 38.062034] Memory state around the buggy address: [ 38.062737] ffff888008dcb900: fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 38.063771] ffff888008dcb980: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fa [ 38.064808] >ffff888008dcba00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.065840] ^ [ 38.066681] ffff888008dcba80: fb fb fb fb fc fc fc fc fc fc fc fc 00 00 00 00 [ 38.067721] ffff888008dcbb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 38.068765] ================================================================== [ 38.070205] Disabling lock debugging due to kernel taint [ 40.855908] BUG: Bad rss-counter state mm:0000000058423092 type:MM_FILEPAGES val:33 [ 40.857088] BUG: Bad rss-counter state mm:0000000058423092 type:MM_ANONPAGES val:22 [ 41.218268] BUG: Bad rss-counter state mm:0000000064502ddd type:MM_FILEPAGES val:33 [ 41.219334] BUG: Bad rss-counter state mm:0000000064502ddd type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:51030' (ECDSA) to the list of known hosts. 2023/06/20 03:11:53 fuzzer started 2023/06/20 03:11:53 dialing manager at localhost:44161 2023/06/20 03:11:53 checking machine... 2023/06/20 03:11:53 checking revisions... [ 41.953014] kmemleak: Automatic memory scanning thread ended 2023/06/20 03:11:53 testing simple program... [ 41.998172] cgroup: Unknown subsys name 'net' [ 42.053315] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 03:11:46 Registers: info registers vcpu 0 RAX=0000000000000000 RBX=0000000000000000 RCX=0000000000000100 RDX=ffff888008d70000 RSI=ffffffff811431a3 RDI=0000000000000007 RBP=000000000c791d90 RSP=ffff888008d7fc58 R8 =0000000000000007 R9 =0000000000000000 R10=0000000000000000 R11=0000000000000128 R12=0000000000000000 R13=0000000000080000 R14=ffffffff813782a8 R15=ffff88800fe5e170 RIP=ffffffff814c0811 RFL=00000206 [-----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 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=00007fb091b2c000 CR3=000000000dd84000 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=2032353a31313a3330203032206e754a XMM01=6964206465766965636552203a5d3633 XMM02=6f63736964203a31313a303231373420 XMM03=7266207463656e6e6f63736964206465 XMM04=69662068637573206f4e203a656c6163 XMM05=3a656c696620766e65206e65706f206f XMM06=65733a6468737328766e655f6d617020 XMM07=6b7a79732032353a31313a3330203032 XMM08=3d656e696c646d632022656369767265 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=ffffffff84506c7f RBX=0000000000000001 RCX=0000000000000001 RDX=ffff88800f21ff01 RSI=ffff88800f21ff38 RDI=ffff88800f21ff38 RBP=ffff88806cf09af0 RSP=ffff88806cf09a28 R8 =ffffffff863b1c9a R9 =ffff88806cf09ad8 R10=0000000000038001 R11=000000000008a977 R12=ffff88806cf09af8 R13=ffff88806cf09ae0 R14=ffff88800f21ff40 R15=ffff88806cf09a98 RIP=ffffffff81131041 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 00007f8ba29c6900 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=00007ffefcd3c000 CR3=0000000013ffc000 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=31313a3330203032206e754a3e36383c XMM01=7365733a646873732878696e755f6d61 XMM02=736f6c63206e6f6973736573203a296e XMM03=5f6d6170203a5d3633325b6468737320 XMM04=6456774875434142334f726f59427469 XMM05=485320415352203a3268737320303231 XMM06=206d6f726620746f6f7220726f662079 XMM07=00000000000000000000000000000000 XMM08=3a677562656420676f6c737973720000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000