[ 36.990834] BUG: Bad rss-counter state mm:00000000640ee230 type:MM_FILEPAGES val:33 [ 36.992037] BUG: Bad rss-counter state mm:00000000640ee230 type:MM_ANONPAGES val:22 [ 37.031942] ================================================================== [ 37.033233] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 37.034618] Read of size 8 at addr ffff88800ddb26b0 by task sshd/218 [ 37.035364] [ 37.035658] CPU: 1 PID: 218 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 37.036475] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 37.037630] Call Trace: [ 37.037937] [ 37.038218] dump_stack_lvl+0x91/0xf0 [ 37.038683] print_report+0xcc/0x620 [ 37.039141] ? __virt_addr_valid+0x102/0x340 [ 37.039666] ? vma_interval_tree_remove+0xc75/0xec0 [ 37.040249] ? vma_interval_tree_remove+0xc75/0xec0 [ 37.040853] kasan_report+0xbe/0xf0 [ 37.041324] ? vma_interval_tree_remove+0xc75/0xec0 [ 37.041948] vma_interval_tree_remove+0xc75/0xec0 [ 37.042562] vma_prepare+0xc54/0x11a0 [ 37.043032] __split_vma+0x5af/0x950 [ 37.043494] ? __pfx___split_vma+0x10/0x10 [ 37.044020] ? find_held_lock+0x2c/0x110 [ 37.044540] do_vmi_align_munmap+0x2ba/0x11f0 [ 37.045093] ? lock_is_held_type+0x9f/0x120 [ 37.045628] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 37.046238] ? mtree_range_walk+0x632/0x900 [ 37.046788] ? mas_walk+0x5c7/0x7c0 [ 37.047260] do_vmi_munmap+0x1f1/0x2b0 [ 37.047751] mmap_region+0x1f9/0x2660 [ 37.048224] ? vm_mmap_pgoff+0x15c/0x3a0 [ 37.048737] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 37.049447] ? __pfx_lock_acquire+0x10/0x10 [ 37.049969] ? __pfx_mmap_region+0x10/0x10 [ 37.050512] ? security_mmap_addr+0x7d/0xa0 [ 37.051035] ? get_unmapped_area+0x1f5/0x3f0 [ 37.051590] do_mmap+0x854/0xf00 [ 37.052027] vm_mmap_pgoff+0x1a6/0x3a0 [ 37.052526] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 37.053083] ksys_mmap_pgoff+0x3af/0x500 [ 37.053591] do_syscall_64+0x3f/0x90 [ 37.054088] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 37.054726] RIP: 0033:0x7f7ac9d32d82 [ 37.055177] 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 [ 37.057296] RSP: 002b:00007ffe254243e8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 37.058210] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f7ac9d32d82 [ 37.059064] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f7ac916c000 [ 37.059914] RBP: 00007f7ac916c000 R08: 0000000000000009 R09: 0000000000001000 [ 37.060755] R10: 0000000000000812 R11: 0000000000000206 R12: 00005576dbceef70 [ 37.061602] R13: 00007ffe25424400 R14: 00007ffe25424430 R15: 00007ffe25424790 [ 37.062473] [ 37.062759] [ 37.062968] Allocated by task 211: [ 37.063394] kasan_save_stack+0x22/0x50 [ 37.063890] kasan_set_track+0x25/0x30 [ 37.064378] __kasan_slab_alloc+0x59/0x70 [ 37.064901] kmem_cache_alloc+0x16b/0x370 [ 37.065406] vm_area_dup+0x20/0x160 [ 37.065852] __split_vma+0x170/0x950 [ 37.066335] split_vma+0xc6/0x110 [ 37.066777] mprotect_fixup+0x8d2/0xb30 [ 37.067280] do_mprotect_pkey+0x87e/0xd40 [ 37.067797] __x64_sys_mprotect+0x78/0xc0 [ 37.068312] do_syscall_64+0x3f/0x90 [ 37.068790] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 37.069422] [ 37.069638] Freed by task 211: [ 37.070039] kasan_save_stack+0x22/0x50 [ 37.070554] kasan_set_track+0x25/0x30 [ 37.071048] kasan_save_free_info+0x2b/0x50 [ 37.071574] __kasan_slab_free+0x10a/0x190 [ 37.072100] kmem_cache_free+0x10d/0x4d0 [ 37.072609] rcu_core+0x8c8/0x2860 [ 37.073058] __do_softirq+0x1b7/0x7d4 [ 37.073530] [ 37.073747] Last potentially related work creation: [ 37.074351] kasan_save_stack+0x22/0x50 [ 37.074855] __kasan_record_aux_stack+0x8e/0xa0 [ 37.075422] __call_rcu_common.constprop.0+0x6a/0xb90 [ 37.076130] remove_vma+0x139/0x170 [ 37.076576] do_vmi_align_munmap+0xd4a/0x11f0 [ 37.077129] do_vmi_munmap+0x1f1/0x2b0 [ 37.077613] __vm_munmap+0x138/0x3a0 [ 37.078122] __x64_sys_munmap+0x59/0x80 [ 37.078626] do_syscall_64+0x3f/0x90 [ 37.079112] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 37.079755] [ 37.079963] Second to last potentially related work creation: [ 37.080645] kasan_save_stack+0x22/0x50 [ 37.081144] __kasan_record_aux_stack+0x8e/0xa0 [ 37.081712] __call_rcu_common.constprop.0+0x6a/0xb90 [ 37.082357] remove_vma+0x139/0x170 [ 37.082807] do_vmi_align_munmap+0xd4a/0x11f0 [ 37.083356] do_vmi_munmap+0x1f1/0x2b0 [ 37.083847] mmap_region+0x1f9/0x2660 [ 37.084324] do_mmap+0x854/0xf00 [ 37.084754] vm_mmap_pgoff+0x1a6/0x3a0 [ 37.085243] ksys_mmap_pgoff+0x3af/0x500 [ 37.085742] do_syscall_64+0x3f/0x90 [ 37.086224] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 37.086865] [ 37.087082] The buggy address belongs to the object at ffff88800ddb2658 [ 37.087082] which belongs to the cache vm_area_struct of size 168 [ 37.088552] The buggy address is located 88 bytes inside of [ 37.088552] freed 168-byte region [ffff88800ddb2658, ffff88800ddb2700) [ 37.089940] [ 37.090163] The buggy address belongs to the physical page: [ 37.090822] page:00000000c6c4a6c1 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xddb2 [ 37.091884] memcg:ffff88800c4d1901 [ 37.092309] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 37.093007] page_type: 0xffffffff() [ 37.093460] raw: 0100000000000200 ffff88800879fc80 ffffea000035e100 dead000000000005 [ 37.094381] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800c4d1901 [ 37.095304] page dumped because: kasan: bad access detected [ 37.095977] [ 37.096197] Memory state around the buggy address: [ 37.096787] ffff88800ddb2580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.097626] ffff88800ddb2600: fb fb fb fc fc fc fc fc fc fc fc fa fb fb fb fb [ 37.098481] >ffff88800ddb2680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.099360] ^ [ 37.099943] ffff88800ddb2700: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 37.100802] ffff88800ddb2780: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc [ 37.101646] ================================================================== [ 37.102690] Disabling lock debugging due to kernel taint Debian GNU/Linux 11 syzkaller ttyS0 syzkaller login: [ 39.187484] BUG: Bad rss-counter state mm:000000003bccc32e type:MM_FILEPAGES val:33 [ 39.188480] BUG: Bad rss-counter state mm:000000003bccc32e type:MM_ANONPAGES val:22 [ 39.644553] BUG: Bad rss-counter state mm:00000000f6fc0cc7 type:MM_FILEPAGES val:33 [ 39.645580] BUG: Bad rss-counter state mm:00000000f6fc0cc7 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:8315' (ECDSA) to the list of known hosts. 2023/06/19 16:32:15 fuzzer started 2023/06/19 16:32:16 dialing manager at localhost:44161 2023/06/19 16:32:16 checking machine... 2023/06/19 16:32:16 checking revisions... [ 40.417053] kmemleak: Automatic memory scanning thread ended 2023/06/19 16:32:16 testing simple program... [ 40.457981] cgroup: Unknown subsys name 'net' [ 40.496064] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 16:32:09 Registers: info registers vcpu 0 RAX=1ffffffff0a58b94 RBX=0000000000000000 RCX=ffffffff8153447a RDX=dffffc0000000000 RSI=0000000000000008 RDI=ffff888016417888 RBP=ffff888016417888 RSP=ffff88806ce09fe0 R8 =0000000000000000 R9 =fffffbfff0ba77da R10=ffffffff85d3bed7 R11=ffff88806ce09ff8 R12=0000000000000000 R13=0000000000000000 R14=0000000000000000 R15=0000000000000000 RIP=ffffffff81105ad3 RFL=00000012 [----A--] 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 00007fba33098700 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=00007f27cda641b0 CR3=000000000ef72000 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=8596a765467b1292e544df7622177e57 XMM02=000000000011d820eff9b2d0a8fce9cb XMM03=000000000011d8f02c67c8bc2e329bc3 XMM04=e76416fef29f2b6800000000000ae988 XMM05=76d037100cb4781300000000001362c0 XMM06=bdf2e299e47b49d50000000000134d40 XMM07=fb795ef6d65770560000000000124230 XMM08=2c67c8bc2e329bc3000000000011d890 XMM09=00000000000000000000000000000000 XMM10=20200000000020202020202020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=ffff88801ae98c28 RBX=dffffc0000000000 RCX=1ffff110035d3030 RDX=ffff88801ae98178 RSI=ffff88800c9b19e8 RDI=ffff88801ae98180 RBP=ffff88801ae98260 RSP=ffff888019ed7c48 R8 =0000000000000001 R9 =ffffed10033daf77 R10=0000000000000003 R11=00000000000b6996 R12=0000607f92e12380 R13=fffffbfff0ba77db R14=0000000000000001 R15=0000000000000282 RIP=ffffffff8451386e RFL=00000046 [---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 00007f9e957c3900 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=00005630a410c000 CR3=000000000dae4000 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=00007f48429f051000005630a4108790 XMM02=6f6974707972636e6561737268746977 XMM03=00000000000000000000000000777074 XMM04=40404040404040404040404040404040 XMM05=5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a XMM06=20202020202020202020202020202020 XMM07=ffffffffffff00ffffff00ffffff00ff XMM08=00002000000000202020002020200000 XMM09=ffffffffffff00ffffff00ffffff00ff XMM10=00002000000000202020002020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000