[ 25.088855] BUG: Bad rss-counter state mm:000000009ea033d8 type:MM_FILEPAGES val:33 [ 25.090293] BUG: Bad rss-counter state mm:000000009ea033d8 type:MM_ANONPAGES val:22 [ 25.133951] ================================================================== [ 25.135118] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 25.136348] Read of size 8 at addr ffff888018d653f8 by task sshd/220 [ 25.137338] [ 25.137639] CPU: 0 PID: 220 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 25.138751] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 25.140010] Call Trace: [ 25.140428] [ 25.140798] dump_stack_lvl+0x91/0xf0 [ 25.141441] print_report+0xcc/0x620 [ 25.142075] ? __virt_addr_valid+0x102/0x340 [ 25.142795] ? vma_interval_tree_remove+0xc75/0xec0 [ 25.143612] ? vma_interval_tree_remove+0xc75/0xec0 [ 25.144435] kasan_report+0xbe/0xf0 [ 25.145062] ? vma_interval_tree_remove+0xc75/0xec0 [ 25.145881] vma_interval_tree_remove+0xc75/0xec0 [ 25.146564] vma_prepare+0xc54/0x11a0 [ 25.147113] __split_vma+0x5af/0x950 [ 25.147648] ? __pfx___split_vma+0x10/0x10 [ 25.148247] ? find_held_lock+0x2c/0x110 [ 25.148837] do_vmi_align_munmap+0x2ba/0x11f0 [ 25.149484] ? lock_is_held_type+0x9f/0x120 [ 25.150096] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 25.150786] ? mtree_range_walk+0x632/0x900 [ 25.151399] ? mas_walk+0x5c7/0x7c0 [ 25.151930] do_vmi_munmap+0x1f1/0x2b0 [ 25.152488] mmap_region+0x1f9/0x2660 [ 25.153028] ? vm_mmap_pgoff+0x15c/0x3a0 [ 25.153605] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 25.154406] ? __pfx_lock_acquire+0x10/0x10 [ 25.154998] ? __pfx_mmap_region+0x10/0x10 [ 25.155595] ? security_mmap_addr+0x7d/0xa0 [ 25.156186] ? get_unmapped_area+0x1f5/0x3f0 [ 25.156796] do_mmap+0x854/0xf00 [ 25.157286] vm_mmap_pgoff+0x1a6/0x3a0 [ 25.157869] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 25.158502] ksys_mmap_pgoff+0x3af/0x500 [ 25.159069] do_syscall_64+0x3f/0x90 [ 25.159599] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 25.160321] RIP: 0033:0x7f5e05e9ed82 [ 25.160835] 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 [ 25.163235] RSP: 002b:00007fffc24c2cd8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 25.164246] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f5e05e9ed82 [ 25.165199] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f5e052d8000 [ 25.166151] RBP: 00007f5e052d8000 R08: 0000000000000009 R09: 0000000000001000 [ 25.167106] R10: 0000000000000812 R11: 0000000000000206 R12: 0000559be7701b20 [ 25.168065] R13: 00007fffc24c2cf0 R14: 00007fffc24c2d20 R15: 00007fffc24c3080 [ 25.169020] [ 25.169346] [ 25.169608] Allocated by task 212: [ 25.170095] kasan_save_stack+0x22/0x50 [ 25.170666] kasan_set_track+0x25/0x30 [ 25.171219] __kasan_slab_alloc+0x59/0x70 [ 25.171803] kmem_cache_alloc+0x16b/0x370 [ 25.172379] vm_area_dup+0x20/0x160 [ 25.172891] __split_vma+0x170/0x950 [ 25.173419] split_vma+0xc6/0x110 [ 25.173912] mprotect_fixup+0x8d2/0xb30 [ 25.174469] do_mprotect_pkey+0x87e/0xd40 [ 25.175048] __x64_sys_mprotect+0x78/0xc0 [ 25.175629] do_syscall_64+0x3f/0x90 [ 25.176153] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 25.176869] [ 25.177112] Freed by task 212: [ 25.177565] kasan_save_stack+0x22/0x50 [ 25.178123] kasan_set_track+0x25/0x30 [ 25.178668] kasan_save_free_info+0x2b/0x50 [ 25.179256] __kasan_slab_free+0x10a/0x190 [ 25.179844] kmem_cache_free+0x10d/0x4d0 [ 25.180412] rcu_core+0x8c8/0x2860 [ 25.180911] __do_softirq+0x1b7/0x7d4 [ 25.181454] [ 25.181693] Last potentially related work creation: [ 25.182338] kasan_save_stack+0x22/0x50 [ 25.182895] __kasan_record_aux_stack+0x8e/0xa0 [ 25.183534] __call_rcu_common.constprop.0+0x6a/0xb90 [ 25.184253] remove_vma+0x139/0x170 [ 25.184755] do_vmi_align_munmap+0xd4a/0x11f0 [ 25.185370] do_vmi_munmap+0x1f1/0x2b0 [ 25.185932] __vm_munmap+0x138/0x3a0 [ 25.186450] __x64_sys_munmap+0x59/0x80 [ 25.187005] do_syscall_64+0x3f/0x90 [ 25.187526] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 25.188246] [ 25.188485] Second to last potentially related work creation: [ 25.189246] kasan_save_stack+0x22/0x50 [ 25.189814] __kasan_record_aux_stack+0x8e/0xa0 [ 25.190454] __call_rcu_common.constprop.0+0x6a/0xb90 [ 25.191176] remove_vma+0x139/0x170 [ 25.191676] do_vmi_align_munmap+0xd4a/0x11f0 [ 25.192300] do_vmi_munmap+0x1f1/0x2b0 [ 25.192850] __vm_munmap+0x138/0x3a0 [ 25.193366] __x64_sys_munmap+0x59/0x80 [ 25.193935] do_syscall_64+0x3f/0x90 [ 25.194452] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 25.195164] [ 25.195406] The buggy address belongs to the object at ffff888018d653a0 [ 25.195406] which belongs to the cache vm_area_struct of size 168 [ 25.197032] The buggy address is located 88 bytes inside of [ 25.197032] freed 168-byte region [ffff888018d653a0, ffff888018d65448) [ 25.198592] [ 25.198833] The buggy address belongs to the physical page: [ 25.199563] page:0000000017d03008 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x18d65 [ 25.200772] memcg:ffff88800f9f4801 [ 25.201245] flags: 0x100000000000200(slab|node=0|zone=1) [ 25.201969] page_type: 0xffffffff() [ 25.202467] raw: 0100000000000200 ffff88800879fc80 ffffea0000383900 dead000000000008 [ 25.203482] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800f9f4801 [ 25.204480] page dumped because: kasan: bad access detected [ 25.205207] [ 25.205461] Memory state around the buggy address: [ 25.206092] ffff888018d65280: fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 [ 25.207040] ffff888018d65300: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc [ 25.207979] >ffff888018d65380: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb [ 25.208927] ^ [ 25.209866] ffff888018d65400: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 25.210829] ffff888018d65480: fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 25.211774] ================================================================== [ 25.213223] Disabling lock debugging due to kernel taint Debian GNU/Linux 11 syzkaller ttyS0 syzkaller login: [ 27.231476] BUG: Bad rss-counter state mm:0000000007e59644 type:MM_FILEPAGES val:33 [ 27.232466] BUG: Bad rss-counter state mm:0000000007e59644 type:MM_ANONPAGES val:22 [ 27.719935] BUG: Bad rss-counter state mm:000000005ef30775 type:MM_FILEPAGES val:33 [ 27.721117] BUG: Bad rss-counter state mm:000000005ef30775 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:6464' (ECDSA) to the list of known hosts. 2023/06/19 12:38:49 fuzzer started 2023/06/19 12:38:49 dialing manager at localhost:44161 2023/06/19 12:38:49 checking machine... 2023/06/19 12:38:49 checking revisions... [ 28.476628] kmemleak: Automatic memory scanning thread ended 2023/06/19 12:38:49 testing simple program... [ 28.528348] cgroup: Unknown subsys name 'net' [ 28.572712] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 12:38:47 Registers: info registers vcpu 0 RAX=0000000000000000 RBX=0000000000000001 RCX=0000000000000001 RDX=0000000000000000 RSI=0000000000000009 RDI=ffff888018c37bd8 RBP=0000000000000001 RSP=ffff888018c37b70 R8 =0000000000000000 R9 =fffffbfff0ba77da R10=ffffffff85d3bed7 R11=00000000000b6996 R12=0000000000000001 R13=0000000000000000 R14=ffff888018c37bd8 R15=dffffc0000000000 RIP=ffffffff82270e24 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 00007f0501e1d900 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=00007f05023d2650 CR3=0000000018d54000 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=000000000000000000ffff0000000000 XMM02=2f00646f6874656d5f74707972636e65 XMM03=5320444f4854454d5f54505952434e45 XMM04=40404040404040404040404040404040 XMM05=5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a XMM06=20202020202020202020202020202020 XMM07=ff00ffffffffffffffffffffffffffff XMM08=20002020202020200020202020202020 XMM09=0000ffffffffffffffffffffffffffff XMM10=00002020202020200020202020202020 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=0000000080000001 RBX=00000000000000b0 RCX=ffffffff81c608df RDX=ffff8880158a8000 RSI=0000000000000000 RDI=0000000000000005 RBP=dffffc0000000000 RSP=ffff88801584f8c0 R8 =0000000000000005 R9 =0000000000000000 R10=0000000000000000 R11=00000000000b6996 R12=0000000000000000 R13=0000000000000000 R14=ffff88800ffbc0b8 R15=ffff88800ffbc000 RIP=ffffffff814c07eb 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 00007f2bb72f0700 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=00007f48e67bfb90 CR3=000000000f15c000 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=2038343a38333a3231203931206e754a XMM01=73732878696e755f6d6170203a5d3932 XMM02=65736f6c63206e6f6973736573203a29 XMM03=755f6d6170203a5d3932325b64687373 XMM04=69662068637573206f4e203a656c6163 XMM05=3a656c696620766e65206e65706f206f XMM06=65733a6468737328766e655f6d617020 XMM07=6b7a79732038343a38333a3231203931 XMM08=3d656e696c646d632022656369767265 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000