syzkaller login: [ 51.050002] BUG: Bad rss-counter state mm:0000000018f8cc67 type:MM_FILEPAGES val:33 [ 51.051259] BUG: Bad rss-counter state mm:0000000018f8cc67 type:MM_ANONPAGES val:22 [ 51.092488] ================================================================== [ 51.093569] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 51.094485] Read of size 8 at addr ffff888015d896b0 by task sshd/220 [ 51.095273] [ 51.095516] CPU: 0 PID: 220 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 51.096368] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 51.097331] Call Trace: [ 51.097669] [ 51.097980] dump_stack_lvl+0x91/0xf0 [ 51.098539] print_report+0xcc/0x620 [ 51.099101] ? __virt_addr_valid+0x102/0x340 [ 51.099718] ? vma_interval_tree_remove+0xc75/0xec0 [ 51.100368] ? vma_interval_tree_remove+0xc75/0xec0 [ 51.101095] kasan_report+0xbe/0xf0 [ 51.101653] ? vma_interval_tree_remove+0xc75/0xec0 [ 51.102355] vma_interval_tree_remove+0xc75/0xec0 [ 51.103078] vma_prepare+0xc54/0x11a0 [ 51.103658] __split_vma+0x5af/0x950 [ 51.104194] ? __pfx___split_vma+0x10/0x10 [ 51.104788] ? find_held_lock+0x2c/0x110 [ 51.105384] do_vmi_align_munmap+0x2ba/0x11f0 [ 51.106037] ? lock_is_held_type+0x9f/0x120 [ 51.106661] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 51.107288] ? mtree_range_walk+0x632/0x900 [ 51.107907] ? mas_walk+0x5c7/0x7c0 [ 51.108401] do_vmi_munmap+0x1f1/0x2b0 [ 51.108935] mmap_region+0x1f9/0x2660 [ 51.109447] ? vm_mmap_pgoff+0x15c/0x3a0 [ 51.110009] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 51.110773] ? __pfx_lock_acquire+0x10/0x10 [ 51.111330] ? __pfx_mmap_region+0x10/0x10 [ 51.111892] ? security_mmap_addr+0x7d/0xa0 [ 51.112458] ? get_unmapped_area+0x1f5/0x3f0 [ 51.113043] do_mmap+0x854/0xf00 [ 51.113525] vm_mmap_pgoff+0x1a6/0x3a0 [ 51.114056] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 51.114650] ksys_mmap_pgoff+0x3af/0x500 [ 51.115188] do_syscall_64+0x3f/0x90 [ 51.115689] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 51.116368] RIP: 0033:0x7f6360a5fd82 [ 51.116857] 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 [ 51.119144] RSP: 002b:00007fff17285198 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 51.120115] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f6360a5fd82 [ 51.121041] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f635fe99000 [ 51.121946] RBP: 00007f635fe99000 R08: 0000000000000009 R09: 0000000000001000 [ 51.122867] R10: 0000000000000812 R11: 0000000000000206 R12: 0000561ce44e1ec0 [ 51.123792] R13: 00007fff172851b0 R14: 00007fff172851e0 R15: 00007fff17285540 [ 51.124720] [ 51.125035] [ 51.125258] Allocated by task 213: [ 51.125722] kasan_save_stack+0x22/0x50 [ 51.126260] kasan_set_track+0x25/0x30 [ 51.126810] __kasan_slab_alloc+0x59/0x70 [ 51.127376] kmem_cache_alloc+0x16b/0x370 [ 51.127911] vm_area_dup+0x20/0x160 [ 51.128420] __split_vma+0x170/0x950 [ 51.128942] split_vma+0xc6/0x110 [ 51.129398] mprotect_fixup+0x8d2/0xb30 [ 51.129950] do_mprotect_pkey+0x87e/0xd40 [ 51.130497] __x64_sys_mprotect+0x78/0xc0 [ 51.131054] do_syscall_64+0x3f/0x90 [ 51.131578] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 51.132267] [ 51.132521] Freed by task 213: [ 51.132937] kasan_save_stack+0x22/0x50 [ 51.133459] kasan_set_track+0x25/0x30 [ 51.133984] kasan_save_free_info+0x2b/0x50 [ 51.134548] __kasan_slab_free+0x10a/0x190 [ 51.135130] kmem_cache_free+0x10d/0x4d0 [ 51.135671] rcu_core+0x8c8/0x2860 [ 51.136128] __do_softirq+0x1b7/0x7d4 [ 51.136658] [ 51.136883] Last potentially related work creation: [ 51.137526] kasan_save_stack+0x22/0x50 [ 51.138055] __kasan_record_aux_stack+0x8e/0xa0 [ 51.138659] __call_rcu_common.constprop.0+0x6a/0xb90 [ 51.139347] remove_vma+0x139/0x170 [ 51.139825] do_vmi_align_munmap+0xd4a/0x11f0 [ 51.140405] do_vmi_munmap+0x1f1/0x2b0 [ 51.140929] __vm_munmap+0x138/0x3a0 [ 51.141413] __x64_sys_munmap+0x59/0x80 [ 51.141934] do_syscall_64+0x3f/0x90 [ 51.142425] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 51.143146] [ 51.143386] The buggy address belongs to the object at ffff888015d89658 [ 51.143386] which belongs to the cache vm_area_struct of size 168 [ 51.144937] The buggy address is located 88 bytes inside of [ 51.144937] freed 168-byte region [ffff888015d89658, ffff888015d89700) [ 51.146396] [ 51.146634] The buggy address belongs to the physical page: [ 51.147357] page:000000000bc85ff9 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x15d89 [ 51.148574] memcg:ffff88800f6e1c01 [ 51.149041] flags: 0x100000000000200(slab|node=0|zone=1) [ 51.149751] page_type: 0xffffffff() [ 51.150237] raw: 0100000000000200 ffff88800879fc80 dead000000000122 0000000000000000 [ 51.151255] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800f6e1c01 [ 51.152231] page dumped because: kasan: bad access detected [ 51.152959] [ 51.153200] Memory state around the buggy address: [ 51.153858] ffff888015d89580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 51.154820] ffff888015d89600: 00 00 00 fc fc fc fc fc fc fc fc fa fb fb fb fb [ 51.155752] >ffff888015d89680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.156701] ^ [ 51.157331] ffff888015d89700: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 51.158292] ffff888015d89780: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc [ 51.159318] ================================================================== [ 51.160571] Disabling lock debugging due to kernel taint [ 53.136999] BUG: Bad rss-counter state mm:000000004e9333d2 type:MM_FILEPAGES val:33 [ 53.137982] BUG: Bad rss-counter state mm:000000004e9333d2 type:MM_ANONPAGES val:22 [ 53.724951] BUG: Bad rss-counter state mm:00000000e04494d3 type:MM_FILEPAGES val:33 [ 53.726134] BUG: Bad rss-counter state mm:00000000e04494d3 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:14822' (ECDSA) to the list of known hosts. 2023/06/20 05:46:59 fuzzer started 2023/06/20 05:46:59 dialing manager at localhost:44161 2023/06/20 05:46:59 checking machine... 2023/06/20 05:46:59 checking revisions... [ 54.382492] kmemleak: Automatic memory scanning thread ended 2023/06/20 05:46:59 testing simple program... [ 54.430396] cgroup: Unknown subsys name 'net' [ 54.483276] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 05:46:39 Registers: info registers vcpu 0 RAX=dffffc0000000000 RBX=0000000000000001 RCX=ffffffff860d68f6 RDX=1ffff1100195af23 RSI=1ffff1100195af22 RDI=1ffff1100195af22 RBP=ffff88800cad7910 RSP=ffff88800cad7848 R8 =ffffffff860d68fa R9 =ffff88800cad78f8 R10=0000000000038001 R11=0000000000010b7e R12=ffff88800cad7918 R13=ffff88800cad7900 R14=ffff88800cad79f0 R15=ffff88800cad78b8 RIP=ffffffff811310ce 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 00007fa8f9efb900 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=00007ffd08978b38 CR3=000000000952c000 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=00007f9d82247510000055b1561e3790 XMM02=6f6974707972636e6561737268746977 XMM03=00000000000000000000000000777074 XMM04=40404040404040404040404040404040 XMM05=5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a XMM06=20202020202020202020202020202020 XMM07=ffffffffffff00ffffff00ffffff00ff XMM08=00002000000000202020002020200000 XMM09=ffffffffffff00ffffff00ffffff00ff XMM10=00002000000000202020002020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=ffff8880145c0000 RBX=0000000000004000 RCX=0000000000000000 RDX=ffff8880145c0000 RSI=ffffffff81390b13 RDI=ffff8880145c0000 RBP=ffff8880145c0000 RSP=ffff8880145bff10 R8 =0000000000000001 R9 =ffffed10028b8000 R10=ffff8880145c0007 R11=0000000000000000 R12=ffff8880145bff58 R13=0000000000000000 R14=0000000000000000 R15=0000000000000000 RIP=ffffffff813909fc 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 00007fcb07f18900 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=00007fcb07329b80 CR3=000000000af1e000 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=2c9157d755d63bb2d4433739ca6ab704 XMM02=000000000011ca00d59e07bde36eea69 XMM03=000000000011cb28ec2efd57dc4c00df XMM04=fc7680c7115d595100000000000ae988 XMM05=c094fb20718968570000000000134cb0 XMM06=4fda316b135da52b0000000000133aa0 XMM07=fb795ef6d657705600000000001240c0 XMM08=2c67c8bc2e329bc3000000000011cb28 XMM09=00000000000000000000000000000000 XMM10=20200000000020202020202020200000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000