[ 23.544363] BUG: Bad rss-counter state mm:00000000aa07e164 type:MM_FILEPAGES val:33 [ 23.544971] BUG: Bad rss-counter state mm:00000000aa07e164 type:MM_ANONPAGES val:22 [ OK ] Finished Update UTMP about System Runlevel Changes. [ 23.816171] ================================================================== [ 23.816671] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 23.816704] Read of size 8 at addr ffff88800eee4df0 by task sshd/218 [ 23.816717] [ 23.816720] CPU: 0 PID: 218 Comm: sshd Not tainted 6.4.0-rc7-next-20230620 #1 [ 23.816740] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 23.816750] Call Trace: [ 23.816756] [ 23.816761] dump_stack_lvl+0x91/0xf0 [ 23.819573] print_report+0xcc/0x620 [ 23.819603] ? __virt_addr_valid+0x102/0x340 [ 23.820224] ? vma_interval_tree_remove+0xc75/0xec0 [ 23.820245] ? vma_interval_tree_remove+0xc75/0xec0 [ 23.821034] kasan_report+0xbe/0xf0 [ 23.821061] ? vma_interval_tree_remove+0xc75/0xec0 [ 23.821083] vma_interval_tree_remove+0xc75/0xec0 [ 23.821105] vma_prepare+0xc54/0x11a0 [ 23.822302] __split_vma+0x5af/0x950 [ 23.822323] ? __pfx___split_vma+0x10/0x10 [ 23.822930] ? find_held_lock+0x2c/0x110 [ 23.822960] do_vmi_align_munmap+0x2ba/0x11f0 [ 23.823603] ? lock_is_held_type+0x9f/0x120 [ 23.823626] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 23.824302] ? mtree_range_walk+0x632/0x900 [ 23.824612] ? mas_walk+0x5c7/0x7c0 [ 23.824874] do_vmi_munmap+0x1f1/0x2b0 [ 23.824895] mmap_region+0x1f9/0x2660 [ 23.825504] ? vm_mmap_pgoff+0x15c/0x3a0 [ 23.825785] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 23.825808] ? __pfx_lock_acquire+0x10/0x10 [ 23.826580] ? __pfx_mmap_region+0x10/0x10 [ 23.826880] ? security_mmap_addr+0x7d/0xa0 [ 23.826900] ? get_unmapped_area+0x1f5/0x3f0 [ 23.827552] do_mmap+0x854/0xf00 [ 23.827575] vm_mmap_pgoff+0x1a6/0x3a0 [ 23.828115] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 23.828420] ksys_mmap_pgoff+0x3af/0x500 [ 23.828699] do_syscall_64+0x3f/0x90 [ 23.828961] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 23.829324] RIP: 0033:0x7f9a15e96d82 [ 23.829579] 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 [ 23.830731] RSP: 002b:00007ffde1a3c928 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 23.831215] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f9a15e96d82 [ 23.831682] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f9a152d0000 [ 23.832134] RBP: 00007f9a152d0000 R08: 0000000000000009 R09: 0000000000001000 [ 23.832599] R10: 0000000000000812 R11: 0000000000000206 R12: 000055c30f175ec0 [ 23.833061] R13: 00007ffde1a3c940 R14: 00007ffde1a3c970 R15: 00007ffde1a3ccd0 [ 23.833539] [ 23.833700] [ 23.833817] Allocated by task 208: [ 23.834048] kasan_save_stack+0x22/0x50 [ 23.834330] kasan_set_track+0x25/0x30 [ 23.834604] __kasan_slab_alloc+0x59/0x70 [ 23.834905] kmem_cache_alloc+0x16b/0x370 [ 23.835210] vm_area_dup+0x20/0x160 [ 23.835480] __split_vma+0x170/0x950 [ 23.835744] split_vma+0xc6/0x110 [ 23.836005] mprotect_fixup+0x8d2/0xb30 [ 23.836299] do_mprotect_pkey+0x87e/0xd40 [ 23.836604] __x64_sys_mprotect+0x78/0xc0 [ 23.836905] do_syscall_64+0x3f/0x90 [ 23.837181] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 23.837560] [ 23.837684] Freed by task 13: [ 23.837908] kasan_save_stack+0x22/0x50 [ 23.838199] kasan_set_track+0x25/0x30 [ 23.838490] kasan_save_free_info+0x2b/0x50 [ 23.838803] __kasan_slab_free+0x10a/0x190 [ 23.839113] kmem_cache_free+0x10d/0x4d0 [ 23.839412] rcu_core+0x8c8/0x2860 [ 23.839675] __do_softirq+0x1b7/0x7d4 [ 23.839956] [ 23.839959] Last potentially related work creation: [ 23.839963] kasan_save_stack+0x22/0x50 [ 23.839986] __kasan_record_aux_stack+0x8e/0xa0 [ 23.840003] __call_rcu_common.constprop.0+0x6a/0xb90 [ 23.841623] remove_vma+0x139/0x170 [ 23.841637] do_vmi_align_munmap+0xd4a/0x11f0 [ 23.841655] do_vmi_munmap+0x1f1/0x2b0 [ 23.842820] __vm_munmap+0x138/0x3a0 [ 23.843089] __x64_sys_munmap+0x59/0x80 [ 23.843375] do_syscall_64+0x3f/0x90 [ 23.843653] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 23.844022] [ 23.844148] The buggy address belongs to the object at ffff88800eee4d98 [ 23.844148] which belongs to the cache vm_area_struct of size 168 [ 23.845024] The buggy address is located 88 bytes inside of [ 23.845024] freed 168-byte region [ffff88800eee4d98, ffff88800eee4e40) [ 23.845862] [ 23.845989] The buggy address belongs to the physical page: [ 23.845994] page:0000000086bc4f2e refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xeee4 [ 23.846011] memcg:ffff88800eca7a01 [ 23.846017] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 23.846030] page_type: 0xffffffff() [ 23.846044] raw: 0100000000000200 ffff8880087a0c80 0000000000000000 dead000000000001 [ 23.846059] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800eca7a01 [ 23.846067] page dumped because: kasan: bad access detected [ 23.846072] [ 23.846075] Memory state around the buggy address: [ 23.846081] ffff88800eee4c80: fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 [ 23.846091] ffff88800eee4d00: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc [ 23.846101] >ffff88800eee4d80: fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb [ 23.846109] ^ [ 23.846118] ffff88800eee4e00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 23.851989] ffff88800eee4e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 23.851997] ================================================================== [ 23.852044] Disabling lock debugging due to kernel taint Debian GNU/Linux 11 syzkaller ttyS0 syzkaller login: [ 25.236260] BUG: Bad rss-counter state mm:000000000abcfcf2 type:MM_FILEPAGES val:33 [ 25.236963] BUG: Bad rss-counter state mm:000000000abcfcf2 type:MM_ANONPAGES val:22 [ 25.670838] BUG: Bad rss-counter state mm:00000000ad27f383 type:MM_FILEPAGES val:33 [ 25.671561] BUG: Bad rss-counter state mm:00000000ad27f383 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:56429' (ECDSA) to the list of known hosts. [ 25.799567] general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI [ 25.800938] KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] [ 25.801848] CPU: 0 PID: 236 Comm: sshd Tainted: G B 6.4.0-rc7-next-20230620 #1 [ 25.802873] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 25.803847] RIP: 0010:__rb_insert_augmented+0x78/0x8b0 [ 25.804506] Code: ea 48 c1 ea 03 42 80 3c 2a 00 0f 85 65 05 00 00 4c 8b 65 00 41 f6 c4 01 0f 85 18 05 00 00 4d 8d 44 24 08 4c 89 c2 48 c1 ea 03 <42> 80 3c 2a 00 0f 85 55 05 00 00 4d 8b 74 24 08 49 39 ee 0f 84 77 [ 25.806643] RSP: 0018:ffff88800d6978a8 EFLAGS: 00010212 [ 25.807292] RAX: ffff888019bcdef8 RBX: ffff88801ac802f8 RCX: 1ffff1100359005f [ 25.808144] RDX: 0000000000000001 RSI: ffff888019bcdef8 RDI: ffff88801ac802f8 [ 25.809000] RBP: ffff88800e615868 R08: 0000000000000008 R09: 0000000000000000 [ 25.809844] R10: 0000000000000000 R11: 00000000000b6a61 R12: 0000000000000000 [ 25.810675] R13: dffffc0000000000 R14: ffff88800d697988 R15: ffffffff816e6340 [ 25.811520] FS: 00007f9a214ac900(0000) GS:ffff88806ce00000(0000) knlGS:0000000000000000 [ 25.812457] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 25.813139] CR2: 00007f9a21462000 CR3: 000000000f046000 CR4: 0000000000350ef0 [ 25.813991] Call Trace: [ 25.814308] [ 25.814588] ? die_addr+0x3c/0xa0 [ 25.815021] ? exc_general_protection+0x125/0x220 [ 25.815626] ? asm_exc_general_protection+0x26/0x30 [ 25.816244] ? __pfx_vma_interval_tree_augment_rotate+0x10/0x10 [ 25.816972] ? __rb_insert_augmented+0x78/0x8b0 [ 25.817568] ? vma_interval_tree_insert+0x23a/0x400 [ 25.818183] vma_prepare+0xa1a/0x11a0 [ 25.818654] __split_vma+0x5af/0x950 [ 25.819124] ? __pfx___split_vma+0x10/0x10 [ 25.819650] ? lock_acquire+0x434/0x4c0 [ 25.820141] do_vmi_align_munmap+0x361/0x11f0 [ 25.820698] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 25.821294] ? mtree_range_walk+0x632/0x900 [ 25.821860] ? mas_walk+0x5c7/0x7c0 [ 25.822325] do_vmi_munmap+0x1f1/0x2b0 [ 25.822809] mmap_region+0x1f9/0x2660 [ 25.823285] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 25.823989] ? __pfx_lock_acquire+0x10/0x10 [ 25.824510] ? __pfx_mmap_region+0x10/0x10 [ 25.825036] ? security_mmap_addr+0x7d/0xa0 [ 25.825626] ? get_unmapped_area+0x1f5/0x3f0 [ 25.826185] do_mmap+0x854/0xf00 [ 25.826634] vm_mmap_pgoff+0x1a6/0x3a0 [ 25.827134] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 25.827709] ksys_mmap_pgoff+0x3af/0x500 [ 25.828223] do_syscall_64+0x3f/0x90 [ 25.828712] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 25.829369] RIP: 0033:0x7f9a2203ed82 [ 25.829845] 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 [ 25.832020] RSP: 002b:00007ffce88c73f8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 25.832947] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f9a2203ed82 [ 25.833837] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f9a2145d000 [ 25.834701] RBP: 00007f9a2145d000 R08: 0000000000000008 R09: 0000000000001000 [ 25.835553] R10: 0000000000000812 R11: 0000000000000206 R12: 000055da711a2fe0 [ 25.836418] R13: 00007ffce88c7410 R14: 00007ffce88c7440 R15: 00007ffce88c77a0 [ 25.837292] [ 25.837598] Modules linked in: [ 25.838293] ---[ end trace 0000000000000000 ]--- [ 25.838966] RIP: 0010:__rb_insert_augmented+0x78/0x8b0 [ 25.839988] Code: ea 48 c1 ea 03 42 80 3c 2a 00 0f 85 65 05 00 00 4c 8b 65 00 41 f6 c4 01 0f 85 18 05 00 00 4d 8d 44 24 08 4c 89 c2 48 c1 ea 03 <42> 80 3c 2a 00 0f 85 55 05 00 00 4d 8b 74 24 08 49 39 ee 0f 84 77 [ 25.842543] RSP: 0018:ffff88800d6978a8 EFLAGS: 00010212 [ 25.843418] RAX: ffff888019bcdef8 RBX: ffff88801ac802f8 RCX: 1ffff1100359005f [ 25.844521] RDX: 0000000000000001 RSI: ffff888019bcdef8 RDI: ffff88801ac802f8 [ 25.845602] RBP: ffff88800e615868 R08: 0000000000000008 R09: 0000000000000000 [ 25.846503] R10: 0000000000000000 R11: 00000000000b6a61 R12: 0000000000000000 [ 25.847391] R13: dffffc0000000000 R14: ffff88800d697988 R15: ffffffff816e6340 [ 25.848277] FS: 00007f9a214ac900(0000) GS:ffff88806ce00000(0000) knlGS:0000000000000000 [ 25.849271] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 25.850022] CR2: 00007f9a21462000 CR3: 000000000f046000 CR4: 0000000000350ef0 VM DIAGNOSIS: 18:13:18 Registers: info registers vcpu 0 RAX=ffff88800ef5b1c0 RBX=0000000000000000 RCX=0000000000000000 RDX=ffff88800ef59b40 RSI=ffffffff810ac51d RDI=0000000000000001 RBP=ffff88800ef59b40 RSP=ffff888015f17ee8 R8 =0000000000000001 R9 =0000000000000000 R10=0000000000000000 R11=00000000000b6a61 R12=0000000000000000 R13=0000000000000000 R14=0000000000000000 R15=0000000000000000 RIP=ffffffff810ac52d 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 00007fbe213ce900 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=00007fffbfb15000 CR3=0000000014572000 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=ffffffffffffffffffff000000000000 XMM01=000000000000003635006b6f6c6c756e XMM02=62003d73646e756f7200323135616873 XMM03=5320444f4854454d5f54505952434e45 XMM04=40404040404040404040404040404040 XMM05=5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a XMM06=20202020202020202020202020202020 XMM07=00000000000000000000000000000000 XMM08=00000000000000000000000000202020 XMM09=ff0000ffffffffffff00000000ffffff XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=ffff88806cf35000 RBX=0000000000000001 RCX=ffffffff8451250e RDX=ffffed100d9e6a01 RSI=0000000000000004 RDI=ffffffff81288ac5 RBP=dffffc0000000000 RSP=ffff888008e07e70 R8 =0000000000000000 R9 =ffffed100d9e6a00 R10=ffff88806cf35003 R11=ffff888008c04400 R12=ffffffff85d3d350 R13=1ffff110011c0fd3 R14=0000000000000000 R15=0000000000000000 RIP=ffffffff8451349f 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=00007f938e53d000 CR3=000000000d5d2000 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=2038313a33313a3831203032206e754a XMM01=73732878696e755f6d6170203a5d3732 XMM02=65736f6c63206e6f6973736573203a29 XMM03=755f6d6170203a5d3732325b64687373 XMM04=69662068637573206f4e203a656c6163 XMM05=3a656c696620766e65206e65706f206f XMM06=65733a6468737328766e655f6d617020 XMM07=6b7a79732038313a33313a3831203032 XMM08=3d656e696c646d632022656369767265 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000