syzkaller login: [ 32.427273] BUG: Bad rss-counter state mm:000000002a0aae01 type:MM_FILEPAGES val:33 [ 32.428510] BUG: Bad rss-counter state mm:000000002a0aae01 type:MM_ANONPAGES val:22 [ 32.465899] ================================================================== [ 32.466803] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 32.467744] Read of size 8 at addr ffff88800e557798 by task sshd/219 [ 32.468530] [ 32.468897] CPU: 0 PID: 219 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 32.469796] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 32.470810] Call Trace: [ 32.471152] [ 32.471438] dump_stack_lvl+0x91/0xf0 [ 32.471935] print_report+0xcc/0x620 [ 32.472414] ? __virt_addr_valid+0x102/0x340 [ 32.472961] ? vma_interval_tree_remove+0xc75/0xec0 [ 32.473568] ? vma_interval_tree_remove+0xc75/0xec0 [ 32.474186] kasan_report+0xbe/0xf0 [ 32.474674] ? vma_interval_tree_remove+0xc75/0xec0 [ 32.475288] vma_interval_tree_remove+0xc75/0xec0 [ 32.475890] vma_prepare+0xc54/0x11a0 [ 32.476376] __split_vma+0x5af/0x950 [ 32.476846] ? __pfx___split_vma+0x10/0x10 [ 32.477371] ? find_held_lock+0x2c/0x110 [ 32.477901] do_vmi_align_munmap+0x2ba/0x11f0 [ 32.478484] ? lock_is_held_type+0x9f/0x120 [ 32.479020] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 32.479625] ? mtree_range_walk+0x632/0x900 [ 32.480173] ? mas_walk+0x5c7/0x7c0 [ 32.480649] do_vmi_munmap+0x1f1/0x2b0 [ 32.481144] mmap_region+0x1f9/0x2660 [ 32.481624] ? vm_mmap_pgoff+0x15c/0x3a0 [ 32.482135] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 32.482880] ? __pfx_lock_acquire+0x10/0x10 [ 32.483419] ? __pfx_mmap_region+0x10/0x10 [ 32.483949] ? security_mmap_addr+0x7d/0xa0 [ 32.484471] ? get_unmapped_area+0x1f5/0x3f0 [ 32.485018] do_mmap+0x854/0xf00 [ 32.485453] vm_mmap_pgoff+0x1a6/0x3a0 [ 32.485946] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 32.486523] ksys_mmap_pgoff+0x3af/0x500 [ 32.487047] do_syscall_64+0x3f/0x90 [ 32.487518] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 32.488171] RIP: 0033:0x7fdd02419d82 [ 32.488628] 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 [ 32.490780] RSP: 002b:00007fffc99fda88 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 32.491692] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fdd02419d82 [ 32.492539] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fdd01853000 [ 32.493386] RBP: 00007fdd01853000 R08: 0000000000000009 R09: 0000000000001000 [ 32.494262] R10: 0000000000000812 R11: 0000000000000206 R12: 000055d0f1ddcec0 [ 32.495105] R13: 00007fffc99fdaa0 R14: 00007fffc99fdad0 R15: 00007fffc99fde30 [ 32.495974] [ 32.496267] [ 32.496483] Allocated by task 212: [ 32.496915] kasan_save_stack+0x22/0x50 [ 32.497417] kasan_set_track+0x25/0x30 [ 32.497910] __kasan_slab_alloc+0x59/0x70 [ 32.498438] kmem_cache_alloc+0x16b/0x370 [ 32.498959] vm_area_dup+0x20/0x160 [ 32.499410] __split_vma+0x170/0x950 [ 32.499881] split_vma+0xc6/0x110 [ 32.500319] mprotect_fixup+0x8d2/0xb30 [ 32.500819] do_mprotect_pkey+0x87e/0xd40 [ 32.501337] __x64_sys_mprotect+0x78/0xc0 [ 32.501860] do_syscall_64+0x3f/0x90 [ 32.502352] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 32.502989] [ 32.503205] Freed by task 19: [ 32.503584] kasan_save_stack+0x22/0x50 [ 32.504095] kasan_set_track+0x25/0x30 [ 32.504585] kasan_save_free_info+0x2b/0x50 [ 32.505131] __kasan_slab_free+0x10a/0x190 [ 32.505667] kmem_cache_free+0x10d/0x4d0 [ 32.506184] rcu_core+0x8c8/0x2860 [ 32.506641] __do_softirq+0x1b7/0x7d4 [ 32.507119] [ 32.507337] Last potentially related work creation: [ 32.507924] kasan_save_stack+0x22/0x50 [ 32.508437] __kasan_record_aux_stack+0x8e/0xa0 [ 32.509016] __call_rcu_common.constprop.0+0x6a/0xb90 [ 32.509659] remove_vma+0x139/0x170 [ 32.510108] do_vmi_align_munmap+0xd4a/0x11f0 [ 32.510679] do_vmi_munmap+0x1f1/0x2b0 [ 32.511163] __vm_munmap+0x138/0x3a0 [ 32.511626] __x64_sys_munmap+0x59/0x80 [ 32.512121] do_syscall_64+0x3f/0x90 [ 32.512597] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 32.513245] [ 32.513458] Second to last potentially related work creation: [ 32.514144] kasan_save_stack+0x22/0x50 [ 32.514658] __kasan_record_aux_stack+0x8e/0xa0 [ 32.515228] __call_rcu_common.constprop.0+0x6a/0xb90 [ 32.515877] remove_vma+0x139/0x170 [ 32.516330] do_vmi_align_munmap+0xd4a/0x11f0 [ 32.516889] do_vmi_munmap+0x1f1/0x2b0 [ 32.517375] mmap_region+0x1f9/0x2660 [ 32.517854] do_mmap+0x854/0xf00 [ 32.518301] vm_mmap_pgoff+0x1a6/0x3a0 [ 32.518791] ksys_mmap_pgoff+0x3af/0x500 [ 32.519289] do_syscall_64+0x3f/0x90 [ 32.519771] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 32.520416] [ 32.520631] The buggy address belongs to the object at ffff88800e557740 [ 32.520631] which belongs to the cache vm_area_struct of size 168 [ 32.522113] The buggy address is located 88 bytes inside of [ 32.522113] freed 168-byte region [ffff88800e557740, ffff88800e5577e8) [ 32.523512] [ 32.523728] The buggy address belongs to the physical page: [ 32.524399] page:00000000cf561b07 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xe557 [ 32.525494] memcg:ffff88800c63df01 [ 32.525921] flags: 0x100000000000200(slab|node=0|zone=1) [ 32.526586] page_type: 0xffffffff() [ 32.527035] raw: 0100000000000200 ffff88800879fc80 ffffea00003aaa00 dead000000000002 [ 32.527959] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800c63df01 [ 32.528868] page dumped because: kasan: bad access detected [ 32.529530] [ 32.529745] Memory state around the buggy address: [ 32.530337] ffff88800e557680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.531192] ffff88800e557700: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 32.532044] >ffff88800e557780: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc [ 32.532896] ^ [ 32.533396] ffff88800e557800: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 [ 32.534267] ffff88800e557880: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc [ 32.535121] ================================================================== [ 32.536244] Disabling lock debugging due to kernel taint [ 34.481811] BUG: Bad rss-counter state mm:00000000f8d0fb6c type:MM_FILEPAGES val:33 [ 34.483614] BUG: Bad rss-counter state mm:00000000f8d0fb6c type:MM_ANONPAGES val:22 [ 34.947988] BUG: Bad rss-counter state mm:00000000999b8f7b type:MM_FILEPAGES val:33 [ 34.949193] BUG: Bad rss-counter state mm:00000000999b8f7b type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:33423' (ECDSA) to the list of known hosts. 2023/06/19 23:45:06 fuzzer started 2023/06/19 23:45:07 dialing manager at localhost:44161 2023/06/19 23:45:07 checking machine... 2023/06/19 23:45:07 checking revisions... [ 35.651079] kmemleak: Automatic memory scanning thread ended 2023/06/19 23:45:07 testing simple program... [ 35.708244] cgroup: Unknown subsys name 'net' [ 35.771913] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 23:45:05 Registers: info registers vcpu 0 RAX=0000000000000000 RBX=0000000000000000 RCX=ffffffff81c61f1e RDX=ffff888015af0000 RSI=0000000000000008 RDI=ffffffff85d3bed0 RBP=0000000000000000 RSP=ffff888016e6f900 R8 =0000000000000005 R9 =0000000000000000 R10=0000000000000000 R11=00000000000b6996 R12=0000000000000008 R13=0000000000000c40 R14=ffff88801600d688 R15=ffffffff87f3b160 RIP=ffffffff8180fd28 RFL=00000256 [---ZAP-] 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 00007f7747799700 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=00007f72b6ed8618 CR3=0000000013a40000 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=2036303a35343a3332203931206e754a XMM01=73732878696e755f6d6170203a5d3832 XMM02=65736f6c63206e6f6973736573203a29 XMM03=755f6d6170203a5d3832325b64687373 XMM04=69662068637573206f4e203a656c6163 XMM05=3a656c696620766e65206e65706f206f XMM06=65733a6468737328766e655f6d617020 XMM07=6b7a79732036303a35343a3332203931 XMM08=3d656e696c646d632022656369767265 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=ffff88806cf35000 RBX=0000000000000001 RCX=ffffffff8450c50e RDX=ffffed100d9e6a01 RSI=0000000000000004 RDI=ffffffff812889a5 RBP=dffffc0000000000 RSP=ffff888008e27e70 R8 =0000000000000000 R9 =ffffed100d9e6a00 R10=ffff88806cf35003 R11=ffff888008c58400 R12=ffffffff85d3bed0 R13=1ffff110011c4fd3 R14=0000000000000000 R15=0000000000000000 RIP=ffffffff8450d49f RFL=00000246 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=1 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=00007f760e1c9420 CR3=000000000d516000 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=06ac2779a82325a700442f28baed8bdb XMM02=000000000011ed20ec2efd57dc4c00df XMM03=0000000000125678277ce0173848879a XMM04=0622e0d719b3435d00000000000ae988 XMM05=dfcdbad4f1609c370000000000136550 XMM06=166ccc8ed56c082600000000001353b8 XMM07=e042d86d42eb936e00000000001258f8 XMM08=277ce0173848879a000000000011ed80 XMM09=00000000000000000000000000000000 XMM10=20200000000020202020202020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000