syzkaller login: [ 33.207095] BUG: Bad rss-counter state mm:00000000d5db5e1e type:MM_FILEPAGES val:33 [ 33.208474] BUG: Bad rss-counter state mm:00000000d5db5e1e type:MM_ANONPAGES val:22 [ 33.358185] ================================================================== [ 33.359152] BUG: KASAN: slab-use-after-free in vma_interval_tree_remove+0xc75/0xec0 [ 33.360097] Read of size 8 at addr ffff88800dca9798 by task sshd/221 [ 33.360987] [ 33.361204] CPU: 0 PID: 221 Comm: sshd Not tainted 6.4.0-rc7-next-20230619 #1 [ 33.362060] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 33.363033] Call Trace: [ 33.363353] [ 33.363634] dump_stack_lvl+0x91/0xf0 [ 33.364121] print_report+0xcc/0x620 [ 33.364596] ? __virt_addr_valid+0x102/0x340 [ 33.365143] ? vma_interval_tree_remove+0xc75/0xec0 [ 33.365753] ? vma_interval_tree_remove+0xc75/0xec0 [ 33.366362] kasan_report+0xbe/0xf0 [ 33.366851] ? vma_interval_tree_remove+0xc75/0xec0 [ 33.367470] vma_interval_tree_remove+0xc75/0xec0 [ 33.368063] vma_prepare+0xc54/0x11a0 [ 33.368533] __split_vma+0x5af/0x950 [ 33.369003] ? __pfx___split_vma+0x10/0x10 [ 33.369532] ? find_held_lock+0x2c/0x110 [ 33.370050] do_vmi_align_munmap+0x2ba/0x11f0 [ 33.370634] ? lock_is_held_type+0x9f/0x120 [ 33.371173] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 33.371780] ? mtree_range_walk+0x632/0x900 [ 33.372332] ? mas_walk+0x5c7/0x7c0 [ 33.372812] do_vmi_munmap+0x1f1/0x2b0 [ 33.373309] mmap_region+0x1f9/0x2660 [ 33.373791] ? vm_mmap_pgoff+0x15c/0x3a0 [ 33.374300] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 33.375018] ? __pfx_lock_acquire+0x10/0x10 [ 33.375546] ? __pfx_mmap_region+0x10/0x10 [ 33.376072] ? security_mmap_addr+0x7d/0xa0 [ 33.376600] ? get_unmapped_area+0x1f5/0x3f0 [ 33.377152] do_mmap+0x854/0xf00 [ 33.377589] vm_mmap_pgoff+0x1a6/0x3a0 [ 33.378082] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 33.378662] ksys_mmap_pgoff+0x3af/0x500 [ 33.379164] do_syscall_64+0x3f/0x90 [ 33.379643] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 33.380284] RIP: 0033:0x7f0638a67d82 [ 33.380744] 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.382906] RSP: 002b:00007ffd30c97328 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 33.383806] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f0638a67d82 [ 33.384659] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f0637ea1000 [ 33.385514] RBP: 00007f0637ea1000 R08: 0000000000000009 R09: 0000000000001000 [ 33.386371] R10: 0000000000000812 R11: 0000000000000206 R12: 0000561775254f60 [ 33.387218] R13: 00007ffd30c97340 R14: 00007ffd30c97370 R15: 00007ffd30c976d0 [ 33.388083] [ 33.388370] [ 33.388582] Allocated by task 214: [ 33.389009] kasan_save_stack+0x22/0x50 [ 33.389514] kasan_set_track+0x25/0x30 [ 33.390003] __kasan_slab_alloc+0x59/0x70 [ 33.390519] kmem_cache_alloc+0x16b/0x370 [ 33.391054] vm_area_dup+0x20/0x160 [ 33.391503] __split_vma+0x170/0x950 [ 33.391969] split_vma+0xc6/0x110 [ 33.392415] mprotect_fixup+0x8d2/0xb30 [ 33.392909] do_mprotect_pkey+0x87e/0xd40 [ 33.393428] __x64_sys_mprotect+0x78/0xc0 [ 33.393955] do_syscall_64+0x3f/0x90 [ 33.394421] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 33.395068] [ 33.395285] Freed by task 214: [ 33.395672] kasan_save_stack+0x22/0x50 [ 33.396173] kasan_set_track+0x25/0x30 [ 33.396663] kasan_save_free_info+0x2b/0x50 [ 33.397192] __kasan_slab_free+0x10a/0x190 [ 33.397719] kmem_cache_free+0x10d/0x4d0 [ 33.398227] rcu_core+0x8c8/0x2860 [ 33.398689] __do_softirq+0x1b7/0x7d4 [ 33.399168] [ 33.399387] Last potentially related work creation: [ 33.399973] kasan_save_stack+0x22/0x50 [ 33.400480] __kasan_record_aux_stack+0x8e/0xa0 [ 33.401063] __call_rcu_common.constprop.0+0x6a/0xb90 [ 33.401707] remove_vma+0x139/0x170 [ 33.402158] do_vmi_align_munmap+0xd4a/0x11f0 [ 33.402718] do_vmi_munmap+0x1f1/0x2b0 [ 33.403204] __vm_munmap+0x138/0x3a0 [ 33.403666] __x64_sys_munmap+0x59/0x80 [ 33.404157] do_syscall_64+0x3f/0x90 [ 33.404630] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 33.405279] [ 33.405491] The buggy address belongs to the object at ffff88800dca9740 [ 33.405491] which belongs to the cache vm_area_struct of size 168 [ 33.406943] The buggy address is located 88 bytes inside of [ 33.406943] freed 168-byte region [ffff88800dca9740, ffff88800dca97e8) [ 33.408327] [ 33.408541] The buggy address belongs to the physical page: [ 33.409191] page:00000000cf331c59 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xdca9 [ 33.410262] memcg:ffff88800dcb9001 [ 33.410706] flags: 0x100000000000200(slab|node=0|zone=1) [ 33.411353] page_type: 0xffffffff() [ 33.411797] raw: 0100000000000200 ffff88800879fc80 ffffea00003a3a00 dead000000000004 [ 33.412703] raw: 0000000000000000 0000000000110011 00000001ffffffff ffff88800dcb9001 [ 33.413600] page dumped because: kasan: bad access detected [ 33.414259] [ 33.414472] Memory state around the buggy address: [ 33.415066] ffff88800dca9680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.415924] ffff88800dca9700: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 33.416770] >ffff88800dca9780: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc [ 33.417623] ^ [ 33.418116] ffff88800dca9800: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 [ 33.418980] ffff88800dca9880: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc [ 33.419893] ================================================================== [ 33.421057] Disabling lock debugging due to kernel taint [ 35.950609] BUG: Bad rss-counter state mm:00000000c5810c7d type:MM_FILEPAGES val:33 [ 35.951605] BUG: Bad rss-counter state mm:00000000c5810c7d type:MM_ANONPAGES val:22 [ 36.475146] BUG: Bad rss-counter state mm:00000000cbb58467 type:MM_FILEPAGES val:33 [ 36.476291] BUG: Bad rss-counter state mm:00000000cbb58467 type:MM_ANONPAGES val:22 Warning: Permanently added '[localhost]:33567' (ECDSA) to the list of known hosts. 2023/06/20 06:24:59 fuzzer started 2023/06/20 06:24:59 dialing manager at localhost:44161 2023/06/20 06:24:59 checking machine... 2023/06/20 06:24:59 checking revisions... [ 37.094525] kmemleak: Automatic memory scanning thread ended 2023/06/20 06:24:59 testing simple program... [ 37.154542] cgroup: Unknown subsys name 'net' [ 37.207520] cgroup: Unknown subsys name 'rlimit' [ 38.782811] general protection fault, probably for non-canonical address 0xe0c61c2c80000014: 0000 [#1] PREEMPT SMP KASAN NOPTI [ 38.784143] KASAN: maybe wild-memory-access in range [0x06310164000000a0-0x06310164000000a7] [ 38.785074] CPU: 0 PID: 265 Comm: cron Tainted: G B 6.4.0-rc7-next-20230619 #1 [ 38.786031] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 38.786962] RIP: 0010:__rb_insert_augmented+0x9d/0x8b0 [ 38.787584] 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 [ 38.789584] RSP: 0018:ffff88801921f8a8 EFLAGS: 00010217 [ 38.790188] RAX: ffff8880197eb758 RBX: ffff88800fcc05b0 RCX: ffffffff844ce9f9 [ 38.791000] RDX: 00c6202c80000014 RSI: 0000000000000008 RDI: ffff888016a91008 [ 38.791792] RBP: ffff88800fe56f00 R08: ffff888016a91008 R09: 0000000000000000 [ 38.792594] R10: 0000000000000000 R11: 00000000000b6996 R12: ffff888016a91000 [ 38.793421] R13: dffffc0000000000 R14: 06310164000000a7 R15: ffffffff816e61c0 [ 38.794256] FS: 00007f1e4bf24840(0000) GS:ffff88806ce00000(0000) knlGS:0000000000000000 [ 38.795215] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 38.795893] CR2: 0000563b5d09e2e8 CR3: 000000000cae2000 CR4: 0000000000350ef0 [ 38.796710] Call Trace: [ 38.797019] [ 38.797293] ? die_addr+0x3c/0xa0 [ 38.797721] ? exc_general_protection+0x125/0x220 [ 38.798319] ? asm_exc_general_protection+0x26/0x30 [ 38.798953] ? __pfx_vma_interval_tree_augment_rotate+0x10/0x10 [ 38.799659] ? __rb_insert_augmented+0x5e9/0x8b0 [ 38.800232] ? __rb_insert_augmented+0x9d/0x8b0 [ 38.800801] ? __rb_insert_augmented+0x5e9/0x8b0 [ 38.801371] vma_prepare+0xa1a/0x11a0 [ 38.801841] __split_vma+0x5af/0x950 [ 38.802308] ? __pfx___split_vma+0x10/0x10 [ 38.802879] ? lock_acquire+0x434/0x4c0 [ 38.803368] do_vmi_align_munmap+0x361/0x11f0 [ 38.803927] ? __pfx_do_vmi_align_munmap+0x10/0x10 [ 38.804513] ? mtree_range_walk+0x632/0x900 [ 38.805046] ? mas_walk+0x5c7/0x7c0 [ 38.805505] do_vmi_munmap+0x1f1/0x2b0 [ 38.805990] mmap_region+0x1f9/0x2660 [ 38.806456] ? __pfx_arch_get_unmapped_area_topdown+0x10/0x10 [ 38.807166] ? __pfx_lock_acquire+0x10/0x10 [ 38.807693] ? __pfx_mmap_region+0x10/0x10 [ 38.808195] ? security_mmap_addr+0x7d/0xa0 [ 38.808701] ? get_unmapped_area+0x1f5/0x3f0 [ 38.809240] do_mmap+0x854/0xf00 [ 38.809667] vm_mmap_pgoff+0x1a6/0x3a0 [ 38.810162] ? __pfx_vm_mmap_pgoff+0x10/0x10 [ 38.810716] ksys_mmap_pgoff+0x3af/0x500 [ 38.811222] do_syscall_64+0x3f/0x90 [ 38.811686] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 38.812314] RIP: 0033:0x7f1e4c246d82 [ 38.812758] 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 [ 38.814812] RSP: 002b:00007ffe76a9a5e8 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 [ 38.815698] RAX: ffffffffffffffda RBX: 0000000000000812 RCX: 00007f1e4c246d82 [ 38.816533] RDX: 0000000000000005 RSI: 0000000000001000 RDI: 00007f1e4bb00000 [ 38.817348] RBP: 00007f1e4bb00000 R08: 0000000000000009 R09: 0000000000001000 [ 38.818167] R10: 0000000000000812 R11: 0000000000000206 R12: 0000563b5d09de00 [ 38.819003] R13: 00007ffe76a9a600 R14: 00007ffe76a9a630 R15: 00007ffe76a9a990 [ 38.819840] [ 38.820129] Modules linked in: [ 38.820638] ---[ end trace 0000000000000000 ]--- [ 38.821217] RIP: 0010:__rb_insert_augmented+0x9d/0x8b0 [ 38.821849] 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 [ 38.823968] RSP: 0018:ffff88801921f8a8 EFLAGS: 00010217 [ 38.824602] RAX: ffff8880197eb758 RBX: ffff88800fcc05b0 RCX: ffffffff844ce9f9 [ 38.825453] RDX: 00c6202c80000014 RSI: 0000000000000008 RDI: ffff888016a91008 [ 38.826309] RBP: ffff88800fe56f00 R08: ffff888016a91008 R09: 0000000000000000 [ 38.827190] R10: 0000000000000000 R11: 00000000000b6996 R12: ffff888016a91000 [ 38.828037] R13: dffffc0000000000 R14: 06310164000000a7 R15: ffffffff816e61c0 [ 38.828873] FS: 00007f1e4bf24840(0000) GS:ffff88806ce00000(0000) knlGS:0000000000000000 [ 38.829819] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 38.830526] CR2: 0000563b5d09e2e8 CR3: 000000000cae2000 CR4: 0000000000350ef0 executing program executing program executing program VM DIAGNOSIS: 06:24:57 Registers: info registers vcpu 0 RAX=0000000000000000 RBX=0000000000000001 RCX=ffffffff8364f49c RDX=ffff888018028000 RSI=0000000000000000 RDI=0000000000000005 RBP=ffff88801920d000 RSP=ffff888016be79f8 R8 =0000000000000005 R9 =0000000000000000 R10=0000000000000001 R11=00000000000b6996 R12=0000000000000300 R13=ffff88801920d274 R14=0000000000034000 R15=dffffc0000000000 RIP=ffffffff814c01fc 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 00007f436f595900 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=00007f436fb4a650 CR3=0000000015da4000 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=00007f7e3c007130 RBX=0000000000000000 RCX=0000000000000280 RDX=0000000000000094 RSI=0000000000021000 RDI=0000000000000209 RBP=0000000000001fb0 RSP=00007f7e4a274620 R8 =0000000000000000 R9 =00007f7e3c000080 R10=00007f7e3c0073b0 R11=0000000000000000 R12=00007f7e3c000020 R13=00007f7e3c0008d0 R14=fffffffffffffee0 R15=00007f7e4a34b840 RIP=00007f7e4a6919e7 RFL=00000202 [-------] 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 00007f7e4a278700 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=00007f436fb4d0b0 CR3=0000000015e92000 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=34323a3630203032206e754a3e38333c XMM01=6d6f72662064657463656e6e6f637369 XMM02=2e303120746f6f722072657375206d6f XMM03=3a5d3033325b646873732038353a3432 XMM04=6456774875434142334f726f59427469 XMM05=485320415352203a3268737320303030 XMM06=206d6f726620746f6f7220726f662079 XMM07=00000000000000000000000000000000 XMM08=3a677562656420676f6c737973720000 XMM09=00000000000000000000000000000000 XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000