syzkaller login: [ 23.754732] BUG: Bad rss-counter state mm:0000000022cd387b type:MM_FILEPAGES val:33 [ 23.756230] BUG: Bad rss-counter state mm:0000000022cd387b type:MM_ANONPAGES val:22 [ 23.762427] ================================================================== [ 23.763328] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 23.764297] Read of size 8 at addr ffff88800eee2798 by task cron/220 [ 23.765093] [ 23.765314] CPU: 1 PID: 220 Comm: cron Not tainted 6.4.0-rc7-next-20230620 #1 [ 23.766205] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 23.767178] Call Trace: [ 23.767511] [ 23.767808] dump_stack_lvl+0x91/0xf0 [ 23.768310] print_report+0xcc/0x620 [ 23.768810] ? __virt_addr_valid+0x102/0x340 [ 23.769365] ? vma_interval_tree_remove+0xc75/0xec0 [ 23.769992] ? vma_interval_tree_remove+0xc75/0xec0 [ 23.770629] kasan_report+0xbe/0xf0 [ 23.771108] ? vma_interval_tree_remove+0xc75/0xec0 [ 23.771752] vma_interval_tree_remove+0xc75/0xec0 [ 23.772370] vma_prepare+0xc54/0x11a0 [ 23.772864] __split_vma+0x5af/0x950 [ 23.773336] ? __pfx___split_vma+0x10/0x10 [ 23.773868] ? find_held_lock+0x2c/0x110 [ 23.774396] do_vmi_align_munmap+0x2ba/0x11f0 [ 23.774969] ? lock_is_held_type+0x9f/0x120 [ 23.775508] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 23.776139] ? mtree_range_walk+0x632/0x900 [ 23.776698] ? mas_walk+0x5c7/0x7c0 [ 23.777176] do_vmi_munmap+0x1f1/0x2b0 [ 23.777674] mmap_region+0x1f9/0x2660 [ 23.778166] ? vm_mmap_pgoff+0x15c/0x3a0 [ 23.778676] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 23.779401] ? __pfx_lock_acquire+0x10/0x10 [ 23.779953] ? __pfx_mmap_region+0x10/0x10 [ 23.780481] ? security_mmap_addr+0x7d/0xa0 [ 23.781017] ? get_unmapped_area+0x1f5/0x3f0 [ 23.781578] do_mmap+0x854/0xf00 [ 23.782024] vm_mmap_pgoff+0x1a6/0x3a0 [ 23.782521] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 23.783102] ksys_mmap_pgoff+0x3af/0x500 [ 23.783611] do_syscall_64+0x3f/0x90 [ 23.784122] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 23.784774] RIP: 0033:0x7fcf0faf0d82 [ 23.785233] 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.787379] RSP: 002b:00007ffca3c88c98 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 23.788309] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007fcf0faf0d82 [ 23.789153] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007fcf0f3aa000 [ 23.790012] RBP: 00007fcf0f3aa000 R08: 0000000000000009 R09: 0000000000001000 [ 23.790867] R10: 0000000000000812 R11: 0000000000000206 R12: 0000558f3c83ce00 [ 23.791734] R13: 00007ffca3c88cb0 R14: 00007ffca3c88ce0 R15: 00007ffca3c89040 [ 23.792598] [ 23.792895] [ 23.793109] Allocated by task 213: [ 23.793539] kasan_save_stack+0x22/0x50 [ 23.794046] kasan_set_track+0x25/0x30 [ 23.794544] __kasan_slab_alloc+0x59/0x70 [ 23.795072] kmem_cache_alloc+0x16b/0x370 [ 23.795591] vm_area_dup+0x20/0x160 [ 23.796069] __split_vma+0x170/0x950 [ 23.796538] split_vma+0xc6/0x110 [ 23.796991] mprotect_fixup+0x8d2/0xb30 [ 23.797493] do_mprotect_pkey+0x87e/0xd40 [ 23.798017] __x64_sys_mprotect+0x78/0xc0 [ 23.798547] do_syscall_64+0x3f/0x90 [ 23.799028] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 23.799674] [ 23.799898] Freed by task 213: [ 23.800293] kasan_save_stack+0x22/0x50 [ 23.800800] kasan_set_track+0x25/0x30 [ 23.801310] kasan_save_free_info+0x2b/0x50 [ 23.801843] __kasan_slab_free+0x10a/0x190 [ 23.802389] kmem_cache_free+0x10d/0x4d0 [ 23.802903] rcu_core+0x8c8/0x2860 [ 23.803351] __do_softirq+0x1b7/0x7d4 [ 23.803840] [ 23.804061] Last potentially related work creation: [ 23.804647] kasan_save_stack+0x22/0x50 [ 23.805148] __kasan_record_aux_stack+0x8e/0xa0 [ 23.805726] __call_rcu_common.constprop.0+0x6a/0xb90 [ 23.806366] remove_vma+0x139/0x170 [ 23.806822] do_vmi_align_munmap+0xd4a/0x11f0 [ 23.807380] do_vmi_munmap+0x1f1/0x2b0 [ 23.807892] __vm_munmap+0x138/0x3a0 [ 23.808368] __x64_sys_munmap+0x59/0x80 [ 23.808880] do_syscall_64+0x3f/0x90 [ 23.809360] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 23.810009] [ 23.810223] Second to last potentially related work creation: [ 23.810917] kasan_save_stack+0x22/0x50 [ 23.811419] __kasan_record_aux_stack+0x8e/0xa0 [ 23.812021] __call_rcu_common.constprop.0+0x6a/0xb90 [ 23.812674] remove_vma+0x139/0x170 [ 23.813131] do_vmi_align_munmap+0xd4a/0x11f0 [ 23.813698] do_vmi_munmap+0x1f1/0x2b0 [ 23.814198] mmap_region+0x1f9/0x2660 [ 23.814691] do_mmap+0x854/0xf00 [ 23.815123] vm_mmap_pgoff+0x1a6/0x3a0 [ 23.815621] ksys_mmap_pgoff+0x3af/0x500 [ 23.816136] do_syscall_64+0x3f/0x90 [ 23.816614] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 23.817271] [ 23.817488] The buggy address belongs to the object at ffff88800eee2740 [ 23.817488] which belongs to the cache vm_area_struct of size 168 [ 23.818972] The buggy address is located 88 bytes inside of [ 23.818972] freed 168-byte region [ffff88800eee2740, ffff88800eee27e8) [ 23.820394] [ 23.820612] The buggy address belongs to the physical page: [ 23.821277] page:00000000dc0492a2 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xeee2 [ 23.822384] memcg:ffff88800ef1d401 [ 23.822808] anon flags: 0x100000000000200(slab|node=0|zone=1) [ 23.823522] page_type: 0xffffffff() [ 23.823985] raw: 0100000000000200 ffff8880087a0c80 ffffea000039d380 dead000000000003 [ 23.824911] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800ef1d401 [ 23.825822] page dumped because: kasan: bad access detected [ 23.826499] [ 23.826713] Memory state around the buggy address: [ 23.827324] ffff88800eee2680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 23.828215] ffff88800eee2700: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 23.829098] >ffff88800eee2780: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc [ 23.829961] ^ [ 23.830468] ffff88800eee2800: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 [ 23.831342] ffff88800eee2880: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc [ 23.832220] ================================================================== [ 23.833141] Disabling lock debugging due to kernel taint [ 23.946332] BUG: Bad rss-counter state mm:000000002a20af1f type:MM_FILEPAGES val:164 [ 23.947355] BUG: Bad rss-counter state mm:000000002a20af1f type:MM_ANONPAGES val:50 [ 26.226685] BUG: Bad rss-counter state mm:00000000ef9ef0f1 type:MM_FILEPAGES val:33 [ 26.227917] BUG: Bad rss-counter state mm:00000000ef9ef0f1 type:MM_ANONPAGES val:22 [ 26.699508] BUG: Bad rss-counter state mm:0000000038569bfb type:MM_FILEPAGES val:33 [ 26.700715] BUG: Bad rss-counter state mm:0000000038569bfb type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:28980' (ECDSA) to the list of known hosts. 2023/06/20 20:17:04 fuzzer started 2023/06/20 20:17:05 dialing manager at localhost:36067 2023/06/20 20:17:05 checking machine... 2023/06/20 20:17:05 checking revisions... [ 27.360370] kmemleak: Automatic memory scanning thread ended 2023/06/20 20:17:05 testing simple program... [ 27.410889] cgroup: Unknown subsys name 'net' [ 27.471376] cgroup: Unknown subsys name 'rlimit' [ 28.520277] general protection fault, probably for non-canonical address 0xe0ae3c23e000001b: 0000 [#1] PREEMPT SMP KASAN NOPTI [ 28.521632] KASAN: maybe wild-memory-access in range [0x0572011f000000d8-0x0572011f000000df] [ 28.522597] CPU: 1 PID: 269 Comm: sshd Tainted: G B 6.4.0-rc7-next-20230620 #1 [ 28.523590] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 28.524537] RIP: 0010:__rb_insert_augmented+0x9d/0x8b0 [ 28.525174] 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 [ 28.527229] RSP: 0018:ffff888015cd78a8 EFLAGS: 00010217 [ 28.527875] RAX: ffff888019ae05d0 RBX: ffff88800e6cc040 RCX: ffffffff844d49f9 [ 28.528691] RDX: 00ae4023e000001b RSI: 0000000000000008 RDI: ffff88800e06b848 [ 28.529519] RBP: ffff88800f3e8000 R08: ffff88800e06b848 R09: 0000000000000000 [ 28.530343] R10: 0000000000000000 R11: 00000000000b6a61 R12: ffff88800e06b840 [ 28.531167] R13: dffffc0000000000 R14: 0572011f000000dc R15: ffffffff816e6340 [ 28.531994] FS: 0000000000000000(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 [ 28.532911] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 28.533591] CR2: 00007f5cd5f5e260 CR3: 000000000c626000 CR4: 0000000000350ee0 [ 28.534423] Call Trace: [ 28.534734] [ 28.535010] ? die_addr+0x3c/0xa0 [ 28.535444] ? exc_general_protection+0x125/0x220 [ 28.536057] ? asm_exc_general_protection+0x26/0x30 [ 28.536666] ? __pfx_vma_interval_tree_augment_rotate+0x10/0x10 [ 28.537384] ? __rb_insert_augmented+0x5e9/0x8b0 [ 28.537971] ? __rb_insert_augmented+0x9d/0x8b0 [ 28.538562] ? __rb_insert_augmented+0x5e9/0x8b0 [ 28.539150] vma_prepare+0xa1a/0x11a0 [ 28.539639] __split_vma+0x5af/0x950 [ 28.540138] ? __pfx___split_vma+0x10/0x10 [ 28.540663] ? lock_acquire+0x434/0x4c0 [ 28.541162] do_vmi_align_munmap+0x361/0x11f0 [ 28.541715] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 28.542308] ? mtree_range_walk+0x632/0x900 [ 28.542859] ? mas_walk+0x5c7/0x7c0 [ 28.543299] do_vmi_munmap+0x1f1/0x2b0 [ 28.543749] mmap_region+0x1f9/0x2660 [ 28.544198] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 28.544845] ? __pfx_lock_acquire+0x10/0x10 [ 28.545327] ? __pfx_mmap_region+0x10/0x10 [ 28.545807] ? security_mmap_addr+0x7d/0xa0 [ 28.546286] ? get_unmapped_area+0x1f5/0x3f0 [ 28.546781] do_mmap+0x854/0xf00 [ 28.547180] vm_mmap_pgoff+0x1a6/0x3a0 [ 28.547629] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 28.548161] ksys_mmap_pgoff+0x3af/0x500 [ 28.548674] do_syscall_64+0x3f/0x90 [ 28.549110] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 28.549691] RIP: 0033:0x7f5cd652fd82 [ 28.550101] 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 [ 28.552014] RSP: 002b:00007fffb239a978 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 28.552833] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f5cd652fd82 [ 28.553598] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f5cd5f5a000 [ 28.554365] RBP: 00007f5cd5f5a000 R08: 0000000000000003 R09: 0000000000002000 [ 28.555210] R10: 0000000000000812 R11: 0000000000000206 R12: 00007f5cd6110950 [ 28.556035] R13: 00007fffb239a990 R14: 00007fffb239a9c0 R15: 00007fffb239ad50 [ 28.556882] [ 28.557167] Modules linked in: [ 28.557808] ---[ end trace 0000000000000000 ]--- [ 28.558406] RIP: 0010:__rb_insert_augmented+0x9d/0x8b0 [ 28.559231] 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 [ 28.561414] RSP: 0018:ffff888015cd78a8 EFLAGS: 00010217 [ 28.562194] RAX: ffff888019ae05d0 RBX: ffff88800e6cc040 RCX: ffffffff844d49f9 [ 28.563056] RDX: 00ae4023e000001b RSI: 0000000000000008 RDI: ffff88800e06b848 [ 28.563909] RBP: ffff88800f3e8000 R08: ffff88800e06b848 R09: 0000000000000000 [ 28.564756] R10: 0000000000000000 R11: 00000000000b6a61 R12: ffff88800e06b840 [ 28.565579] R13: dffffc0000000000 R14: 0572011f000000dc R15: ffffffff816e6340 [ 28.566430] FS: 0000000000000000(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 [ 28.567373] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 28.568082] CR2: 00007f5cd5f5e260 CR3: 000000000c626000 CR4: 0000000000350ee0 executing program executing program executing program VM DIAGNOSIS: 20:17:04 Registers: info registers vcpu 0 RAX=0000000000000001 RBX=0000000000000000 RCX=ffffffff815343f6 RDX=fffffbfff0ba7a6b RSI=0000000000000008 RDI=ffffffff85d3d350 RBP=ffffffff81810727 RSP=ffff88806ce09de8 R8 =0000000000000000 R9 =fffffbfff0ba7a6a R10=ffffffff85d3d357 R11=0000000000000000 R12=0000000000000200 R13=ffffea000059fc80 R14=ffffffff813782f8 R15=ffff8880167f28d0 RIP=ffffffff815343fe RFL=00000047 [---Z-PC] 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=00007ffef27cf798 CR3=000000000e442000 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=2034303a37313a3032203032206e754a XMM01=657463656e6e6f63736944203a5d3433 XMM02=302e303120746f6f722072657375206d XMM03=203a5d3433325b646873732072656c6c XMM04=69662068637573206f4e203a656c6163 XMM05=3a656c696620766e65206e65706f206f XMM06=65733a6468737328766e655f6d617020 XMM07=6b7a79732034303a37313a3032203032 XMM08=3d656e696c646d632022656369767265 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 info registers vcpu 1 RAX=00007f19ccecba9e RBX=00007f19ccecba9e RCX=0000000000000000 RDX=000000007fffffe4 RSI=00007f19ccecba9e RDI=00007ffcfbf94a90 RBP=00007ffcfbf94a80 RSP=00007ffcfbf94530 R8 =0000000000000000 R9 =000000000000001b R10=00007ffcfbf94a47 R11=0000000000000000 R12=00007ffcfbf94a90 R13=00007f19ccecba84 R14=00007ffcfbf94bd0 R15=00007f19cc94fba0 RIP=00007f19cc7fa409 RFL=00000293 [--S-A-C] CPL=3 II=0 A20=1 SMM=0 HLT=0 ES =0000 0000000000000000 00000000 00000000 CS =0033 0000000000000000 ffffffff 00a0fb00 DPL=3 CS64 [-RA] SS =002b 0000000000000000 ffffffff 00c0f300 DPL=3 DS [-WA] DS =0000 0000000000000000 00000000 00000000 FS =0000 00007f19cc39c900 00000000 00000000 GS =0000 0000000000000000 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=00007f19cc9540b0 CR3=00000000145ee000 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=25252525252525252525252525252525 XMM01=000000000000000000000000000000ff XMM02=000000000000000000000000000000ff XMM03=5320444f4854454d5f54505952434e45 XMM04=40404040404040404040404040404040 XMM05=5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a XMM06=20202020202020202020202020202020 XMM07=00000000000000000000000000000000 XMM08=7465675f6c697475646f6d6d61705f00 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000