[ 48.968325] BUG: Bad rss-counter state mm:0000000069dde94e type:MM_FILEPAGES val:33 [ 48.969140] BUG: Bad rss-counter state mm:0000000069dde94e type:MM_ANONPAGES val:22 [ 49.127233] ================================================================== [ 49.128139] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 49.129068] Read of size 8 at addr ffff888008dc9c20 by task sshd/218 [ 49.129847] [ 49.130065] CPU: 1 PID: 218 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 49.131137] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 49.132130] Call Trace: [ 49.132463] [ 49.132758] dump_stack_lvl+0x91/0xf0 [ 49.133243] print_report+0xcc/0x620 [ 49.133725] ? __virt_addr_valid+0x102/0x340 [ 49.134274] ? vma_interval_tree_remove+0xc75/0xec0 [ 49.134883] ? vma_interval_tree_remove+0xc75/0xec0 [ 49.135511] kasan_report+0xbe/0xf0 [ 49.135988] ? vma_interval_tree_remove+0xc75/0xec0 [ 49.136601] vma_interval_tree_remove+0xc75/0xec0 [ 49.137199] vma_prepare+0xc54/0x11a0 [ 49.137673] __split_vma+0x5af/0x950 [ 49.138139] ? __pfx___split_vma+0x10/0x10 [ 49.138664] ? find_held_lock+0x2c/0x110 [ 49.139189] do_vmi_align_munmap+0x2ba/0x11f0 [ 49.139755] ? lock_is_held_type+0x9f/0x120 [ 49.140283] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 49.140880] ? mtree_range_walk+0x632/0x900 [ 49.141425] ? mas_walk+0x5c7/0x7c0 [ 49.141898] do_vmi_munmap+0x1f1/0x2b0 [ 49.142382] mmap_region+0x1f9/0x2660 [ 49.142858] ? vm_mmap_pgoff+0x15c/0x3a0 [ 49.143394] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 49.144106] ? __pfx_lock_acquire+0x10/0x10 [ 49.144634] ? __pfx_mmap_region+0x10/0x10 [ 49.145157] ? security_mmap_addr+0x7d/0xa0 [ 49.145678] ? get_unmapped_area+0x1f5/0x3f0 [ 49.146218] do_mmap+0x854/0xf00 [ 49.146651] vm_mmap_pgoff+0x1a6/0x3a0 [ 49.147156] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 49.147719] ksys_mmap_pgoff+0x3af/0x500 [ 49.148224] do_syscall_64+0x3f/0x90 [ 49.148701] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 49.149343] RIP: 0033:0x7ff747016d82 [ 49.149797] 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 [ 49.151904] RSP: 002b:00007ffd0d6e3348 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 49.152799] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007ff747016d82 [ 49.153654] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007ff746450000 [ 49.154498] RBP: 00007ff746450000 R08: 0000000000000009 R09: 0000000000001000 [ 49.155334] R10: 0000000000000812 R11: 0000000000000206 R12: 000055c6c63f8d90 [ 49.156171] R13: 00007ffd0d6e3360 R14: 00007ffd0d6e3390 R15: 00007ffd0d6e36f0 [ 49.157015] [ 49.157302] [ 49.157517] Allocated by task 211: [ 49.157944] kasan_save_stack+0x22/0x50 [ 49.158451] kasan_set_track+0x25/0x30 [ 49.158952] __kasan_slab_alloc+0x59/0x70 [ 49.159475] kmem_cache_alloc+0x16b/0x370 [ 49.159986] vm_area_dup+0x20/0x160 [ 49.160437] __split_vma+0x170/0x950 [ 49.160903] split_vma+0xc6/0x110 [ 49.161345] mprotect_fixup+0x8d2/0xb30 [ 49.161845] do_mprotect_pkey+0x87e/0xd40 [ 49.162360] __x64_sys_mprotect+0x78/0xc0 [ 49.162873] do_syscall_64+0x3f/0x90 [ 49.163355] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 49.163989] [ 49.164203] Freed by task 211: [ 49.164597] kasan_save_stack+0x22/0x50 [ 49.165097] kasan_set_track+0x25/0x30 [ 49.165584] kasan_save_free_info+0x2b/0x50 [ 49.166108] __kasan_slab_free+0x10a/0x190 [ 49.166634] kmem_cache_free+0x10d/0x4d0 [ 49.167158] rcu_core+0x8c8/0x2860 [ 49.167602] __do_softirq+0x1b7/0x7d4 [ 49.168079] [ 49.168294] Last potentially related work creation: [ 49.168876] kasan_save_stack+0x22/0x50 [ 49.169380] __kasan_record_aux_stack+0x8e/0xa0 [ 49.169948] __call_rcu_common.constprop.0+0x6a/0xb90 [ 49.170607] remove_vma+0x139/0x170 [ 49.171088] do_vmi_align_munmap+0xd4a/0x11f0 [ 49.171668] do_vmi_munmap+0x1f1/0x2b0 [ 49.172232] __vm_munmap+0x138/0x3a0 [ 49.172723] __x64_sys_munmap+0x59/0x80 [ 49.173234] do_syscall_64+0x3f/0x90 [ 49.173731] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 49.174404] [ 49.174628] Second to last potentially related work creation: [ 49.175358] kasan_save_stack+0x22/0x50 [ 49.175888] __kasan_record_aux_stack+0x8e/0xa0 [ 49.176480] __call_rcu_common.constprop.0+0x6a/0xb90 [ 49.177138] remove_vma+0x139/0x170 [ 49.177615] do_vmi_align_munmap+0xd4a/0x11f0 [ 49.178190] do_vmi_munmap+0x1f1/0x2b0 [ 49.178695] mmap_region+0x1f9/0x2660 [ 49.179203] do_mmap+0x854/0xf00 [ 49.179657] vm_mmap_pgoff+0x1a6/0x3a0 [ 49.180165] ksys_mmap_pgoff+0x3af/0x500 [ 49.180697] do_syscall_64+0x3f/0x90 [ 49.181194] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 49.181875] [ 49.182101] The buggy address belongs to the object at ffff888008dc9bc8 [ 49.182101] which belongs to the cache vm_area_struct of size 168 [ 49.183661] The buggy address is located 88 bytes inside of [ 49.183661] freed 168-byte region [ffff888008dc9bc8, ffff888008dc9c70) [ 49.185146] [ 49.185369] The buggy address belongs to the physical page: [ 49.186069] page:00000000f0ac333d refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x8dc9 [ 49.187221] memcg:ffff88801004b501 [ 49.187671] flags: 0x100000000000200(slab|node=0|zone=1) [ 49.188346] page_type: 0xffffffff() [ 49.188810] raw: 0100000000000200 ffff88800879fc80 ffffea00003d6e00 dead000000000006 [ 49.189788] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88801004b501 [ 49.190752] page dumped because: kasan: bad access detected [ 49.191448] [ 49.191673] Memory state around the buggy address: [ 49.192286] ffff888008dc9b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 49.193187] ffff888008dc9b80: 00 fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb [ 49.194084] >ffff888008dc9c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc [ 49.194989] ^ [ 49.195550] ffff888008dc9c80: fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 [ 49.196451] ffff888008dc9d00: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc [ 49.197335] ================================================================== [ 49.198376] Disabling lock debugging due to kernel taint Debian GNU/Linux 11 syzkaller ttyS0 syzkaller login: [ 51.487365] BUG: Bad rss-counter state mm:0000000036069257 type:MM_FILEPAGES val:33 [ 51.488523] BUG: Bad rss-counter state mm:0000000036069257 type:MM_ANONPAGES val:22 [ 51.860569] BUG: Bad rss-counter state mm:00000000b3b348aa type:MM_FILEPAGES val:33 [ 51.861667] BUG: Bad rss-counter state mm:00000000b3b348aa type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:55903' (ECDSA) to the list of known hosts. 2023/06/19 21:14:59 fuzzer started 2023/06/19 21:15:00 dialing manager at localhost:44161 2023/06/19 21:15:00 checking machine... 2023/06/19 21:15:00 checking revisions... [ 52.547840] kmemleak: Automatic memory scanning thread ended 2023/06/19 21:15:00 testing simple program... [ 52.590747] cgroup: Unknown subsys name 'net' [ 52.632478] cgroup: Unknown subsys name 'rlimit' executing program executing program executing program VM DIAGNOSIS: 21:14:34 Registers: info registers vcpu 0 RAX=1ffffffff0b75c85 RBX=00000000fffffffd RCX=0000000000000000 RDX=ffff888016e38000 RSI=ffffffff81210e19 RDI=ffffffff85bae428 RBP=ffffffff85bae420 RSP=ffff888018de7c00 R8 =0000000000000005 R9 =0000000000000000 R10=00000000fffffffd R11=00000000000b6996 R12=0000000000000000 R13=dffffc0000000000 R14=0000000000000000 R15=0000000000000000 RIP=ffffffff81210e33 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 00007f69763ea900 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=00007f69769a1618 CR3=000000000dece000 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=563412feff00545000000000000080fe XMM01=6e69676f6c5f6d61702c78756e696c65 XMM02=755f6d61702c74696d7265705f6d6170 XMM03=2c766e655f6d61702c7374696d696c5f XMM04=6d61702c766e655f6d61702c7374696d XMM05=78696e755f6d61702c74696d7265705f XMM06=6469756e69676f6c5f6d61702c78756e XMM07=672065736f6c635f6e6f69737365733a XMM08=61662029286e65706f5f746964756100 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=ffff88806cf35000 RBX=0000000000000001 RCX=ffffffff8450c50e RDX=ffffed100d9e6a01 RSI=0000000000000004 RDI=ffffffff812889a5 RBP=dffffc0000000000 RSP=ffff888008e27e70 R8 =0000000000000000 R9 =ffffed100d9e6a00 R10=ffff88806cf35003 R11=0000000000000001 R12=ffffffff85d3bed0 R13=1ffff110011c4fd3 R14=0000000000000000 R15=0000000000000000 RIP=ffffffff8450d49f RFL=00000246 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=1 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=00007f88141138a0 CR3=000000000c6fa000 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=7cbf43a0619cd2a53f49f60fa4ee2b88 XMM02=000000000011f7b0eff9b2d0a8fce9cb XMM03=000000000011f8802c67c8bc2e329bc3 XMM04=309b881b3eff7cdc00000000000ae988 XMM05=751b9502027dc0b900000000001340a0 XMM06=3cd9075222916bd20000000000133278 XMM07=e042d86d42eb936e0000000000123710 XMM08=8c7053bea889c835000000000011f880 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000