[ 81.986917] BUG: Bad rss-counter state mm:0000000030f0afd4 type:MM_FILEPAGES val:33 [ 81.986950] BUG: Bad rss-counter state mm:0000000030f0afd4 type:MM_ANONPAGES val:22 [ 82.160462] ================================================================== [ 82.161396] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 82.162347] Read of size 8 at addr ffff88801bc34a50 by task sshd/220 [ 82.163117] [ 82.163339] CPU: 1 PID: 220 Comm: sshd Tainted: G L 6.4.0-rc7-next-20230619 #1 [ 82.164600] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 82.165572] Call Trace: [ 82.165899] [ 82.166182] dump_stack_lvl+0x91/0xf0 [ 82.166690] print_report+0xcc/0x620 [ 82.167186] ? __virt_addr_valid+0x102/0x340 [ 82.167746] ? vma_interval_tree_remove+0xc75/0xec0 [ 82.168369] ? vma_interval_tree_remove+0xc75/0xec0 [ 82.168998] kasan_report+0xbe/0xf0 [ 82.169478] ? vma_interval_tree_remove+0xc75/0xec0 [ 82.170108] vma_interval_tree_remove+0xc75/0xec0 [ 82.170715] vma_prepare+0xc54/0x11a0 [ 82.171198] __split_vma+0x5af/0x950 [ 82.171685] ? __pfx___split_vma+0x10/0x10 [ 82.172221] ? find_held_lock+0x2c/0x110 [ 82.172764] do_vmi_align_munmap+0x2ba/0x11f0 [ 82.173332] ? lock_is_held_type+0x9f/0x120 [ 82.173868] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 82.174480] ? mtree_range_walk+0x632/0x900 [ 82.175035] ? mas_walk+0x5c7/0x7c0 [ 82.175514] do_vmi_munmap+0x1f1/0x2b0 [ 82.176011] mmap_region+0x1f9/0x2660 [ 82.176513] ? vm_mmap_pgoff+0x15c/0x3a0 [ 82.177026] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 82.177748] ? __pfx_lock_acquire+0x10/0x10 [ 82.178284] ? __pfx_mmap_region+0x10/0x10 [ 82.178822] ? security_mmap_addr+0x7d/0xa0 [ 82.179355] ? get_unmapped_area+0x1f5/0x3f0 [ 82.179924] do_mmap+0x854/0xf00 [ 82.180378] vm_mmap_pgoff+0x1a6/0x3a0 [ 82.180891] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 82.181458] ksys_mmap_pgoff+0x3af/0x500 [ 82.181970] do_syscall_64+0x3f/0x90 [ 82.182457] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 82.183111] RIP: 0033:0x7fc79eb74d82 [ 82.183573] 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 [ 82.185766] RSP: 002b:00007fff67370728 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 82.186690] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fc79eb74d82 [ 82.187545] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fc79dfae000 [ 82.188397] RBP: 00007fc79dfae000 R08: 0000000000000009 R09: 0000000000001000 [ 82.189256] R10: 0000000000000812 R11: 0000000000000206 R12: 0000557694416ec0 [ 82.190119] R13: 00007fff67370740 R14: 00007fff67370770 R15: 00007fff67370ad0 [ 82.190984] [ 82.191279] [ 82.191493] Allocated by task 208: [ 82.191928] kasan_save_stack+0x22/0x50 [ 82.192444] kasan_set_track+0x25/0x30 [ 82.192960] __kasan_slab_alloc+0x59/0x70 [ 82.193488] kmem_cache_alloc+0x16b/0x370 [ 82.194010] vm_area_dup+0x20/0x160 [ 82.194470] __split_vma+0x170/0x950 [ 82.194938] split_vma+0xc6/0x110 [ 82.195383] mprotect_fixup+0x8d2/0xb30 [ 82.195891] do_mprotect_pkey+0x87e/0xd40 [ 82.196417] __x64_sys_mprotect+0x78/0xc0 [ 82.196955] do_syscall_64+0x3f/0x90 [ 82.197430] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 82.198078] [ 82.198296] Freed by task 205: [ 82.198710] kasan_save_stack+0x22/0x50 [ 82.199229] kasan_set_track+0x25/0x30 [ 82.199744] kasan_save_free_info+0x2b/0x50 [ 82.200290] __kasan_slab_free+0x10a/0x190 [ 82.200838] kmem_cache_free+0x10d/0x4d0 [ 82.201360] rcu_core+0x8c8/0x2860 [ 82.201813] __do_softirq+0x1b7/0x7d4 [ 82.202295] [ 82.202513] Last potentially related work creation: [ 82.203107] kasan_save_stack+0x22/0x50 [ 82.203629] __kasan_record_aux_stack+0x8e/0xa0 [ 82.204205] __call_rcu_common.constprop.0+0x6a/0xb90 [ 82.204941] remove_vma+0x139/0x170 [ 82.205402] do_vmi_align_munmap+0xd4a/0x11f0 [ 82.205971] do_vmi_munmap+0x1f1/0x2b0 [ 82.206466] __vm_munmap+0x138/0x3a0 [ 82.206937] __x64_sys_munmap+0x59/0x80 [ 82.207444] do_syscall_64+0x3f/0x90 [ 82.207937] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 82.208603] [ 82.208819] The buggy address belongs to the object at ffff88801bc349f8 [ 82.208819] which belongs to the cache vm_area_struct of size 168 [ 82.210321] The buggy address is located 88 bytes inside of [ 82.210321] freed 168-byte region [ffff88801bc349f8, ffff88801bc34aa0) [ 82.211743] [ 82.211962] The buggy address belongs to the physical page: [ 82.212643] page:0000000077cd809a refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1bc34 [ 82.213748] memcg:ffff88801a3d0501 [ 82.214182] flags: 0x100000000000200(slab|node=0|zone=1) [ 82.214832] page_type: 0xffffffff() [ 82.215297] raw: 0100000000000200 ffff88800879fc80 dead000000000122 0000000000000000 [ 82.216241] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88801a3d0501 [ 82.217173] page dumped because: kasan: bad access detected [ 82.217847] [ 82.218064] Memory state around the buggy address: [ 82.218647] ffff88801bc34900: fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 82.219528] ffff88801bc34980: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fa [ 82.220411] >ffff88801bc34a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 82.221291] ^ [ 82.222005] ffff88801bc34a80: fb fb fb fb fc fc fc fc fc fc fc fc fa fb fb fb [ 82.222875] ffff88801bc34b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 82.223749] ================================================================== [ 82.224737] Disabling lock debugging due to kernel taint Debian GNU/Linux 11 syzkaller ttyS0 syzkaller login: [ 84.111836] BUG: Bad rss-counter state mm:0000000071b3701f type:MM_FILEPAGES val:33 [ 84.112657] BUG: Bad rss-counter state mm:0000000071b3701f type:MM_ANONPAGES val:22 [ 84.517100] BUG: Bad rss-counter state mm:000000003bb7d697 type:MM_FILEPAGES val:33 [ 84.517844] BUG: Bad rss-counter state mm:000000003bb7d697 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:16952' (ECDSA) to the list of known hosts. 2023/06/19 18:25:30 fuzzer started 2023/06/19 18:25:30 dialing manager at localhost:44161 2023/06/19 18:25:30 checking machine... 2023/06/19 18:25:30 checking revisions... [ 85.245263] kmemleak: Automatic memory scanning thread ended 2023/06/19 18:25:30 testing simple program... [ 85.295780] cgroup: Unknown subsys name 'net' [ 85.334122] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 18:24:32 Registers: info registers vcpu 0 RAX=0000000000000002 RBX=0000000000000001 RCX=ffffffff86136d88 RDX=0000000000000000 RSI=1ffff11001ed8f50 RDI=0000000000000001 RBP=ffff88800f6c7a98 RSP=ffff88800f6c79d0 R8 =ffffffff86136d8c R9 =ffff88800f6c7a80 R10=0000000000038001 R11=0000000000020c48 R12=ffff88800f6c7aa0 R13=ffff88800f6c7a88 R14=ffff88800f6c7a81 R15=ffff88800f6c7a40 RIP=ffffffff81130af5 RFL=00000216 [----AP-] 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 00007f53e7322900 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=00007ffc7c065000 CR3=000000001968e000 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=ffffffffffffffffffff000000000000 XMM01=000000000000003635006b6f6c6c756e XMM02=62003d73646e756f7200323135616873 XMM03=5320444f4854454d5f54505952434e45 XMM04=40404040404040404040404040404040 XMM05=5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a XMM06=20202020202020202020202020202020 XMM07=00000000000000000000000000000000 XMM08=00000000000000000000000000202020 XMM09=ff0000ffffffffffff00000000ffffff XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=0000000080000000 RBX=00007f2d58348000 RCX=ffffffff844b27e0 RDX=ffff8880165ad1c0 RSI=0000000000000000 RDI=0000000000000006 RBP=ffff8880164bfc98 RSP=ffff8880164bfaf0 R8 =0000000000000006 R9 =fffffffffffffffe R10=00007f2d58348000 R11=0000000000000000 R12=fffffffffffffffe R13=ffff88800d9a2740 R14=ffff8880164bfcb0 R15=ffff8880164bfca0 RIP=ffffffff814c07eb RFL=00000282 [--S----] 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=00007f2d57e52514 CR3=000000000d6cc000 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=00007f2d581eb00000007f2d581ec8c0 XMM03=00007f2d58a2a51000007f2d57de4000 XMM04=00007f2d58a2a51000007f2d57de4000 XMM05=00007f2d581eb00000007f2d581ec8c0 XMM06=00007f2d581ec2f000007f2d58351950 XMM07=00007f2d581ebcf000007f2d581eb760 XMM08=00007f2d581eb00000007f2d58351950 XMM09=00000000000000000000ff0000000000 XMM10=00000000000000000000200000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000