[ 23.991275] BUG: Bad rss-counter state mm:0000000028b70eee type:MM_FILEPAGES val:33 [ 23.992502] BUG: Bad rss-counter state mm:0000000028b70eee type:MM_ANONPAGES val:22 [ 24.149916] ================================================================== [ 24.150965] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 24.152090] Read of size 8 at addr ffff88800b382798 by task sshd/219 [ 24.152932] [ 24.153179] CPU: 0 PID: 219 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 24.154148] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 24.155210] Call Trace: [ 24.155551] [ 24.155864] dump_stack_lvl+0x91/0xf0 [ 24.156389] print_report+0xcc/0x620 [ 24.156921] ? __virt_addr_valid+0x102/0x340 [ 24.157544] ? vma_interval_tree_remove+0xc75/0xec0 [ 24.158209] ? vma_interval_tree_remove+0xc75/0xec0 [ 24.158890] kasan_report+0xbe/0xf0 [ 24.159404] ? vma_interval_tree_remove+0xc75/0xec0 [ 24.160082] vma_interval_tree_remove+0xc75/0xec0 [ 24.160746] vma_prepare+0xc54/0x11a0 [ 24.161278] __split_vma+0x5af/0x950 [ 24.161794] ? __pfx___split_vma+0x10/0x10 [ 24.162354] ? find_held_lock+0x2c/0x110 [ 24.162930] do_vmi_align_munmap+0x2ba/0x11f0 [ 24.163532] ? lock_is_held_type+0x9f/0x120 [ 24.164112] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 24.164769] ? mtree_range_walk+0x632/0x900 [ 24.165363] ? mas_walk+0x5c7/0x7c0 [ 24.165879] do_vmi_munmap+0x1f1/0x2b0 [ 24.166397] mmap_region+0x1f9/0x2660 [ 24.166934] ? vm_mmap_pgoff+0x15c/0x3a0 [ 24.167473] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 24.168245] ? __pfx_lock_acquire+0x10/0x10 [ 24.168829] ? __pfx_mmap_region+0x10/0x10 [ 24.169426] ? security_mmap_addr+0x7d/0xa0 [ 24.170007] ? get_unmapped_area+0x1f5/0x3f0 [ 24.170591] do_mmap+0x854/0xf00 [ 24.171078] vm_mmap_pgoff+0x1a6/0x3a0 [ 24.171603] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 24.172213] ksys_mmap_pgoff+0x3af/0x500 [ 24.172772] do_syscall_64+0x3f/0x90 [ 24.173297] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 24.173987] RIP: 0033:0x7f8413bc8d82 [ 24.174472] 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 [ 24.176758] RSP: 002b:00007ffd44262098 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 24.177758] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f8413bc8d82 [ 24.178667] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f8413002000 [ 24.179580] RBP: 00007f8413002000 R08: 0000000000000009 R09: 0000000000001000 [ 24.180488] R10: 0000000000000812 R11: 0000000000000206 R12: 0000558811798980 [ 24.181408] R13: 00007ffd442620b0 R14: 00007ffd442620e0 R15: 00007ffd44262440 [ 24.182320] [ 24.182629] [ 24.182877] Allocated by task 212: [ 24.183332] kasan_save_stack+0x22/0x50 [ 24.183884] kasan_set_track+0x25/0x30 [ 24.184404] __kasan_slab_alloc+0x59/0x70 [ 24.184977] kmem_cache_alloc+0x16b/0x370 [ 24.185536] vm_area_dup+0x20/0x160 [ 24.186036] __split_vma+0x170/0x950 [ 24.186526] split_vma+0xc6/0x110 [ 24.187016] mprotect_fixup+0x8d2/0xb30 [ 24.187551] do_mprotect_pkey+0x87e/0xd40 [ 24.188110] __x64_sys_mprotect+0x78/0xc0 [ 24.188668] do_syscall_64+0x3f/0x90 [ 24.189194] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 24.189880] [ 24.190102] Freed by task 13: [ 24.190501] kasan_save_stack+0x22/0x50 [ 24.191048] kasan_set_track+0x25/0x30 [ 24.191564] kasan_save_free_info+0x2b/0x50 [ 24.192128] __kasan_slab_free+0x10a/0x190 [ 24.192696] kmem_cache_free+0x10d/0x4d0 [ 24.193239] rcu_core+0x8c8/0x2860 [ 24.193718] __do_softirq+0x1b7/0x7d4 [ 24.194217] [ 24.194447] Last potentially related work creation: [ 24.195086] kasan_save_stack+0x22/0x50 [ 24.195607] __kasan_record_aux_stack+0x8e/0xa0 [ 24.196212] __call_rcu_common.constprop.0+0x6a/0xb90 [ 24.196898] remove_vma+0x139/0x170 [ 24.197394] do_vmi_align_munmap+0xd4a/0x11f0 [ 24.197989] do_vmi_munmap+0x1f1/0x2b0 [ 24.198555] __vm_munmap+0x138/0x3a0 [ 24.199193] __x64_sys_munmap+0x59/0x80 [ 24.199862] do_syscall_64+0x3f/0x90 [ 24.200488] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 24.201355] [ 24.201641] Second to last potentially related work creation: [ 24.202551] kasan_save_stack+0x22/0x50 [ 24.203223] __kasan_record_aux_stack+0x8e/0xa0 [ 24.203968] __call_rcu_common.constprop.0+0x6a/0xb90 [ 24.204637] remove_vma+0x139/0x170 [ 24.205130] do_vmi_align_munmap+0xd4a/0x11f0 [ 24.205743] do_vmi_munmap+0x1f1/0x2b0 [ 24.206243] mmap_region+0x1f9/0x2660 [ 24.206748] do_mmap+0x854/0xf00 [ 24.207190] vm_mmap_pgoff+0x1a6/0x3a0 [ 24.207715] ksys_mmap_pgoff+0x3af/0x500 [ 24.208242] do_syscall_64+0x3f/0x90 [ 24.208745] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 24.209417] [ 24.209640] The buggy address belongs to the object at ffff88800b382740 [ 24.209640] which belongs to the cache vm_area_struct of size 168 [ 24.211190] The buggy address is located 88 bytes inside of [ 24.211190] freed 168-byte region [ffff88800b382740, ffff88800b3827e8) [ 24.212682] [ 24.212919] The buggy address belongs to the physical page: [ 24.213619] page:00000000f49cc2ab refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xb382 [ 24.214762] memcg:ffff88800ec9d301 [ 24.215199] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 24.215938] page_type: 0xffffffff() [ 24.216404] raw: 0100000000000200 ffff88800879fc80 0000000000000000 dead000000000001 [ 24.217379] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800ec9d301 [ 24.218321] page dumped because: kasan: bad access detected [ 24.219009] [ 24.219229] Memory state around the buggy address: [ 24.219847] ffff88800b382680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 24.220757] ffff88800b382700: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 24.221651] >ffff88800b382780: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc [ 24.222530] ^ [ 24.223042] ffff88800b382800: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 [ 24.223951] ffff88800b382880: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc [ 24.224838] ================================================================== [ 24.226189] Disabling lock debugging due to kernel taint Debian GNU/Linux 11 syzkaller ttyS0 syzkaller login: [ 26.274922] BUG: Bad rss-counter state mm:00000000339fedc4 type:MM_FILEPAGES val:33 [ 26.276551] BUG: Bad rss-counter state mm:00000000339fedc4 type:MM_ANONPAGES val:22 [ 26.755103] BUG: Bad rss-counter state mm:00000000043bba06 type:MM_FILEPAGES val:33 [ 26.756634] BUG: Bad rss-counter state mm:00000000043bba06 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:29606' (ECDSA) to the list of known hosts. 2023/06/19 21:51:51 fuzzer started 2023/06/19 21:51:51 dialing manager at localhost:44161 2023/06/19 21:51:51 checking machine... 2023/06/19 21:51:51 checking revisions... [ 27.477667] kmemleak: Automatic memory scanning thread ended 2023/06/19 21:51:52 testing simple program... [ 27.521843] cgroup: Unknown subsys name 'net' [ 27.613345] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 21:51:51 Registers: info registers vcpu 0 RAX=dffffc0000000000 RBX=0000000000000001 RCX=ffffffff83644343 RDX=0000000000026443 RSI=0000000000026443 RDI=ffffffff86580ccc RBP=ffff888014777340 RSP=ffff888014777278 R8 =0000000000000000 R9 =ffff888014777328 R10=0000000000038001 R11=000000000008ab54 R12=ffff888014777348 R13=ffff888014777330 R14=ffff888014777329 R15=ffff8880147772e8 RIP=ffffffff8113077a RFL=00000217 [----APC] 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 00007f31592cb900 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=00007f46015f9650 CR3=000000000963c000 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=020fa50238f55988fc4abd4ca3c944b1 XMM02=ec2efd57dc4c00df000000000011cc10 XMM03=f17b383cc34ad84d000000000011cce0 XMM04=dc4671d947ed62d400000000000ae988 XMM05=6decc16df7580a9a0000000000135b58 XMM06=fe44ebb9302444bc0000000000134588 XMM07=fb795ef6d65770560000000000123ad0 XMM08=2c67c8bc2e329bc3000000000011cc80 XMM09=00000000000000000000000000000000 XMM10=20200000000020202020202020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=0000000080000001 RBX=0000000000000000 RCX=0000000000000000 RDX=ffff888019a451c0 RSI=ffffffff81657e28 RDI=0000000000000007 RBP=ffffea00001b43c0 RSP=ffff88800ff6f920 R8 =0000000000000007 R9 =0000000000000000 R10=0000000000000000 R11=0000000000000000 R12=ffffea00001b4388 R13=00007fa700ca8000 R14=ffff88800d8e9538 R15=dffffc0000000000 RIP=ffffffff814c07eb RFL=00000293 [--S-A-C] 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 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=00007fa700422514 CR3=0000000018b3e000 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=00000000000000000000000000000000 XMM01=00000000000100000000000100000000 XMM02=00007fa7007bb00000007fa7007bc8c0 XMM03=00007fa700ffa51000007fa7003b4000 XMM04=00007fa700ffa51000007fa7003b4000 XMM05=00007fa7007bb00000007fa7007bc8c0 XMM06=00007fa7007bc2f000007fa700921950 XMM07=00007fa7007bbcf000007fa7007bb760 XMM08=00007fa7007bb00000007fa700921950 XMM09=00000000000000000000ff0000000000 XMM10=00000000000000000000200000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000