[ 59.771278] BUG: Bad rss-counter state mm:0000000037a9a64b type:MM_FILEPAGES val:33 [ 59.773350] BUG: Bad rss-counter state mm:0000000037a9a64b type:MM_ANONPAGES val:22 Debian GNU/Linux 11 syzkaller ttyS0 syzkaller login: [ 59.939553] ================================================================== [ 59.940505] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 59.941432] Read of size 8 at addr ffff88801805a228 by task sshd/229 [ 59.942183] [ 59.942395] CPU: 1 PID: 229 Comm: sshd Not tainted 6.4.0-rc7-next-20230620 #1 [ 59.943386] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 59.944366] Call Trace: [ 59.944685] [ 59.944966] dump_stack_lvl+0x91/0xf0 [ 59.945465] print_report+0xcc/0x620 [ 59.945944] ? __virt_addr_valid+0x102/0x340 [ 59.946495] ? vma_interval_tree_remove+0xc75/0xec0 [ 59.947111] ? vma_interval_tree_remove+0xc75/0xec0 [ 59.947770] kasan_report+0xbe/0xf0 [ 59.948240] ? vma_interval_tree_remove+0xc75/0xec0 [ 59.948858] vma_interval_tree_remove+0xc75/0xec0 [ 59.949461] vma_prepare+0xc54/0x11a0 [ 59.949930] __split_vma+0x5af/0x950 [ 59.950395] ? __pfx___split_vma+0x10/0x10 [ 59.950913] ? find_held_lock+0x2c/0x110 [ 59.951433] do_vmi_align_munmap+0x2ba/0x11f0 [ 59.952000] ? lock_is_held_type+0x9f/0x120 [ 59.952537] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 59.953137] ? mtree_range_walk+0x632/0x900 [ 59.953686] ? mas_walk+0x5c7/0x7c0 [ 59.954158] do_vmi_munmap+0x1f1/0x2b0 [ 59.954645] mmap_region+0x1f9/0x2660 [ 59.955120] ? vm_mmap_pgoff+0x15c/0x3a0 [ 59.955635] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 59.956349] ? __pfx_lock_acquire+0x10/0x10 [ 59.956877] ? __pfx_mmap_region+0x10/0x10 [ 59.957399] ? security_mmap_addr+0x7d/0xa0 [ 59.957922] ? get_unmapped_area+0x1f5/0x3f0 [ 59.958465] do_mmap+0x854/0xf00 [ 59.958898] vm_mmap_pgoff+0x1a6/0x3a0 [ 59.959389] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 59.959963] ksys_mmap_pgoff+0x3af/0x500 [ 59.960465] do_syscall_64+0x3f/0x90 [ 59.960937] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 59.961580] RIP: 0033:0x7ffbfa007d82 [ 59.962033] 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 [ 59.964140] RSP: 002b:00007ffe149d9898 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 59.965039] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007ffbfa007d82 [ 59.965880] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007ffbf9441000 [ 59.966727] RBP: 00007ffbf9441000 R08: 0000000000000009 R09: 0000000000001000 [ 59.967564] R10: 0000000000000812 R11: 0000000000000206 R12: 000055b470d92ec0 [ 59.968426] R13: 00007ffe149d98b0 R14: 00007ffe149d98e0 R15: 00007ffe149d9c40 [ 59.969273] [ 59.969564] [ 59.969777] Allocated by task 222: [ 59.970201] kasan_save_stack+0x22/0x50 [ 59.970703] kasan_set_track+0x25/0x30 [ 59.971201] __kasan_slab_alloc+0x59/0x70 [ 59.971726] kmem_cache_alloc+0x16b/0x370 [ 59.972241] vm_area_dup+0x20/0x160 [ 59.972693] __split_vma+0x170/0x950 [ 59.973153] split_vma+0xc6/0x110 [ 59.973591] mprotect_fixup+0x8d2/0xb30 [ 59.974100] do_mprotect_pkey+0x87e/0xd40 [ 59.974620] __x64_sys_mprotect+0x78/0xc0 [ 59.975138] do_syscall_64+0x3f/0x90 [ 59.975614] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 59.976253] [ 59.976469] Freed by task 222: [ 59.976861] kasan_save_stack+0x22/0x50 [ 59.977361] kasan_set_track+0x25/0x30 [ 59.977845] kasan_save_free_info+0x2b/0x50 [ 59.978370] __kasan_slab_free+0x10a/0x190 [ 59.978896] kmem_cache_free+0x10d/0x4d0 [ 59.979398] rcu_core+0x8c8/0x2860 [ 59.979858] __do_softirq+0x1b7/0x7d4 [ 59.980327] [ 59.980539] Last potentially related work creation: [ 59.981115] kasan_save_stack+0x22/0x50 [ 59.981614] __kasan_record_aux_stack+0x8e/0xa0 [ 59.982180] __call_rcu_common.constprop.0+0x6a/0xb90 [ 59.982813] remove_vma+0x139/0x170 [ 59.983258] do_vmi_align_munmap+0xd4a/0x11f0 [ 59.983901] do_vmi_munmap+0x1f1/0x2b0 [ 59.984384] __vm_munmap+0x138/0x3a0 [ 59.984841] __x64_sys_munmap+0x59/0x80 [ 59.985336] do_syscall_64+0x3f/0x90 [ 59.985802] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 59.986435] [ 59.986648] The buggy address belongs to the object at ffff88801805a1d0 [ 59.986648] which belongs to the cache vm_area_struct of size 168 [ 59.988114] The buggy address is located 88 bytes inside of [ 59.988114] freed 168-byte region [ffff88801805a1d0, ffff88801805a278) [ 59.989498] [ 59.989712] The buggy address belongs to the physical page: [ 59.990364] page:00000000faf507be refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1805a [ 59.991476] memcg:ffff88800ef70701 [ 59.991938] flags: 0x100000000000200(slab|node=0|zone=1) [ 59.992603] page_type: 0xffffffff() [ 59.993062] raw: 0100000000000200 ffff8880087a0c80 dead000000000122 0000000000000000 [ 59.994020] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800ef70701 [ 59.994924] page dumped because: kasan: bad access detected [ 59.995587] [ 59.995804] Memory state around the buggy address: [ 59.996380] ffff88801805a100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 59.997248] ffff88801805a180: 00 00 fc fc fc fc fc fc fc fc fa fb fb fb fb fb [ 59.998134] >ffff88801805a200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc [ 59.999012] ^ [ 59.999565] ffff88801805a280: fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb fb [ 60.000678] ffff88801805a300: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc [ 60.001742] ================================================================== [ 60.002963] Disabling lock debugging due to kernel taint [ 62.743276] BUG: Bad rss-counter state mm:0000000040edec19 type:MM_FILEPAGES val:33 [ 62.744326] BUG: Bad rss-counter state mm:0000000040edec19 type:MM_ANONPAGES val:22 [ 63.232561] BUG: Bad rss-counter state mm:00000000df24f9d1 type:MM_FILEPAGES val:33 [ 63.233773] BUG: Bad rss-counter state mm:00000000df24f9d1 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:12990' (ECDSA) to the list of known hosts. 2023/06/20 13:29:42 fuzzer started 2023/06/20 13:29:42 dialing manager at localhost:36067 2023/06/20 13:29:42 checking machine... 2023/06/20 13:29:42 checking revisions... [ 63.954919] kmemleak: Automatic memory scanning thread ended 2023/06/20 13:29:43 testing simple program... [ 64.009811] cgroup: Unknown subsys name 'net' [ 64.059084] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 13:29:42 Registers: info registers vcpu 0 RAX=0000000000000000 RBX=0000000000000001 RCX=ffffffff861390a8 RDX=0000000000000001 RSI=0000000000000000 RDI=0000000000000001 RBP=ffff888016387640 RSP=ffff888016387578 R8 =ffffffff861390ac R9 =ffff888016387628 R10=0000000000038001 R11=0000000000020de5 R12=ffff888016387648 R13=ffff888016387630 R14=ffff888016387970 R15=ffff8880163875e8 RIP=ffffffff81131151 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 00007f02294fa900 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=00007ffc6de60000 CR3=000000000de3c000 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=635f6e6f69737365733a4d41503d706f XMM01=6f6c5f6d61702c78756e696c65735f6d XMM02=61702c74696d7265705f6d61702c7469 XMM03=655f6d61702c7374696d696c5f6d6170 XMM04=3d6c616e696d72657420322e322e302e XMM05=3d656d616e74736f682022646873732f XMM06=746f6f72223d746363612078756e696c XMM07=6e655f6d61702c7374696d696c5f6d61 XMM08=652075253d64692073253d706f000000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=1ffff1100d9e1354 RBX=ffff88806cf09b30 RCX=ffff88806cf0a000 RDX=0000000000000002 RSI=1ffff1100d9e1355 RDI=ffff88806cf09a48 RBP=dffffc0000000000 RSP=ffff88806cf09a48 R8 =0000000000000000 R9 =0000000000000000 R10=ffff88806cf09a98 R11=0000000000000000 R12=ffffed100d9e1355 R13=ffffed100d9e1354 R14=ffff88806cf09ae0 R15=ffff88806cf09a98 RIP=ffffffff81132fb0 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 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=00007fe3bb8996d0 CR3=0000000015a2a000 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=2032343a39323a3331203032206e754a XMM01=73732878696e755f6d6170203a5d3833 XMM02=65736f6c63206e6f6973736573203a29 XMM03=755f6d6170203a5d3833325b64687373 XMM04=69662068637573206f4e203a656c6163 XMM05=3a656c696620766e65206e65706f206f XMM06=65733a6468737328766e655f6d617020 XMM07=6b7a79732032343a39323a3331203032 XMM08=69767265733d7373616c63742030733a XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000