[ 38.745188] BUG: Bad rss-counter state mm:000000003721bd51 type:MM_FILEPAGES val:33 [ 38.746689] BUG: Bad rss-counter state mm:000000003721bd51 type:MM_ANONPAGES val:22 [ 38.920329] ================================================================== [ 38.921269] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 38.922235] Read of size 8 at addr ffff88800eb5f798 by task sshd/218 [ 38.923005] [ 38.923345] CPU: 0 PID: 218 Comm: sshd Not tainted 6.4.0-rc7-next-20230620 #1 [ 38.924221] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 38.925242] Call Trace: [ 38.925594] [ 38.925879] dump_stack_lvl+0x91/0xf0 [ 38.926377] print_report+0xcc/0x620 [ 38.926872] ? __virt_addr_valid+0x102/0x340 [ 38.927420] ? vma_interval_tree_remove+0xc75/0xec0 [ 38.928072] ? vma_interval_tree_remove+0xc75/0xec0 [ 38.928684] kasan_report+0xbe/0xf0 [ 38.929178] ? vma_interval_tree_remove+0xc75/0xec0 [ 38.929809] vma_interval_tree_remove+0xc75/0xec0 [ 38.930425] vma_prepare+0xc54/0x11a0 [ 38.930928] __split_vma+0x5af/0x950 [ 38.931419] ? __pfx___split_vma+0x10/0x10 [ 38.931985] ? find_held_lock+0x2c/0x110 [ 38.932530] do_vmi_align_munmap+0x2ba/0x11f0 [ 38.933129] ? lock_is_held_type+0x9f/0x120 [ 38.933705] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 38.934342] ? mtree_range_walk+0x632/0x900 [ 38.934925] ? mas_walk+0x5c7/0x7c0 [ 38.935421] do_vmi_munmap+0x1f1/0x2b0 [ 38.935940] mmap_region+0x1f9/0x2660 [ 38.936448] ? vm_mmap_pgoff+0x15c/0x3a0 [ 38.937030] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 38.937819] ? __pfx_lock_acquire+0x10/0x10 [ 38.938391] ? __pfx_mmap_region+0x10/0x10 [ 38.938950] ? security_mmap_addr+0x7d/0xa0 [ 38.939517] ? get_unmapped_area+0x1f5/0x3f0 [ 38.940097] do_mmap+0x854/0xf00 [ 38.940565] vm_mmap_pgoff+0x1a6/0x3a0 [ 38.941097] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 38.941694] ksys_mmap_pgoff+0x3af/0x500 [ 38.942224] do_syscall_64+0x3f/0x90 [ 38.942732] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.943423] RIP: 0033:0x7f97ffd8fd82 [ 38.943907] 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 [ 38.946203] RSP: 002b:00007ffd407c4868 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 38.947169] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f97ffd8fd82 [ 38.948071] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f97ff1c9000 [ 38.948991] RBP: 00007f97ff1c9000 R08: 0000000000000009 R09: 0000000000001000 [ 38.949909] R10: 0000000000000812 R11: 0000000000000206 R12: 000055b7c7ecef60 [ 38.950805] R13: 00007ffd407c4880 R14: 00007ffd407c48b0 R15: 00007ffd407c4c10 [ 38.951708] [ 38.952019] [ 38.952245] Allocated by task 211: [ 38.952705] kasan_save_stack+0x22/0x50 [ 38.953237] kasan_set_track+0x25/0x30 [ 38.953759] __kasan_slab_alloc+0x59/0x70 [ 38.954311] kmem_cache_alloc+0x16b/0x370 [ 38.954861] vm_area_dup+0x20/0x160 [ 38.955331] __split_vma+0x170/0x950 [ 38.955826] split_vma+0xc6/0x110 [ 38.956287] mprotect_fixup+0x8d2/0xb30 [ 38.956843] do_mprotect_pkey+0x87e/0xd40 [ 38.957396] __x64_sys_mprotect+0x78/0xc0 [ 38.957946] do_syscall_64+0x3f/0x90 [ 38.958441] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.959126] [ 38.959355] Freed by task 211: [ 38.959780] kasan_save_stack+0x22/0x50 [ 38.960319] kasan_set_track+0x25/0x30 [ 38.960855] kasan_save_free_info+0x2b/0x50 [ 38.961421] __kasan_slab_free+0x10a/0x190 [ 38.961981] kmem_cache_free+0x10d/0x4d0 [ 38.962516] rcu_core+0x8c8/0x2860 [ 38.962985] __do_softirq+0x1b7/0x7d4 [ 38.963486] [ 38.963714] Last potentially related work creation: [ 38.964331] kasan_save_stack+0x22/0x50 [ 38.964878] __kasan_record_aux_stack+0x8e/0xa0 [ 38.965484] __call_rcu_common.constprop.0+0x6a/0xb90 [ 38.966162] remove_vma+0x139/0x170 [ 38.966644] do_vmi_align_munmap+0xd4a/0x11f0 [ 38.967237] do_vmi_munmap+0x1f1/0x2b0 [ 38.967750] __vm_munmap+0x138/0x3a0 [ 38.968238] __x64_sys_munmap+0x59/0x80 [ 38.968776] do_syscall_64+0x3f/0x90 [ 38.969280] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.969968] [ 38.970192] Second to last potentially related work creation: [ 38.970925] kasan_save_stack+0x22/0x50 [ 38.971455] __kasan_record_aux_stack+0x8e/0xa0 [ 38.972052] __call_rcu_common.constprop.0+0x6a/0xb90 [ 38.972741] remove_vma+0x139/0x170 [ 38.973220] do_vmi_align_munmap+0xd4a/0x11f0 [ 38.973802] do_vmi_munmap+0x1f1/0x2b0 [ 38.974309] mmap_region+0x1f9/0x2660 [ 38.974814] do_mmap+0x854/0xf00 [ 38.975261] vm_mmap_pgoff+0x1a6/0x3a0 [ 38.975777] ksys_mmap_pgoff+0x3af/0x500 [ 38.976303] do_syscall_64+0x3f/0x90 [ 38.976826] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.977513] [ 38.977740] The buggy address belongs to the object at ffff88800eb5f740 [ 38.977740] which belongs to the cache vm_area_struct of size 168 [ 38.979289] The buggy address is located 88 bytes inside of [ 38.979289] freed 168-byte region [ffff88800eb5f740, ffff88800eb5f7e8) [ 38.980780] [ 38.981004] The buggy address belongs to the physical page: [ 38.981718] page:000000001fe3398d refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xeb5f [ 38.982881] memcg:ffff88800f5e3b01 [ 38.983334] flags: 0x100000000000200(slab|node=0|zone=1) [ 38.984026] page_type: 0xffffffff() [ 38.984506] raw: 0100000000000200 ffff8880087a0c80 ffffea00002513c0 dead000000000002 [ 38.985484] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800f5e3b01 [ 38.986442] page dumped because: kasan: bad access detected [ 38.987135] [ 38.987367] Memory state around the buggy address: [ 38.987987] ffff88800eb5f680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 38.988919] ffff88800eb5f700: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 38.989827] >ffff88800eb5f780: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc [ 38.990726] ^ [ 38.991248] ffff88800eb5f800: fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb [ 38.992157] ffff88800eb5f880: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc [ 38.993083] ================================================================== [ 38.994110] Disabling lock debugging due to kernel taint Debian GNU/Linux 11 syzkaller ttyS0 syzkaller login: [ 40.979013] BUG: Bad rss-counter state mm:0000000033fb548a type:MM_FILEPAGES val:33 [ 40.980100] BUG: Bad rss-counter state mm:0000000033fb548a type:MM_ANONPAGES val:22 [ 41.447631] BUG: Bad rss-counter state mm:00000000a8da1e5d type:MM_FILEPAGES val:33 [ 41.449503] BUG: Bad rss-counter state mm:00000000a8da1e5d type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:13013' (ECDSA) to the list of known hosts. 2023/06/20 12:57:16 fuzzer started 2023/06/20 12:57:16 dialing manager at localhost:36067 2023/06/20 12:57:16 checking machine... 2023/06/20 12:57:16 checking revisions... [ 42.169988] kmemleak: Automatic memory scanning thread ended 2023/06/20 12:57:16 testing simple program... [ 42.231575] cgroup: Unknown subsys name 'net' [ 42.299043] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 12:57:15 Registers: info registers vcpu 0 RAX=1ffff11001a66885 RBX=ffff88800d3343f8 RCX=ffffffff812e0135 RDX=0000000000000000 RSI=0000000000000000 RDI=ffff88800d334428 RBP=ffff888019378540 RSP=ffff88801015fd08 R8 =0000000000000001 R9 =ffffed100202bf95 R10=0000000000000003 R11=00000000000b6d7d R12=dffffc0000000000 R13=ffff888019378a80 R14=ffffffff818d9c06 R15=ffff8880194c6700 RIP=ffffffff818464e2 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 =0000 0000000000000000 00000000 00000000 DS =0000 0000000000000000 00000000 00000000 FS =0000 00007fad82386900 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=00007fff7eb53000 CR3=000000000dbc6000 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=0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a XMM01=ffffffffffffff00ffff000000000000 XMM02=ffffffffffffff00ffff000000000000 XMM03=5249445f4c49414d202d202020202020 XMM04=3d6c616e696d72657420322e322e302e XMM05=3d656d616e74736f682022646873732f XMM06=746f6f72223d746363612078756e696c XMM07=6e655f6d61702c7374696d696c5f6d61 XMM08=00000000000000810000363532616873 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=0000000000000003 RBX=0000000000000098 RCX=0000000000000001 RDX=0000000000000cc0 RSI=ffff8880194c6700 RDI=ffff8880087a0dc0 RBP=ffff88800fbb7c28 RSP=ffff88800fbb7b98 R8 =ffff88800fbb7bf0 R9 =0000000000000000 R10=ffffffff85d3d357 R11=00000000000b6a61 R12=ffff8880087a0dc0 R13=ffff8880194c6700 R14=0000000000000000 R15=0000000000000cc0 RIP=ffffffff81803ce2 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=00007f8af0db08e0 CR3=000000000c606000 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=756e696c2d34365f3638782f62696c2f XMM01=6f732e6c69747562696c2f756e672d78 XMM02=00312e6f732e6c69747562696c2f756e XMM03=672d78756e696c2d34365f3638782f62 XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000 XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000 XMM08=00000000000000000000000000000000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000