syzkaller login: [ 38.446350] BUG: Bad rss-counter state mm:00000000ec182bcd type:MM_FILEPAGES val:33 [ 38.447485] BUG: Bad rss-counter state mm:00000000ec182bcd type:MM_ANONPAGES val:22 [ 38.605605] ================================================================== [ 38.606548] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 38.607509] Read of size 8 at addr ffff88800f49aa50 by task sshd/220 [ 38.608435] [ 38.608658] CPU: 1 PID: 220 Comm: sshd Not tainted 6.4.0-rc7-next-20230620 #1 [ 38.609535] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 38.610549] Call Trace: [ 38.610868] [ 38.611167] dump_stack_lvl+0x91/0xf0 [ 38.611685] print_report+0xcc/0x620 [ 38.612190] ? __virt_addr_valid+0x102/0x340 [ 38.612740] ? vma_interval_tree_remove+0xc75/0xec0 [ 38.613373] ? vma_interval_tree_remove+0xc75/0xec0 [ 38.613995] kasan_report+0xbe/0xf0 [ 38.614487] ? vma_interval_tree_remove+0xc75/0xec0 [ 38.615121] vma_interval_tree_remove+0xc75/0xec0 [ 38.615744] vma_prepare+0xc54/0x11a0 [ 38.616244] __split_vma+0x5af/0x950 [ 38.616715] ? __pfx___split_vma+0x10/0x10 [ 38.617258] ? find_held_lock+0x2c/0x110 [ 38.617785] do_vmi_align_munmap+0x2ba/0x11f0 [ 38.618373] ? lock_is_held_type+0x9f/0x120 [ 38.618919] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 38.619566] ? mtree_range_walk+0x632/0x900 [ 38.620126] ? mas_walk+0x5c7/0x7c0 [ 38.620616] do_vmi_munmap+0x1f1/0x2b0 [ 38.621123] mmap_region+0x1f9/0x2660 [ 38.621622] ? vm_mmap_pgoff+0x15c/0x3a0 [ 38.622154] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 38.622870] ? __pfx_lock_acquire+0x10/0x10 [ 38.623439] ? __pfx_mmap_region+0x10/0x10 [ 38.623981] ? security_mmap_addr+0x7d/0xa0 [ 38.624531] ? get_unmapped_area+0x1f5/0x3f0 [ 38.625087] do_mmap+0x854/0xf00 [ 38.625551] vm_mmap_pgoff+0x1a6/0x3a0 [ 38.626051] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 38.626637] ksys_mmap_pgoff+0x3af/0x500 [ 38.627168] do_syscall_64+0x3f/0x90 [ 38.627673] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.628343] RIP: 0033:0x7fdcb1164d82 [ 38.628803] 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.630982] RSP: 002b:00007ffd64796e28 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 38.631917] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fdcb1164d82 [ 38.632783] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fdcb059e000 [ 38.633650] RBP: 00007fdcb059e000 R08: 0000000000000009 R09: 0000000000001000 [ 38.634518] R10: 0000000000000812 R11: 0000000000000206 R12: 000055ad7bb12b20 [ 38.635399] R13: 00007ffd64796e40 R14: 00007ffd64796e70 R15: 00007ffd647971d0 [ 38.636291] [ 38.636589] [ 38.636810] Allocated by task 213: [ 38.637257] kasan_save_stack+0x22/0x50 [ 38.637765] kasan_set_track+0x25/0x30 [ 38.638277] __kasan_slab_alloc+0x59/0x70 [ 38.638811] kmem_cache_alloc+0x16b/0x370 [ 38.639355] vm_area_dup+0x20/0x160 [ 38.639812] __split_vma+0x170/0x950 [ 38.640296] split_vma+0xc6/0x110 [ 38.640748] mprotect_fixup+0x8d2/0xb30 [ 38.641270] do_mprotect_pkey+0x87e/0xd40 [ 38.641796] __x64_sys_mprotect+0x78/0xc0 [ 38.642348] do_syscall_64+0x3f/0x90 [ 38.642860] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.643535] [ 38.643755] Freed by task 213: [ 38.644154] kasan_save_stack+0x22/0x50 [ 38.644674] kasan_set_track+0x25/0x30 [ 38.645212] kasan_save_free_info+0x2b/0x50 [ 38.645774] __kasan_slab_free+0x10a/0x190 [ 38.646345] kmem_cache_free+0x10d/0x4d0 [ 38.646889] rcu_core+0x8c8/0x2860 [ 38.647361] __do_softirq+0x1b7/0x7d4 [ 38.647865] [ 38.648095] Last potentially related work creation: [ 38.648716] kasan_save_stack+0x22/0x50 [ 38.649252] __kasan_record_aux_stack+0x8e/0xa0 [ 38.649907] __call_rcu_common.constprop.0+0x6a/0xb90 [ 38.650584] remove_vma+0x139/0x170 [ 38.651058] do_vmi_align_munmap+0xd4a/0x11f0 [ 38.651673] do_vmi_munmap+0x1f1/0x2b0 [ 38.652199] __vm_munmap+0x138/0x3a0 [ 38.652704] __x64_sys_munmap+0x59/0x80 [ 38.653233] do_syscall_64+0x3f/0x90 [ 38.653740] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.654421] [ 38.654654] The buggy address belongs to the object at ffff88800f49a9f8 [ 38.654654] which belongs to the cache vm_area_struct of size 168 [ 38.656225] The buggy address is located 88 bytes inside of [ 38.656225] freed 168-byte region [ffff88800f49a9f8, ffff88800f49aaa0) [ 38.657713] [ 38.657942] The buggy address belongs to the physical page: [ 38.658638] page:000000008c5eb58b refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xf49a [ 38.659793] memcg:ffff888019032f01 [ 38.660254] flags: 0x100000000000200(slab|node=0|zone=1) [ 38.660933] page_type: 0xffffffff() [ 38.661391] raw: 0100000000000200 ffff8880087a0c80 dead000000000122 0000000000000000 [ 38.662388] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff888019032f01 [ 38.663359] page dumped because: kasan: bad access detected [ 38.664052] [ 38.664281] Memory state around the buggy address: [ 38.664875] ffff88800f49a900: fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 38.665771] ffff88800f49a980: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fa [ 38.666666] >ffff88800f49aa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.667660] ^ [ 38.668395] ffff88800f49aa80: fb fb fb fb fc fc fc fc fc fc fc fc fa fb fb fb [ 38.669298] ffff88800f49ab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.670204] ================================================================== [ 38.671189] Disabling lock debugging due to kernel taint [ 41.289513] BUG: Bad rss-counter state mm:00000000be74e307 type:MM_FILEPAGES val:33 [ 41.290935] BUG: Bad rss-counter state mm:00000000be74e307 type:MM_ANONPAGES val:22 [ 41.691258] BUG: Bad rss-counter state mm:00000000966ccf49 type:MM_FILEPAGES val:33 [ 41.692300] BUG: Bad rss-counter state mm:00000000966ccf49 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:51319' (ECDSA) to the list of known hosts. 2023/06/21 02:16:58 fuzzer started 2023/06/21 02:16:58 dialing manager at localhost:36067 2023/06/21 02:16:58 checking machine... 2023/06/21 02:16:58 checking revisions... [ 42.437850] kmemleak: Automatic memory scanning thread ended 2023/06/21 02:16:59 testing simple program... [ 42.491187] cgroup: Unknown subsys name 'net' [ 42.595737] cgroup: Unknown subsys name 'rlimit' [ 44.942052] general protection fault, probably for non-canonical address 0xe08f7c2740000014: 0000 [#1] PREEMPT SMP KASAN NOPTI [ 44.943720] KASAN: maybe wild-memory-access in range [0x047c013a000000a0-0x047c013a000000a7] [ 44.944887] CPU: 1 PID: 266 Comm: cron Tainted: G B 6.4.0-rc7-next-20230620 #1 [ 44.946089] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 44.947229] RIP: 0010:__rb_insert_augmented+0x9d/0x8b0 [ 44.948031] Code: c2 48 c1 ea 03 42 80 3c 2a 00 0f 85 55 05 00 00 4d 8b 74 24 08 49 39 ee 0f 84 77 01 00 00 4d 85 f6 74 1c 4c 89 f2 48 c1 ea 03 <42> 80 3c 2a 00 0f 85 61 05 00 00 41 f6 06 01 0f 84 7a 04 00 00 48 [ 44.950538] RSP: 0018:ffff888016b5f8a8 EFLAGS: 00010217 [ 44.951276] RAX: ffff88801977e8e0 RBX: ffff88800c6f1a38 RCX: ffffffff844d49f9 [ 44.952246] RDX: 008f802740000014 RSI: 0000000000000008 RDI: ffff8880197496e8 [ 44.953203] RBP: ffff88800f3e1bc0 R08: ffff8880197496e8 R09: 0000000000000000 [ 44.954161] R10: 0000000000000000 R11: 00000000000b6a61 R12: ffff8880197496e0 [ 44.955125] R13: dffffc0000000000 R14: 047c013a000000a6 R15: ffffffff816e6340 [ 44.956091] FS: 00007f0bf157d840(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 [ 44.957167] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 44.957956] CR2: 00007f0bf1154000 CR3: 0000000017e56000 CR4: 0000000000350ee0 [ 44.958912] Call Trace: [ 44.959278] [ 44.959620] ? die_addr+0x3c/0xa0 [ 44.960139] ? exc_general_protection+0x125/0x220 [ 44.960865] ? asm_exc_general_protection+0x26/0x30 [ 44.961594] ? __pfx_vma_interval_tree_augment_rotate+0x10/0x10 [ 44.962460] ? __rb_insert_augmented+0x5e9/0x8b0 [ 44.963152] ? __rb_insert_augmented+0x9d/0x8b0 [ 44.963841] ? __rb_insert_augmented+0x5e9/0x8b0 [ 44.964536] vma_prepare+0xa1a/0x11a0 [ 44.965095] __split_vma+0x5af/0x950 [ 44.965652] ? __pfx___split_vma+0x10/0x10 [ 44.966271] ? lock_acquire+0x434/0x4c0 [ 44.966848] do_vmi_align_munmap+0x361/0x11f0 [ 44.967519] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 44.968230] ? mtree_range_walk+0x632/0x900 [ 44.968874] ? mas_walk+0x5c7/0x7c0 [ 44.969429] do_vmi_munmap+0x1f1/0x2b0 [ 44.969999] mmap_region+0x1f9/0x2660 [ 44.970565] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 44.971406] ? __pfx_lock_acquire+0x10/0x10 [ 44.972027] ? __pfx_mmap_region+0x10/0x10 [ 44.972649] ? security_mmap_addr+0x7d/0xa0 [ 44.973267] ? get_unmapped_area+0x1f5/0x3f0 [ 44.973901] do_mmap+0x854/0xf00 [ 44.974411] vm_mmap_pgoff+0x1a6/0x3a0 [ 44.974986] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 44.975651] ksys_mmap_pgoff+0x3af/0x500 [ 44.976239] do_syscall_64+0x3f/0x90 [ 44.976802] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 44.977552] RIP: 0033:0x7f0bf189fd82 [ 44.978083] 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 [ 44.980552] RSP: 002b:00007ffd12bd7af8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 44.981605] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f0bf189fd82 [ 44.982583] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f0bf114f000 [ 44.983589] RBP: 00007f0bf114f000 R08: 0000000000000008 R09: 0000000000001000 [ 44.984572] R10: 0000000000000812 R11: 0000000000000206 R12: 0000558ead312bf0 [ 44.985555] R13: 00007ffd12bd7b10 R14: 00007ffd12bd7b40 R15: 00007ffd12bd7ea0 [ 44.986548] [ 44.986888] Modules linked in: [ 44.987602] ---[ end trace 0000000000000000 ]--- [ 44.988412] RIP: 0010:__rb_insert_augmented+0x9d/0x8b0 [ 44.989333] Code: c2 48 c1 ea 03 42 80 3c 2a 00 0f 85 55 05 00 00 4d 8b 74 24 08 49 39 ee 0f 84 77 01 00 00 4d 85 f6 74 1c 4c 89 f2 48 c1 ea 03 <42> 80 3c 2a 00 0f 85 61 05 00 00 41 f6 06 01 0f 84 7a 04 00 00 48 [ 44.992004] RSP: 0018:ffff888016b5f8a8 EFLAGS: 00010217 [ 44.992752] RAX: ffff88801977e8e0 RBX: ffff88800c6f1a38 RCX: ffffffff844d49f9 [ 44.993848] RDX: 008f802740000014 RSI: 0000000000000008 RDI: ffff8880197496e8 [ 44.994873] RBP: ffff88800f3e1bc0 R08: ffff8880197496e8 R09: 0000000000000000 [ 44.995905] R10: 0000000000000000 R11: 00000000000b6a61 R12: ffff8880197496e0 [ 44.996933] R13: dffffc0000000000 R14: 047c013a000000a6 R15: ffffffff816e6340 [ 44.997941] FS: 00007f0bf157d840(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 [ 44.999074] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 44.999902] CR2: 00007f0bf1154000 CR3: 0000000017e56000 CR4: 0000000000350ee0 executing program executing program executing program VM DIAGNOSIS: 02:16:58 Registers: info registers vcpu 0 RAX=ffff88806ce35000 RBX=0000000000000000 RCX=ffffffff8451250e RDX=ffffed100d9c6a01 RSI=0000000000000004 RDI=ffffffff81288ac5 RBP=dffffc0000000000 RSP=ffffffff85407e10 R8 =0000000000000000 R9 =ffffed100d9c6a00 R10=ffff88806ce35003 R11=ffff888008c04000 R12=ffffffff85d3d350 R13=1ffffffff0a80fc7 R14=0000000000000000 R15=0000000000000000 RIP=ffffffff8451349f RFL=00000246 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=1 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=00007f585aa76420 CR3=0000000019096000 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=2038353a36313a3230203132206e754a XMM01=73732878696e755f6d6170203a5d3033 XMM02=65736f6c63206e6f6973736573203a29 XMM03=755f6d6170203a5d3033325b64687373 XMM04=69662068637573206f4e203a656c6163 XMM05=3a656c696620766e65206e65706f206f XMM06=65733a6468737328766e655f6d617020 XMM07=6b7a79732038353a36313a3230203132 XMM08=3d656e696c646d632022656369767265 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=ffff88806cf35000 RBX=0000000000000001 RCX=ffffffff8451250e RDX=ffffed100d9e6a01 RSI=0000000000000004 RDI=ffffffff81288ac5 RBP=dffffc0000000000 RSP=ffff888008e07e70 R8 =0000000000000000 R9 =ffffed100d9e6a00 R10=ffff88806cf35003 R11=ffff888008c04400 R12=ffffffff85d3d350 R13=1ffff110011c0fd3 R14=0000000000000000 R15=0000000000000000 RIP=ffffffff8451349f RFL=00000246 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=1 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=00007f38ae0050b0 CR3=0000000019096000 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=36313a3230203132206e754a3e36383c XMM01=7365733a646873732878696e755f6d61 XMM02=736f6c63206e6f6973736573203a296e XMM03=5f6d6170203a5d3033325b6468737320 XMM04=6456774875434142334f726f59427469 XMM05=485320415352203a3268737320383234 XMM06=206d6f726620746f6f7220726f662079 XMM07=00000000000000000000000000000000 XMM08=3a677562656420676f6c737973720000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000