[ 26.706812] BUG: Bad rss-counter state mm:0000000064e8a806 type:MM_FILEPAGES val:33 [ 26.708050] BUG: Bad rss-counter state mm:0000000064e8a806 type:MM_ANONPAGES val:22 [ 26.752966] ================================================================== [ 26.753877] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 26.754963] Read of size 8 at addr ffff88800ca696b0 by task sshd/219 [ 26.755729] [ 26.755948] CPU: 1 PID: 219 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 26.756807] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 26.757808] Call Trace: [ 26.758120] [ 26.758399] dump_stack_lvl+0x91/0xf0 [ 26.758879] print_report+0xcc/0x620 [ 26.759365] ? __virt_addr_valid+0x102/0x340 [ 26.759920] ? vma_interval_tree_remove+0xc75/0xec0 [ 26.760530] ? vma_interval_tree_remove+0xc75/0xec0 [ 26.761150] kasan_report+0xbe/0xf0 [ 26.761624] ? vma_interval_tree_remove+0xc75/0xec0 [ 26.762240] vma_interval_tree_remove+0xc75/0xec0 [ 26.762829] vma_prepare+0xc54/0x11a0 [ 26.763306] __split_vma+0x5af/0x950 [ 26.763770] ? __pfx___split_vma+0x10/0x10 [ 26.764286] ? find_held_lock+0x2c/0x110 [ 26.764803] do_vmi_align_munmap+0x2ba/0x11f0 [ 26.765387] ? lock_is_held_type+0x9f/0x120 [ 26.765923] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 26.766527] ? mtree_range_walk+0x632/0x900 [ 26.767075] ? mas_walk+0x5c7/0x7c0 [ 26.767548] do_vmi_munmap+0x1f1/0x2b0 [ 26.768041] mmap_region+0x1f9/0x2660 [ 26.768518] ? vm_mmap_pgoff+0x15c/0x3a0 [ 26.769036] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 26.769741] ? __pfx_lock_acquire+0x10/0x10 [ 26.770270] ? __pfx_mmap_region+0x10/0x10 [ 26.770803] ? security_mmap_addr+0x7d/0xa0 [ 26.771329] ? get_unmapped_area+0x1f5/0x3f0 [ 26.771873] do_mmap+0x854/0xf00 [ 26.772307] vm_mmap_pgoff+0x1a6/0x3a0 [ 26.772805] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 26.773371] ksys_mmap_pgoff+0x3af/0x500 [ 26.773885] do_syscall_64+0x3f/0x90 [ 26.774358] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 26.775002] RIP: 0033:0x7f5b3a2a1d82 [ 26.775467] 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 [ 26.777595] RSP: 002b:00007ffc638e3db8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 26.778511] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f5b3a2a1d82 [ 26.779363] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f5b396db000 [ 26.780214] RBP: 00007f5b396db000 R08: 0000000000000009 R09: 0000000000001000 [ 26.781058] R10: 0000000000000812 R11: 0000000000000206 R12: 00005604d7ba8f70 [ 26.781900] R13: 00007ffc638e3dd0 R14: 00007ffc638e3e00 R15: 00007ffc638e4160 [ 26.782859] [ 26.783148] [ 26.783360] Allocated by task 212: [ 26.783789] kasan_save_stack+0x22/0x50 [ 26.784287] kasan_set_track+0x25/0x30 [ 26.784782] __kasan_slab_alloc+0x59/0x70 [ 26.785332] kmem_cache_alloc+0x16b/0x370 [ 26.785845] vm_area_dup+0x20/0x160 [ 26.786301] __split_vma+0x170/0x950 [ 26.786759] split_vma+0xc6/0x110 [ 26.787193] mprotect_fixup+0x8d2/0xb30 [ 26.787691] do_mprotect_pkey+0x87e/0xd40 [ 26.788201] __x64_sys_mprotect+0x78/0xc0 [ 26.788714] do_syscall_64+0x3f/0x90 [ 26.789192] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 26.789823] [ 26.790034] Freed by task 212: [ 26.790429] kasan_save_stack+0x22/0x50 [ 26.790926] kasan_set_track+0x25/0x30 [ 26.791416] kasan_save_free_info+0x2b/0x50 [ 26.791941] __kasan_slab_free+0x10a/0x190 [ 26.792486] kmem_cache_free+0x10d/0x4d0 [ 26.793104] rcu_core+0x8c8/0x2860 [ 26.793638] __do_softirq+0x1b7/0x7d4 [ 26.794201] [ 26.794464] Last potentially related work creation: [ 26.795165] kasan_save_stack+0x22/0x50 [ 26.795768] __kasan_record_aux_stack+0x8e/0xa0 [ 26.796462] __call_rcu_common.constprop.0+0x6a/0xb90 [ 26.797243] remove_vma+0x139/0x170 [ 26.797785] do_vmi_align_munmap+0xd4a/0x11f0 [ 26.798448] do_vmi_munmap+0x1f1/0x2b0 [ 26.799031] __vm_munmap+0x138/0x3a0 [ 26.799585] __x64_sys_munmap+0x59/0x80 [ 26.800183] do_syscall_64+0x3f/0x90 [ 26.800757] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 26.801533] [ 26.801788] The buggy address belongs to the object at ffff88800ca69658 [ 26.801788] which belongs to the cache vm_area_struct of size 168 [ 26.803546] The buggy address is located 88 bytes inside of [ 26.803546] freed 168-byte region [ffff88800ca69658, ffff88800ca69700) [ 26.805255] [ 26.805517] The buggy address belongs to the physical page: [ 26.806318] page:00000000d4894edb refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xca69 [ 26.807622] memcg:ffff88800de0d801 [ 26.808140] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 26.808985] page_type: 0xffffffff() [ 26.809522] raw: 0100000000000200 ffff88800879fc80 0000000000000000 dead000000000001 [ 26.810620] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800de0d801 [ 26.811711] page dumped because: kasan: bad access detected [ 26.812504] [ 26.812763] Memory state around the buggy address: [ 26.813469] ffff88800ca69580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.814496] ffff88800ca69600: fb fb fb fc fc fc fc fc fc fc fc fa fb fb fb fb [ 26.815518] >ffff88800ca69680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.816532] ^ [ 26.817259] ffff88800ca69700: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 [ 26.818283] ffff88800ca69780: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc [ 26.819291] ================================================================== [ 26.820837] Disabling lock debugging due to kernel taint Debian GNU/Linux 11 syzkaller ttyS0 syzkaller login: [ 29.312887] BUG: Bad rss-counter state mm:00000000c138b4af type:MM_FILEPAGES val:33 [ 29.314135] BUG: Bad rss-counter state mm:00000000c138b4af type:MM_ANONPAGES val:22 [ 29.866238] BUG: Bad rss-counter state mm:0000000094c6963c type:MM_FILEPAGES val:33 [ 29.867512] BUG: Bad rss-counter state mm:0000000094c6963c type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:18556' (ECDSA) to the list of known hosts. 2023/06/20 04:33:50 fuzzer started 2023/06/20 04:33:50 dialing manager at localhost:44161 2023/06/20 04:33:50 checking machine... 2023/06/20 04:33:50 checking revisions... [ 30.559062] kmemleak: Automatic memory scanning thread ended 2023/06/20 04:33:50 testing simple program... [ 30.610968] cgroup: Unknown subsys name 'net' [ 30.665716] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 04:33:47 Registers: info registers vcpu 0 RAX=dffffc0000000000 RBX=ffff888019ef72e8 RCX=ffffffff860d6801 RDX=1ffff110033dee68 RSI=0000000000000000 RDI=ffff888019ef72e8 RBP=ffff888019ef7340 RSP=ffff888019ef72d0 R8 =ffffffff860d68fa R9 =ffff888019ef7328 R10=0000000000038001 R11=0000000000010b7e R12=ffff888019ef73b0 R13=0000000000000000 R14=ffff888014348000 R15=0000000000092820 RIP=ffffffff8113038e 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 00007f1540313700 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=00007f3bafb2a0b0 CR3=000000000d4aa000 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=00000000000000000000000000000000 XMM01=656e6e6f637369642064657669656365 XMM02=63736964203a31313a30313630362074 XMM03=66207463656e6e6f6373696420646576 XMM04=6456774875434142334f726f59427469 XMM05=485320415352203a3268737320303136 XMM06=206d6f726620746f6f7220726f662079 XMM07=00000000000000000000000000000000 XMM08=3a677562656420676f6c737973720000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=ffffffff815a5cb0 RBX=dffffc0000000000 RCX=0000000000000000 RDX=0000000000000000 RSI=ffffffff815a2954 RDI=ffffffff852be640 RBP=ffff88800d977d28 RSP=ffff88800d977c58 R8 =0000000000000006 R9 =0000000000000101 R10=0000000000000101 R11=0000000000000000 R12=00000000000000b4 R13=ffff88800d977d60 R14=00000000000000b4 R15=ffffc9000068d9d8 RIP=ffffffff814c07e0 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 00007fa18913a900 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=00007fa1885ab310 CR3=0000000008db0000 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=ffffffffffffffffffffffffffffffff XMM01=30306234386136303638616663356134 XMM02=38303062343861363036386166633561 XMM03=2f6c616e72756f6a2f676f6c2f6e7572 XMM04=06e249f75b4a7d6100000000000ae988 XMM05=5b101b2a5f614c0100000000001341f0 XMM06=806171799158d9670000000000132c70 XMM07=00000000000000000000000000000000 XMM08=415453454d49545f454d49544c414552 XMM09=00000000000000000000000000000000 XMM10=20200000000020202020202020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000