[ 32.833260] BUG: Bad rss-counter state mm:000000005c12afe4 type:MM_FILEPAGES val:33
[ 32.833295] BUG: Bad rss-counter state mm:000000005c12afe4 type:MM_ANONPAGES val:22
[ 33.251228] ==================================================================
[ 33.252140] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0
[ 33.253078] Read of size 8 at addr ffff88801a3b4880 by task sshd/222
[ 33.253835]
[ 33.254053] CPU: 1 PID: 222 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1
[ 33.255149] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
[ 33.256133] Call Trace:
[ 33.256456]
[ 33.256743] dump_stack_lvl+0x91/0xf0
[ 33.257257] print_report+0xcc/0x620
[ 33.257747] ? __virt_addr_valid+0x102/0x340
[ 33.258297] ? vma_interval_tree_remove+0xc75/0xec0
[ 33.258926] ? vma_interval_tree_remove+0xc75/0xec0
[ 33.259550] kasan_report+0xbe/0xf0
[ 33.260024] ? vma_interval_tree_remove+0xc75/0xec0
[ 33.260641] vma_interval_tree_remove+0xc75/0xec0
[ 33.261244] vma_prepare+0xc54/0x11a0
[ 33.261733] __split_vma+0x5af/0x950
[ 33.262206] ? __pfx___split_vma+0x10/0x10
[ 33.262741] ? find_held_lock+0x2c/0x110
[ 33.263268] do_vmi_align_munmap+0x2ba/0x11f0
[ 33.263834] ? lock_is_held_type+0x9f/0x120
[ 33.264375] ? __pfx_do_vmi_align_munmap+0x10/0x10
[ 33.264980] ? mtree_range_walk+0x632/0x900
[ 33.265534] ? mas_walk+0x5c7/0x7c0
[ 33.266019] do_vmi_munmap+0x1f1/0x2b0
[ 33.266536] mmap_region+0x1f9/0x2660
[ 33.267027] ? vm_mmap_pgoff+0x15c/0x3a0
[ 33.267535] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10
[ 33.268250] ? __pfx_lock_acquire+0x10/0x10
[ 33.268779] ? __pfx_mmap_region+0x10/0x10
[ 33.269308] ? security_mmap_addr+0x7d/0xa0
[ 33.269844] ? get_unmapped_area+0x1f5/0x3f0
[ 33.270397] do_mmap+0x854/0xf00
[ 33.270851] vm_mmap_pgoff+0x1a6/0x3a0
[ 33.271353] ? __pfx_vm_mmap_pgoff+0x10/0x10
[ 33.271926] ksys_mmap_pgoff+0x3af/0x500
[ 33.272426] do_syscall_64+0x3f/0x90
[ 33.272902] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[ 33.273549] RIP: 0033:0x7fada8cdcd82
[ 33.274005] 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
[ 33.276156] RSP: 002b:00007fff925eab58 EFLAGS: 00000206 ORIG_RAX: 0000000000000009
[ 33.277070] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fada8cdcd82
[ 33.277930] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fada8116000
[ 33.278816] RBP: 00007fada8116000 R08: 0000000000000009 R09: 0000000000001000
[ 33.279662] R10: 0000000000000812 R11: 0000000000000206 R12: 00005577a71c6ec0
[ 33.280514] R13: 00007fff925eab70 R14: 00007fff925eaba0 R15: 00007fff925eaf00
[ 33.281373]
[ 33.281669]
[ 33.281887] Allocated by task 207:
[ 33.282321] kasan_save_stack+0x22/0x50
[ 33.282834] kasan_set_track+0x25/0x30
[ 33.283330] __kasan_slab_alloc+0x59/0x70
[ 33.283860] kmem_cache_alloc+0x16b/0x370
[ 33.284379] vm_area_dup+0x20/0x160
[ 33.284833] __split_vma+0x170/0x950
[ 33.285301] split_vma+0xc6/0x110
[ 33.285736] mprotect_fixup+0x8d2/0xb30
[ 33.286284] do_mprotect_pkey+0x87e/0xd40
[ 33.286819] __x64_sys_mprotect+0x78/0xc0
[ 33.287343] do_syscall_64+0x3f/0x90
[ 33.287825] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[ 33.288481]
[ 33.288695] Freed by task 207:
[ 33.289088] kasan_save_stack+0x22/0x50
[ 33.289590] kasan_set_track+0x25/0x30
[ 33.290080] kasan_save_free_info+0x2b/0x50
[ 33.290638] __kasan_slab_free+0x10a/0x190
[ 33.291175] kmem_cache_free+0x10d/0x4d0
[ 33.291687] rcu_core+0x8c8/0x2860
[ 33.292128] __do_softirq+0x1b7/0x7d4
[ 33.292607]
[ 33.292824] Last potentially related work creation:
[ 33.293416] kasan_save_stack+0x22/0x50
[ 33.293919] __kasan_record_aux_stack+0x8e/0xa0
[ 33.294489] __call_rcu_common.constprop.0+0x6a/0xb90
[ 33.295151] remove_vma+0x139/0x170
[ 33.295603] do_vmi_align_munmap+0xd4a/0x11f0
[ 33.296173] do_vmi_munmap+0x1f1/0x2b0
[ 33.296713] __vm_munmap+0x138/0x3a0
[ 33.297194] __x64_sys_munmap+0x59/0x80
[ 33.297689] do_syscall_64+0x3f/0x90
[ 33.298163] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[ 33.298821]
[ 33.299038] The buggy address belongs to the object at ffff88801a3b4828
[ 33.299038] which belongs to the cache vm_area_struct of size 168
[ 33.300491] The buggy address is located 88 bytes inside of
[ 33.300491] freed 168-byte region [ffff88801a3b4828, ffff88801a3b48d0)
[ 33.301872]
[ 33.302097] The buggy address belongs to the physical page:
[ 33.302783] page:000000005c62d5d7 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1a3b4
[ 33.303868] memcg:ffff88801a314801
[ 33.304293] flags: 0x100000000000200(slab|node=0|zone=1)
[ 33.304940] page_type: 0xffffffff()
[ 33.305390] raw: 0100000000000200 ffff88800879fc80 dead000000000122 0000000000000000
[ 33.306321] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88801a314801
[ 33.307246] page dumped because: kasan: bad access detected
[ 33.307914]
[ 33.308136] Memory state around the buggy address:
[ 33.308725] ffff88801a3b4780: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc
[ 33.309587] ffff88801a3b4800: fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb
[ 33.310451] >ffff88801a3b4880: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc
[ 33.311334] ^
[ 33.311752] ffff88801a3b4900: fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 33.312623] ffff88801a3b4980: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc 00
[ 33.313484] ==================================================================
[ 33.314477] Disabling lock debugging due to kernel taint
Debian GNU/Linux 11 syzkaller ttyS0
syzkaller login: [ 35.573585] BUG: Bad rss-counter state mm:00000000babf173a type:MM_FILEPAGES val:33
[ 35.574628] BUG: Bad rss-counter state mm:00000000babf173a type:MM_ANONPAGES val:22
[ 36.057158] BUG: Bad rss-counter state mm:0000000077d3029c type:MM_FILEPAGES val:33
[ 36.058321] BUG: Bad rss-counter state mm:0000000077d3029c type:MM_ANONPAGES val:22
Warning: Permanently added '[localhost]:41421' (ECDSA) to the list of known hosts.
[ 36.290735] general protection fault, probably for non-canonical address 0xe0a95c23e0000019: 0000 [#1] PREEMPT SMP KASAN NOPTI
[ 36.292141] KASAN: maybe wild-memory-access in range [0x054b011f000000c8-0x054b011f000000cf]
[ 36.293215] CPU: 1 PID: 238 Comm: sshd Tainted: G B 6.4.0-rc7-next-20230619 #1
[ 36.294294] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
[ 36.295283] RIP: 0010:__rb_insert_augmented+0x9d/0x8b0
[ 36.295941] Code: 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 01 00 00 4d 85 f6 74 1c 4c 89 f2 48 c1 ea 03 <42> 80 3c 2a 00 0f 85 61 05 00 00 41 f6 06 01 0f 84 7a 04 00 00 48
[ 36.298078] RSP: 0018:ffff88800edb7948 EFLAGS: 00010213
[ 36.298744] RAX: ffff888019a14140 RBX: ffff88801a1b6040 RCX: ffffffff844ce9f9
[ 36.299592] RDX: 00a96023e0000019 RSI: 0000000000000008 RDI: ffff888016873488
[ 36.300455] RBP: ffff88800cabe5c0 R08: ffff888016873488 R09: 0000000000000000
[ 36.301308] R10: 0000000000000003 R11: 00000000000b6996 R12: ffff888016873480
[ 36.302174] R13: dffffc0000000000 R14: 054b011f000000cf R15: ffffffff816e61c0
[ 36.303039] FS: 00007f147072c900(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000
[ 36.304000] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 36.304703] CR2: 00005651b7df81c0 CR3: 000000001672c000 CR4: 0000000000350ee0
[ 36.305600] Call Trace:
[ 36.305955]
[ 36.306242] ? die_addr+0x3c/0xa0
[ 36.306700] ? exc_general_protection+0x125/0x220
[ 36.307334] ? asm_exc_general_protection+0x26/0x30
[ 36.307962] ? __pfx_vma_interval_tree_augment_rotate+0x10/0x10
[ 36.308697] ? __rb_insert_augmented+0x5e9/0x8b0
[ 36.309293] ? __rb_insert_augmented+0x9d/0x8b0
[ 36.309876] ? __rb_insert_augmented+0x5e9/0x8b0
[ 36.310464] ? vma_interval_tree_insert_after+0x315/0x390
[ 36.311144] dup_mmap+0xc45/0x1770
[ 36.311593] ? __pfx_dup_mmap+0x10/0x10
[ 36.312086] ? __pfx_do_raw_spin_lock+0x10/0x10
[ 36.312693] ? _raw_spin_unlock_irqrestore+0x2c/0x50
[ 36.313345] ? trace_hardirqs_on+0x16/0x100
[ 36.313916] ? mm_init+0xb4a/0xe70
[ 36.314368] copy_process+0x3e68/0x7320
[ 36.314886] ? lock_acquire+0x434/0x4c0
[ 36.315394] ? __pfx_copy_process+0x10/0x10
[ 36.315932] ? expand_files+0x446/0x8e0
[ 36.316438] kernel_clone+0xeb/0x7d0
[ 36.316904] ? __pfx_kernel_clone+0x10/0x10
[ 36.317439] ? lock_acquire+0x434/0x4c0
[ 36.317940] ? lock_release+0x4d8/0x680
[ 36.318430] ? __pfx_lock_release+0x10/0x10
[ 36.318969] ? __pfx_lock_release+0x10/0x10
[ 36.319498] ? _raw_spin_unlock+0x1e/0x40
[ 36.320011] ? alloc_fd+0x2eb/0x760
[ 36.320480] __do_sys_clone+0xba/0x100
[ 36.320968] ? __pfx___do_sys_clone+0x10/0x10
[ 36.321540] ? fpregs_assert_state_consistent+0xbd/0xe0
[ 36.322204] do_syscall_64+0x3f/0x90
[ 36.322695] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[ 36.323340] RIP: 0033:0x7f1470beb4bb
[ 36.323795] Code: ed 0f 85 f8 00 00 00 64 4c 8b 0c 25 10 00 00 00 45 31 c0 4d 8d 91 d0 02 00 00 31 d2 31 f6 bf 11 00 20 01 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 91 00 00 00 41 89 c5 85 c0 0f 85 9e 00 00
[ 36.325894] RSP: 002b:00007ffc3f1c5310 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
[ 36.326798] RAX: ffffffffffffffda RBX: 0000000000008762 RCX: 00007f1470beb4bb
[ 36.327650] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
[ 36.328483] RBP: 0000000000000000 R08: 0000000000000000 R09: 00007f147072c900
[ 36.329323] R10: 00007f147072cbd0 R11: 0000000000000246 R12: 0000000000000000
[ 36.330164] R13: 00005651b7e05ec0 R14: 00005651b7e162e0 R15: 00007ffc3f1c5390
[ 36.331024]
[ 36.331315] Modules linked in:
[ 36.331995] ---[ end trace 0000000000000000 ]---
[ 36.332737] RIP: 0010:__rb_insert_augmented+0x9d/0x8b0
[ 36.333729] Code: 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 01 00 00 4d 85 f6 74 1c 4c 89 f2 48 c1 ea 03 <42> 80 3c 2a 00 0f 85 61 05 00 00 41 f6 06 01 0f 84 7a 04 00 00 48
[ 36.336447] RSP: 0018:ffff88800edb7948 EFLAGS: 00010213
[ 36.337356] RAX: ffff888019a14140 RBX: ffff88801a1b6040 RCX: ffffffff844ce9f9
[ 36.338566] RDX: 00a96023e0000019 RSI: 0000000000000008 RDI: ffff888016873488
[ 36.339812] RBP: ffff88800cabe5c0 R08: ffff888016873488 R09: 0000000000000000
[ 36.340919] R10: 0000000000000003 R11: 00000000000b6996 R12: ffff888016873480
[ 36.341955] R13: dffffc0000000000 R14: 054b011f000000cf R15: ffffffff816e61c0
[ 36.343035] FS: 00007f147072c900(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000
[ 36.344123] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 36.344885] CR2: 00005651b7df81c0 CR3: 000000001672c000 CR4: 0000000000350ee0
VM DIAGNOSIS:
18:01:42 Registers:
info registers vcpu 0
RAX=0000000080000000 RBX=ffff888015c1c798 RCX=0000000000000000 RDX=ffff888016a23680
RSI=ffffffff818d5414 RDI=0000000000000007 RBP=0000000000000007 RSP=ffff88801ca8f8a0
R8 =0000000000000007 R9 =0000000000000000 R10=0000000000000000 R11=0000000000000001
R12=0000000000000000 R13=2f6c616e72756f6a R14=dffffc0000000000 R15=ffff888015c1c7c8
RIP=ffffffff814c0800 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 00007f317e757900 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=00007f317ed0c650 CR3=000000000de9c000 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=000000000000000000000000000000ff
XMM02=000000000000000000000000000000ff XMM03=5320444f4854454d5f54505952434e45
XMM04=40404040404040404040404040404040 XMM05=5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a
XMM06=20202020202020202020202020202020 XMM07=00000000000000000000000000000000
XMM08=ffbc64ffffbc44ffffbc34ffffbc9f00 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=00007ffe45762448 CR3=0000000005482000 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=00007f1a39144510000055b2050f8790
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