[ 24.019770] BUG: Bad rss-counter state mm:00000000ba91ccd5 type:MM_FILEPAGES val:33 [ 24.021203] BUG: Bad rss-counter state mm:00000000ba91ccd5 type:MM_ANONPAGES val:22 [ 24.126950] ================================================================== [ 24.127916] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 24.128867] Read of size 8 at addr ffff88801a195d08 by task sshd/220 [ 24.129659] [ 24.130047] CPU: 1 PID: 220 Comm: sshd Not tainted 6.4.0-rc7-next-20230620 #1 [ 24.130971] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 24.131992] Call Trace: [ 24.132329] [ 24.132629] dump_stack_lvl+0x91/0xf0 [ 24.133126] print_report+0xcc/0x620 [ 24.133620] ? __virt_addr_valid+0x102/0x340 [ 24.134189] ? vma_interval_tree_remove+0xc75/0xec0 [ 24.134821] ? vma_interval_tree_remove+0xc75/0xec0 [ 24.135447] kasan_report+0xbe/0xf0 [ 24.135950] ? vma_interval_tree_remove+0xc75/0xec0 [ 24.136592] vma_interval_tree_remove+0xc75/0xec0 [ 24.137209] vma_prepare+0xc54/0x11a0 [ 24.137693] __split_vma+0x5af/0x950 [ 24.138175] ? __pfx___split_vma+0x10/0x10 [ 24.138704] ? find_held_lock+0x2c/0x110 [ 24.139224] do_vmi_align_munmap+0x2ba/0x11f0 [ 24.139816] ? lock_is_held_type+0x9f/0x120 [ 24.140358] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 24.140975] ? mtree_range_walk+0x632/0x900 [ 24.141534] ? mas_walk+0x5c7/0x7c0 [ 24.142011] do_vmi_munmap+0x1f1/0x2b0 [ 24.142512] mmap_region+0x1f9/0x2660 [ 24.143001] ? vm_mmap_pgoff+0x15c/0x3a0 [ 24.143510] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 24.144250] ? __pfx_lock_acquire+0x10/0x10 [ 24.144794] ? __pfx_mmap_region+0x10/0x10 [ 24.145328] ? security_mmap_addr+0x7d/0xa0 [ 24.145867] ? get_unmapped_area+0x1f5/0x3f0 [ 24.146431] do_mmap+0x854/0xf00 [ 24.146881] vm_mmap_pgoff+0x1a6/0x3a0 [ 24.147379] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 24.147957] ksys_mmap_pgoff+0x3af/0x500 [ 24.148634] do_syscall_64+0x3f/0x90 [ 24.149119] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 24.149774] RIP: 0033:0x7f79d6c5bd82 [ 24.150233] 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.152391] RSP: 002b:00007ffe3fc75b68 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 24.153306] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f79d6c5bd82 [ 24.154151] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f79d6095000 [ 24.155001] RBP: 00007f79d6095000 R08: 0000000000000009 R09: 0000000000001000 [ 24.155865] R10: 0000000000000812 R11: 0000000000000206 R12: 00005598bdd16ec0 [ 24.156719] R13: 00007ffe3fc75b80 R14: 00007ffe3fc75bb0 R15: 00007ffe3fc75f10 [ 24.157576] [ 24.157875] [ 24.158093] Allocated by task 212: [ 24.158535] kasan_save_stack+0x22/0x50 [ 24.159041] kasan_set_track+0x25/0x30 [ 24.159534] __kasan_slab_alloc+0x59/0x70 [ 24.160080] kmem_cache_alloc+0x16b/0x370 [ 24.160607] vm_area_dup+0x20/0x160 [ 24.161062] __split_vma+0x170/0x950 [ 24.161533] split_vma+0xc6/0x110 [ 24.161973] mprotect_fixup+0x8d2/0xb30 [ 24.162481] do_mprotect_pkey+0x87e/0xd40 [ 24.163010] __x64_sys_mprotect+0x78/0xc0 [ 24.163535] do_syscall_64+0x3f/0x90 [ 24.164020] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 24.164675] [ 24.164898] Freed by task 212: [ 24.165302] kasan_save_stack+0x22/0x50 [ 24.165812] kasan_set_track+0x25/0x30 [ 24.166305] kasan_save_free_info+0x2b/0x50 [ 24.166840] __kasan_slab_free+0x10a/0x190 [ 24.167390] kmem_cache_free+0x10d/0x4d0 [ 24.167925] rcu_core+0x8c8/0x2860 [ 24.168376] __do_softirq+0x1b7/0x7d4 [ 24.168857] [ 24.169075] Last potentially related work creation: [ 24.169668] kasan_save_stack+0x22/0x50 [ 24.170174] __kasan_record_aux_stack+0x8e/0xa0 [ 24.170761] __call_rcu_common.constprop.0+0x6a/0xb90 [ 24.171418] remove_vma+0x139/0x170 [ 24.171900] do_vmi_align_munmap+0xd4a/0x11f0 [ 24.172459] do_vmi_munmap+0x1f1/0x2b0 [ 24.172949] __vm_munmap+0x138/0x3a0 [ 24.173425] __x64_sys_munmap+0x59/0x80 [ 24.173922] do_syscall_64+0x3f/0x90 [ 24.174410] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 24.175066] [ 24.175284] The buggy address belongs to the object at ffff88801a195cb0 [ 24.175284] which belongs to the cache vm_area_struct of size 168 [ 24.176769] The buggy address is located 88 bytes inside of [ 24.176769] freed 168-byte region [ffff88801a195cb0, ffff88801a195d58) [ 24.178186] [ 24.178405] The buggy address belongs to the physical page: [ 24.179057] page:00000000e0999279 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1a195 [ 24.180166] memcg:ffff88801a3bcf01 [ 24.180598] flags: 0x100000000000200(slab|node=0|zone=1) [ 24.181241] page_type: 0xffffffff() [ 24.181698] raw: 0100000000000200 ffff8880087a0c80 dead000000000122 0000000000000000 [ 24.182625] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88801a3bcf01 [ 24.183547] page dumped because: kasan: bad access detected [ 24.184227] [ 24.184446] Memory state around the buggy address: [ 24.185026] ffff88801a195c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc [ 24.185883] ffff88801a195c80: fc fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb [ 24.186738] >ffff88801a195d00: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc [ 24.187593] ^ [ 24.188050] ffff88801a195d80: fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb [ 24.188923] ffff88801a195e00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 24.189805] ================================================================== [ 24.190932] Disabling lock debugging due to kernel taint Debian GNU/Linux 11 syzkaller ttyS0 syzkaller login: [ 26.137159] BUG: Bad rss-counter state mm:00000000d32fb601 type:MM_FILEPAGES val:33 [ 26.138095] BUG: Bad rss-counter state mm:00000000d32fb601 type:MM_ANONPAGES val:22 [ 26.639315] BUG: Bad rss-counter state mm:00000000e58a1e4c type:MM_FILEPAGES val:33 [ 26.640345] BUG: Bad rss-counter state mm:00000000e58a1e4c type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:26487' (ECDSA) to the list of known hosts. 2023/06/20 17:22:16 fuzzer started 2023/06/20 17:22:17 dialing manager at localhost:36067 2023/06/20 17:22:17 checking machine... 2023/06/20 17:22:17 checking revisions... [ 27.403668] kmemleak: Automatic memory scanning thread ended 2023/06/20 17:22:17 testing simple program... [ 27.457326] cgroup: Unknown subsys name 'net' [ 27.496491] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 17:22:16 Registers: info registers vcpu 0 RAX=dffffc0000000000 RBX=0000000000000000 RCX=1ffff110037a8348 RDX=ffffffff816e6340 RSI=ffff88801b852d70 RDI=ffff88800d8954d8 RBP=ffff88801a195040 RSP=ffff88800ea07948 R8 =ffff88801a195048 R9 =000000000000000a R10=000000000000000a R11=0000000000000000 R12=ffff88800d8954c8 R13=ffffed100370a5ae R14=ffff88801bd41a38 R15=ffff88801b852d70 RIP=ffffffff844d1710 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 00007fe3732ff900 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=00007fe3732de020 CR3=0000000015c34000 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=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 info registers vcpu 1 RAX=dffffc0000000000 RBX=ffff888008d173c8 RCX=ffff888008d173d0 RDX=ffff888008d18000 RSI=1ffff110011a2e68 RDI=ffff888008d17330 RBP=dffffc0000000000 RSP=ffff888008d172d0 R8 =0000000000000000 R9 =0000000000000000 R10=ffff888008d17330 R11=00000000000b6a61 R12=ffffed10011a2e68 R13=ffffed10011a2e67 R14=ffff888008d17378 R15=ffff888008d17330 RIP=ffffffff811305e0 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 00007fbc21eb2900 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=00007f2a479bce30 CR3=000000000d5aa000 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=000000000000ff00ffffffff00000000 XMM02=69767265732e6c6c696b66722d646d65 XMM03=00656369767265732e6c6c696b66722d XMM04=2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e XMM05=000055ea758811e0000055ea758d0f80 XMM06=00000000000000410000000000000000 XMM07=00000000000000000000000000000000 XMM08=7368746150796c6e4f64616552646e69 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000