syzkaller login: [ 38.829440] BUG: Bad rss-counter state mm:0000000018afde7b type:MM_FILEPAGES val:33 [ 38.830327] BUG: Bad rss-counter state mm:0000000018afde7b type:MM_ANONPAGES val:22 [ 38.947156] ================================================================== [ 38.947793] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 38.948457] Read of size 8 at addr ffff888016926798 by task sshd/225 [ 38.949001] [ 38.949156] CPU: 0 PID: 225 Comm: sshd Not tainted 6.4.0-rc7-next-20230620 #1 [ 38.949760] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 38.950442] Call Trace: [ 38.950668] [ 38.950871] dump_stack_lvl+0x91/0xf0 [ 38.951230] print_report+0xcc/0x620 [ 38.951574] ? __virt_addr_valid+0x102/0x340 [ 38.952034] ? vma_interval_tree_remove+0xc75/0xec0 [ 38.952467] ? vma_interval_tree_remove+0xc75/0xec0 [ 38.952903] kasan_report+0xbe/0xf0 [ 38.953232] ? vma_interval_tree_remove+0xc75/0xec0 [ 38.953667] vma_interval_tree_remove+0xc75/0xec0 [ 38.954131] vma_prepare+0xc54/0x11a0 [ 38.954477] __split_vma+0x5af/0x950 [ 38.954809] ? __pfx___split_vma+0x10/0x10 [ 38.955185] ? find_held_lock+0x2c/0x110 [ 38.955545] do_vmi_align_munmap+0x2ba/0x11f0 [ 38.955933] ? lock_is_held_type+0x9f/0x120 [ 38.956316] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 38.956754] ? mtree_range_walk+0x632/0x900 [ 38.957141] ? mas_walk+0x5c7/0x7c0 [ 38.957475] do_vmi_munmap+0x1f1/0x2b0 [ 38.957820] mmap_region+0x1f9/0x2660 [ 38.958171] ? vm_mmap_pgoff+0x15c/0x3a0 [ 38.958530] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 38.959031] ? __pfx_lock_acquire+0x10/0x10 [ 38.959399] ? __pfx_mmap_region+0x10/0x10 [ 38.959770] ? security_mmap_addr+0x7d/0xa0 [ 38.960144] ? get_unmapped_area+0x1f5/0x3f0 [ 38.960531] do_mmap+0x854/0xf00 [ 38.960839] vm_mmap_pgoff+0x1a6/0x3a0 [ 38.961192] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 38.961584] ksys_mmap_pgoff+0x3af/0x500 [ 38.961937] do_syscall_64+0x3f/0x90 [ 38.962299] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.962757] RIP: 0033:0x7f324d805d82 [ 38.963076] 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.964554] RSP: 002b:00007ffc728b0fe8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 38.965182] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f324d805d82 [ 38.965771] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f324cc3f000 [ 38.966381] RBP: 00007f324cc3f000 R08: 0000000000000009 R09: 0000000000001000 [ 38.966981] R10: 0000000000000812 R11: 0000000000000206 R12: 0000562369587ec0 [ 38.967580] R13: 00007ffc728b1000 R14: 00007ffc728b1030 R15: 00007ffc728b1390 [ 38.968189] [ 38.968397] [ 38.968549] Allocated by task 218: [ 38.968852] kasan_save_stack+0x22/0x50 [ 38.969209] kasan_set_track+0x25/0x30 [ 38.969554] __kasan_slab_alloc+0x59/0x70 [ 38.969930] kmem_cache_alloc+0x16b/0x370 [ 38.970308] vm_area_dup+0x20/0x160 [ 38.970627] __split_vma+0x170/0x950 [ 38.970953] split_vma+0xc6/0x110 [ 38.971258] mprotect_fixup+0x8d2/0xb30 [ 38.971609] do_mprotect_pkey+0x87e/0xd40 [ 38.971974] __x64_sys_mprotect+0x78/0xc0 [ 38.972344] do_syscall_64+0x3f/0x90 [ 38.972676] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.973132] [ 38.973287] Freed by task 218: [ 38.973570] kasan_save_stack+0x22/0x50 [ 38.973937] kasan_set_track+0x25/0x30 [ 38.974299] kasan_save_free_info+0x2b/0x50 [ 38.974686] __kasan_slab_free+0x10a/0x190 [ 38.975077] kmem_cache_free+0x10d/0x4d0 [ 38.975433] rcu_core+0x8c8/0x2860 [ 38.975742] __do_softirq+0x1b7/0x7d4 [ 38.976076] [ 38.976225] Last potentially related work creation: [ 38.976632] kasan_save_stack+0x22/0x50 [ 38.976981] __kasan_record_aux_stack+0x8e/0xa0 [ 38.977385] __call_rcu_common.constprop.0+0x6a/0xb90 [ 38.977837] remove_vma+0x139/0x170 [ 38.978158] do_vmi_align_munmap+0xd4a/0x11f0 [ 38.978544] do_vmi_munmap+0x1f1/0x2b0 [ 38.978878] __vm_munmap+0x138/0x3a0 [ 38.979203] __x64_sys_munmap+0x59/0x80 [ 38.979552] do_syscall_64+0x3f/0x90 [ 38.979885] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.980331] [ 38.980481] The buggy address belongs to the object at ffff888016926740 [ 38.980481] which belongs to the cache vm_area_struct of size 168 [ 38.981510] The buggy address is located 88 bytes inside of [ 38.981510] freed 168-byte region [ffff888016926740, ffff8880169267e8) [ 38.982672] [ 38.982823] The buggy address belongs to the physical page: [ 38.983310] page:000000001259feea refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x16926 [ 38.984095] memcg:ffff888014347c01 [ 38.984397] flags: 0x100000000000200(slab|node=0|zone=1) [ 38.984860] page_type: 0xffffffff() [ 38.985186] raw: 0100000000000200 ffff8880087a0c80 dead000000000122 0000000000000000 [ 38.985839] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff888014347c01 [ 38.986502] page dumped because: kasan: bad access detected [ 38.986986] [ 38.987142] Memory state around the buggy address: [ 38.987560] ffff888016926680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 38.988179] ffff888016926700: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 38.988805] >ffff888016926780: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc [ 38.989421] ^ [ 38.989791] ffff888016926800: fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb [ 38.990444] ffff888016926880: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc [ 38.991055] ================================================================== [ 38.991889] Disabling lock debugging due to kernel taint [ 41.073587] BUG: Bad rss-counter state mm:00000000ad2cb3c9 type:MM_FILEPAGES val:33 [ 41.074369] BUG: Bad rss-counter state mm:00000000ad2cb3c9 type:MM_ANONPAGES val:22 [ 41.449540] BUG: Bad rss-counter state mm:00000000ca44460f type:MM_FILEPAGES val:33 [ 41.450285] BUG: Bad rss-counter state mm:00000000ca44460f type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:44407' (ECDSA) to the list of known hosts. 2023/06/21 09:12:42 fuzzer started 2023/06/21 09:12:42 dialing manager at localhost:36067 2023/06/21 09:12:42 checking machine... 2023/06/21 09:12:42 checking revisions... [ 42.030523] kmemleak: Automatic memory scanning thread ended 2023/06/21 09:12:42 testing simple program... [ 42.071052] cgroup: Unknown subsys name 'net' [ 42.115135] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 09:12:42 Registers: info registers vcpu 0 RAX=00000000000000a0 RBX=00000000000000a0 RCX=0000000000000000 RDX=00000000000101f6 RSI=ffffffff82191d98 RDI=0000000000000007 RBP=ffff88800f3a0000 RSP=ffff88800f51f7d8 R8 =0000000000000007 R9 =0000000000010000 R10=00000000000101f6 R11=0000000000000128 R12=00000000000101f6 R13=ffffed1001e74001 R14=0000000000000000 R15=dffffc0000000000 RIP=ffffffff82191d9e RFL=00000093 [--S-A-C] 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 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=00007f3d866e7044 CR3=0000000009832000 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=00000000000000000000000000000000 XMM02=be28dfb223dab6eda0e07720c1ab37b5 XMM03=1ea7648917c55c2796b4e6924d7da085 XMM04=eaeb2554e084a80ed77e0ec57f695519 XMM05=00000000000000000000000000000000 XMM06=1ea7255417845c0e967e0e924d695519 XMM07=672065736f6c635f6e6f69737365733a XMM08=652075253d64692073253d706f000000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=dffffc0000000000 RBX=0000000000000002 RCX=ffffffff813ad71f RDX=0000000000003ad7 RSI=0000000000003ad7 RDI=ffffffff864f854c RBP=ffff88806cf09aa8 RSP=ffff88806cf099e0 R8 =0000000000000000 R9 =ffff88806cf09a90 R10=0000000000038001 R11=0000000000003c0d R12=ffff88806cf09ab0 R13=ffff88806cf09a98 R14=ffff88806cf09a91 R15=ffff88806cf09a50 RIP=ffffffff8113077a RFL=00000217 [----APC] 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=00007fdc895b3c00 CR3=000000000c776000 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=16a3230d603bfbacb44e56f44b4d93fc XMM02=000000000011b698eff9b2d0a8fce9cb XMM03=000000000011b7682c67c8bc2e329bc3 XMM04=26c17b5994b9fb1000000000000ae988 XMM05=fbdf70573967e70a00000000001325e8 XMM06=ae9b264101391a5b0000000000131318 XMM07=fb795ef6d65770560000000000121930 XMM08=2c67c8bc2e329bc3000000000011b708 XMM09=00000000000000000000000000000000 XMM10=20200000000020202020202020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000