[ 24.894005] BUG: Bad rss-counter state mm:000000005a888472 type:MM_FILEPAGES val:33 [ 24.895239] BUG: Bad rss-counter state mm:000000005a888472 type:MM_ANONPAGES val:22 [ 25.012734] ================================================================== [ 25.013474] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 25.014184] Read of size 8 at addr ffff88800eb253f8 by task sshd/219 [ 25.014780] [ 25.014948] CPU: 1 PID: 219 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 25.015586] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 25.016192] Call Trace: [ 25.016396] [ 25.016571] dump_stack_lvl+0x91/0xf0 [ 25.016876] print_report+0xcc/0x620 [ 25.017172] ? __virt_addr_valid+0x102/0x340 [ 25.017521] ? vma_interval_tree_remove+0xc75/0xec0 [ 25.017901] ? vma_interval_tree_remove+0xc75/0xec0 [ 25.018291] kasan_report+0xbe/0xf0 [ 25.018588] ? vma_interval_tree_remove+0xc75/0xec0 [ 25.018982] vma_interval_tree_remove+0xc75/0xec0 [ 25.019356] vma_prepare+0xc54/0x11a0 [ 25.019662] __split_vma+0x5af/0x950 [ 25.019953] ? __pfx___split_vma+0x10/0x10 [ 25.020286] ? find_held_lock+0x2c/0x110 [ 25.020611] do_vmi_align_munmap+0x2ba/0x11f0 [ 25.020968] ? lock_is_held_type+0x9f/0x120 [ 25.021302] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 25.021678] ? mtree_range_walk+0x632/0x900 [ 25.022026] ? mas_walk+0x5c7/0x7c0 [ 25.022325] do_vmi_munmap+0x1f1/0x2b0 [ 25.022640] mmap_region+0x1f9/0x2660 [ 25.022949] ? vm_mmap_pgoff+0x15c/0x3a0 [ 25.023273] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 25.023715] ? __pfx_lock_acquire+0x10/0x10 [ 25.024046] ? __pfx_mmap_region+0x10/0x10 [ 25.024379] ? security_mmap_addr+0x7d/0xa0 [ 25.024713] ? get_unmapped_area+0x1f5/0x3f0 [ 25.025057] do_mmap+0x854/0xf00 [ 25.025336] vm_mmap_pgoff+0x1a6/0x3a0 [ 25.025644] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 25.025999] ksys_mmap_pgoff+0x3af/0x500 [ 25.026312] do_syscall_64+0x3f/0x90 [ 25.026611] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 25.027031] RIP: 0033:0x7fad30a4ad82 [ 25.027320] 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.028673] RSP: 002b:00007fffe95288a8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 25.029241] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fad30a4ad82 [ 25.029771] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fad2fe84000 [ 25.030300] RBP: 00007fad2fe84000 R08: 0000000000000009 R09: 0000000000001000 [ 25.030838] R10: 0000000000000812 R11: 0000000000000206 R12: 0000563f4facfb20 [ 25.031368] R13: 00007fffe95288c0 R14: 00007fffe95288f0 R15: 00007fffe9528c50 [ 25.031920] [ 25.032103] [ 25.032241] Allocated by task 212: [ 25.032512] kasan_save_stack+0x22/0x50 [ 25.032829] kasan_set_track+0x25/0x30 [ 25.033134] __kasan_slab_alloc+0x59/0x70 [ 25.033465] kmem_cache_alloc+0x16b/0x370 [ 25.033791] vm_area_dup+0x20/0x160 [ 25.034072] __split_vma+0x170/0x950 [ 25.034365] split_vma+0xc6/0x110 [ 25.034637] mprotect_fixup+0x8d2/0xb30 [ 25.034961] do_mprotect_pkey+0x87e/0xd40 [ 25.035286] __x64_sys_mprotect+0x78/0xc0 [ 25.035614] do_syscall_64+0x3f/0x90 [ 25.035909] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 25.036309] [ 25.036442] Freed by task 19: [ 25.036682] kasan_save_stack+0x22/0x50 [ 25.036997] kasan_set_track+0x25/0x30 [ 25.037305] kasan_save_free_info+0x2b/0x50 [ 25.037638] __kasan_slab_free+0x10a/0x190 [ 25.037973] kmem_cache_free+0x10d/0x4d0 [ 25.038292] rcu_core+0x8c8/0x2860 [ 25.038573] __do_softirq+0x1b7/0x7d4 [ 25.038888] [ 25.039021] Last potentially related work creation: [ 25.039386] kasan_save_stack+0x22/0x50 [ 25.039702] __kasan_record_aux_stack+0x8e/0xa0 [ 25.040063] __call_rcu_common.constprop.0+0x6a/0xb90 [ 25.040473] remove_vma+0x139/0x170 [ 25.040764] do_vmi_align_munmap+0xd4a/0x11f0 [ 25.041114] do_vmi_munmap+0x1f1/0x2b0 [ 25.041422] __vm_munmap+0x138/0x3a0 [ 25.041718] __x64_sys_munmap+0x59/0x80 [ 25.042029] do_syscall_64+0x3f/0x90 [ 25.042323] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 25.042723] [ 25.042864] Second to last potentially related work creation: [ 25.043298] kasan_save_stack+0x22/0x50 [ 25.043616] __kasan_record_aux_stack+0x8e/0xa0 [ 25.043972] __call_rcu_common.constprop.0+0x6a/0xb90 [ 25.044376] remove_vma+0x139/0x170 [ 25.044662] do_vmi_align_munmap+0xd4a/0x11f0 [ 25.045010] do_vmi_munmap+0x1f1/0x2b0 [ 25.045325] mmap_region+0x1f9/0x2660 [ 25.045626] do_mmap+0x854/0xf00 [ 25.045894] vm_mmap_pgoff+0x1a6/0x3a0 [ 25.046204] ksys_mmap_pgoff+0x3af/0x500 [ 25.046516] do_syscall_64+0x3f/0x90 [ 25.046824] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 25.047229] [ 25.047362] The buggy address belongs to the object at ffff88800eb253a0 [ 25.047362] which belongs to the cache vm_area_struct of size 168 [ 25.048296] The buggy address is located 88 bytes inside of [ 25.048296] freed 168-byte region [ffff88800eb253a0, ffff88800eb25448) [ 25.049184] [ 25.049319] The buggy address belongs to the physical page: [ 25.049727] page:0000000001013905 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xeb25 [ 25.050418] memcg:ffff88800e872301 [ 25.050685] flags: 0x100000000000200(slab|node=0|zone=1) [ 25.051100] page_type: 0xffffffff() [ 25.051387] raw: 0100000000000200 ffff88800879fc80 ffffea00002cc740 dead000000000002 [ 25.051973] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800e872301 [ 25.052544] page dumped because: kasan: bad access detected [ 25.052959] [ 25.053091] Memory state around the buggy address: [ 25.053459] ffff88800eb25280: fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb fb [ 25.054004] ffff88800eb25300: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc [ 25.054544] >ffff88800eb25380: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb [ 25.055088] ^ [ 25.055620] ffff88800eb25400: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 25.056159] ffff88800eb25480: fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.056695] ================================================================== [ 25.057355] Disabling lock debugging due to kernel taint Debian GNU/Linux 11 syzkaller ttyS0 syzkaller login: [ 27.041099] BUG: Bad rss-counter state mm:000000008d6172a7 type:MM_FILEPAGES val:33 [ 27.042220] BUG: Bad rss-counter state mm:000000008d6172a7 type:MM_ANONPAGES val:22 [ 27.455940] BUG: Bad rss-counter state mm:00000000dc478b5e type:MM_FILEPAGES val:33 [ 27.456939] BUG: Bad rss-counter state mm:00000000dc478b5e type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:24708' (ECDSA) to the list of known hosts. 2023/06/19 14:11:52 fuzzer started 2023/06/19 14:11:52 dialing manager at localhost:44161 2023/06/19 14:11:52 checking machine... 2023/06/19 14:11:52 checking revisions... [ 28.135673] kmemleak: Automatic memory scanning thread ended 2023/06/19 14:11:52 testing simple program... [ 28.178712] cgroup: Unknown subsys name 'net' [ 28.223913] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 14:11:51 Registers: info registers vcpu 0 RAX=0000000000000001 RBX=0000000000000000 RCX=ffffffff81534376 RDX=fffffbfff0ba77db RSI=0000000000000008 RDI=ffffffff85d3bed0 RBP=ffffffff8452fd53 RSP=ffff8880068377e8 R8 =0000000000000000 R9 =fffffbfff0ba77da R10=ffffffff85d3bed7 R11=0000000000000000 R12=0000000000000202 R13=ffff88800d4a63d0 R14=ffffffff81c63f2c R15=0000000000000000 RIP=ffffffff8153437e RFL=00000047 [---Z-PC] 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 =0000 0000000000000000 00000000 00000000 DS =0000 0000000000000000 00000000 00000000 FS =0000 00007f2e8cde7900 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=00007f2e8c26cda0 CR3=000000000ed22000 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=64657669656365523d4547415353454d XMM01=352074726f7020322e322e302e303120 XMM02=63736964203a31313a36373833352074 XMM03=66207463656e6e6f6373696420646576 XMM04=b705967444cdc23800000000000ae988 XMM05=1319e678c5640f8a0000000000135130 XMM06=e8008b1642ea3e600000000000135098 XMM07=00000000000000000000000000000000 XMM08=415453454d49545f454d49544c414552 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=0000000080000000 RBX=ffffffff854f6380 RCX=0000000000000000 RDX=ffff888015d61b40 RSI=ffffffff811f78e5 RDI=ffff88800c58be98 RBP=ffff88800c58bdc0 RSP=ffff888016e27990 R8 =0000000000000004 R9 =0000000000000000 R10=0000000000000000 R11=63206e6f69737365 R12=0000000000000000 R13=ffff88800c58bdc0 R14=ffff888016e27a88 R15=ffff88800e52d3c0 RIP=ffffffff814c0800 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 00007f58017c0700 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=00007ffde3991000 CR3=000000000db08000 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=6d6f72662064657463656e6e6f637369 XMM02=2e303120746f6f722072657375206d6f XMM03=3a5d3832325b646873732032353a3131 XMM04=6456774875434142334f726f59427469 XMM05=485320415352203a3268737320363738 XMM06=206d6f726620746f6f7220726f662079 XMM07=00000000000000000000000000000000 XMM08=3a677562656420676f6c737973720000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000