UBSAN: array-index-out-of-bounds in __anon_vma_prepare

Status: premoderation: reported syz repro on 2026/09/23 06:36
Reported-by: syzbot+afbf7210d329abd7dcba@syzkaller.appspotmail.com
First crash: 6h12m, last: 6h12m
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream UBSAN: array-index-out-of-bounds in __anon_vma_prepare mm 15 1 1885d 1881d 0/29 auto-closed as invalid on 2021/11/23 09:04

Sample crash report:
================================================================================
UBSAN: array-index-out-of-bounds in kernel/locking/qspinlock.c:130:9
index 6482 is out of range for type 'unsigned long[8]'
CPU: 1 PID: 1015 Comm: syz.1.325 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 dump_stack+0x15/0x20 lib/dump_stack.c:113
 ubsan_epilogue+0xe/0x40 lib/ubsan.c:151
 __ubsan_handle_out_of_bounds+0xdf/0xf0 lib/ubsan.c:282
 decode_tail kernel/locking/qspinlock.c:130 [inline]
 __pv_queued_spin_lock_slowpath+0x90e/0x9b0 kernel/locking/qspinlock.c:468
 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:585 [inline]
 queued_spin_lock_slowpath+0x47/0x50 arch/x86/include/asm/qspinlock.h:51
 queued_spin_lock include/asm-generic/qspinlock.h:85 [inline]
 do_raw_spin_lock_flags include/linux/spinlock.h:200 [inline]
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:119 [inline]
 _raw_spin_lock_irqsave+0x120/0x130 kernel/locking/spinlock.c:162
 get_partial_node mm/slub.c:2152 [inline]
 get_partial mm/slub.c:2257 [inline]
 ___slab_alloc+0x1aa/0x840 mm/slub.c:3028
 __slab_alloc+0x49/0x90 mm/slub.c:3120
 slab_alloc_node mm/slub.c:3211 [inline]
 slab_alloc mm/slub.c:3255 [inline]
 kmem_cache_alloc+0x138/0x260 mm/slub.c:3260
 anon_vma_alloc mm/rmap.c:93 [inline]
 __anon_vma_prepare+0xa0/0x420 mm/rmap.c:202
 do_anonymous_page mm/memory.c:4069 [inline]
 handle_pte_fault+0x1ff1/0x2770 mm/memory.c:4921
 __handle_mm_fault mm/memory.c:-1 [inline]
 do_handle_mm_fault+0x1b3b/0x1e30 mm/memory.c:5345
 handle_mm_fault include/linux/mm.h:1847 [inline]
 do_user_addr_fault+0x808/0x11c0 arch/x86/mm/fault.c:1416
 handle_page_fault arch/x86/mm/fault.c:1507 [inline]
 exc_page_fault+0x51/0xb0 arch/x86/mm/fault.c:1560
 asm_exc_page_fault+0x27/0x30 arch/x86/include/asm/idtentry.h:606
RIP: 0033:0x7f2f79970304
Code: 8d 3c 30 4c 89 de 4c 89 54 24 30 e8 66 2c 04 00 4c 8b 54 24 30 85 c0 0f 85 e1 00 00 00 48 8b 44 24 28 48 89 df 4c 89 54 24 30 <4c> 89 93 98 06 00 00 48 89 83 90 06 00 00 48 8d 83 10 03 00 00 4c
RSP: 002b:00007fff6513bb90 EFLAGS: 00010246
RAX: 00007f2f797f4000 RBX: 00007f2f798146c0 RCX: 00007f2f799b2f57
RDX: 0000000000000003 RSI: 0000000000020000 RDI: 00007f2f798146c0
RBP: 0000000000000000 R08: 00000000ffffffff R09: 0000000000000000
R10: 0000000000021000 R11: 0000000000000206 R12: 00007fff6513bce0
R13: ffffffffffffffc0 R14: 0000000000001000 R15: 0000000000000000
 </TASK>
================================================================================
general protection fault, probably for non-canonical address 0xff66b9059f672e49: 0000 [#1] PREEMPT SMP KASAN
KASAN: maybe wild-memory-access in range [0xfb35e82cfb397248-0xfb35e82cfb39724f]
CPU: 1 PID: 1015 Comm: syz.1.325 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:__pv_queued_spin_lock_slowpath+0x290/0x9b0 kernel/locking/qspinlock.c:471
Code: c8 48 c1 e8 03 42 80 3c 28 00 74 14 48 89 4c 24 20 48 8b 7c 24 20 e8 af 38 59 00 48 8b 4c 24 20 4c 03 39 4c 89 f8 48 c1 e8 03 <42> 80 3c 28 00 4d 89 fd 4c 8b 7c 24 28 74 08 4c 89 ef e8 29 39 59
RSP: 0000:ffffc90002be7640 EFLAGS: 00010802
RAX: 1f66bd059f672e49 RBX: ffff88810006c000 RCX: ffffffff85ea92d0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffffc90002be7730 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0e18e4c R12: 1ffff1103ee27159
R13: dffffc0000000000 R14: 1ffff1102000d800 R15: fb35e82cfb397249
FS:  000055558c909500(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2f79814d58 CR3: 000000010dd8c000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:585 [inline]
 queued_spin_lock_slowpath+0x47/0x50 arch/x86/include/asm/qspinlock.h:51
 queued_spin_lock include/asm-generic/qspinlock.h:85 [inline]
 do_raw_spin_lock_flags include/linux/spinlock.h:200 [inline]
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:119 [inline]
 _raw_spin_lock_irqsave+0x120/0x130 kernel/locking/spinlock.c:162
 get_partial_node mm/slub.c:2152 [inline]
 get_partial mm/slub.c:2257 [inline]
 ___slab_alloc+0x1aa/0x840 mm/slub.c:3028
 __slab_alloc+0x49/0x90 mm/slub.c:3120
 slab_alloc_node mm/slub.c:3211 [inline]
 slab_alloc mm/slub.c:3255 [inline]
 kmem_cache_alloc+0x138/0x260 mm/slub.c:3260
 anon_vma_alloc mm/rmap.c:93 [inline]
 __anon_vma_prepare+0xa0/0x420 mm/rmap.c:202
 do_anonymous_page mm/memory.c:4069 [inline]
 handle_pte_fault+0x1ff1/0x2770 mm/memory.c:4921
 __handle_mm_fault mm/memory.c:-1 [inline]
 do_handle_mm_fault+0x1b3b/0x1e30 mm/memory.c:5345
 handle_mm_fault include/linux/mm.h:1847 [inline]
 do_user_addr_fault+0x808/0x11c0 arch/x86/mm/fault.c:1416
 handle_page_fault arch/x86/mm/fault.c:1507 [inline]
 exc_page_fault+0x51/0xb0 arch/x86/mm/fault.c:1560
 asm_exc_page_fault+0x27/0x30 arch/x86/include/asm/idtentry.h:606
RIP: 0033:0x7f2f79970304
Code: 8d 3c 30 4c 89 de 4c 89 54 24 30 e8 66 2c 04 00 4c 8b 54 24 30 85 c0 0f 85 e1 00 00 00 48 8b 44 24 28 48 89 df 4c 89 54 24 30 <4c> 89 93 98 06 00 00 48 89 83 90 06 00 00 48 8d 83 10 03 00 00 4c
RSP: 002b:00007fff6513bb90 EFLAGS: 00010246
RAX: 00007f2f797f4000 RBX: 00007f2f798146c0 RCX: 00007f2f799b2f57
RDX: 0000000000000003 RSI: 0000000000020000 RDI: 00007f2f798146c0
RBP: 0000000000000000 R08: 00000000ffffffff R09: 0000000000000000
R10: 0000000000021000 R11: 0000000000000206 R12: 00007fff6513bce0
R13: ffffffffffffffc0 R14: 0000000000001000 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace e482fc289e39b9fd ]---
RIP: 0010:__pv_queued_spin_lock_slowpath+0x290/0x9b0 kernel/locking/qspinlock.c:471
Code: c8 48 c1 e8 03 42 80 3c 28 00 74 14 48 89 4c 24 20 48 8b 7c 24 20 e8 af 38 59 00 48 8b 4c 24 20 4c 03 39 4c 89 f8 48 c1 e8 03 <42> 80 3c 28 00 4d 89 fd 4c 8b 7c 24 28 74 08 4c 89 ef e8 29 39 59
RSP: 0000:ffffc90002be7640 EFLAGS: 00010802
RAX: 1f66bd059f672e49 RBX: ffff88810006c000 RCX: ffffffff85ea92d0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffffc90002be7730 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0e18e4c R12: 1ffff1103ee27159
R13: dffffc0000000000 R14: 1ffff1102000d800 R15: fb35e82cfb397249
FS:  000055558c909500(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2f79814d58 CR3: 000000010dd8c000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	c8 48 c1 e8          	enter  $0xc148,$0xe8
   4:	03 42 80             	add    -0x80(%rdx),%eax
   7:	3c 28                	cmp    $0x28,%al
   9:	00 74 14 48          	add    %dh,0x48(%rsp,%rdx,1)
   d:	89 4c 24 20          	mov    %ecx,0x20(%rsp)
  11:	48 8b 7c 24 20       	mov    0x20(%rsp),%rdi
  16:	e8 af 38 59 00       	call   0x5938ca
  1b:	48 8b 4c 24 20       	mov    0x20(%rsp),%rcx
  20:	4c 03 39             	add    (%rcx),%r15
  23:	4c 89 f8             	mov    %r15,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1) <-- trapping instruction
  2f:	4d 89 fd             	mov    %r15,%r13
  32:	4c 8b 7c 24 28       	mov    0x28(%rsp),%r15
  37:	74 08                	je     0x41
  39:	4c 89 ef             	mov    %r13,%rdi
  3c:	e8                   	.byte 0xe8
  3d:	29 39                	sub    %edi,(%rcx)
  3f:	59                   	pop    %rcx

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/23 06:35 android13-5.15-lts 5bfe2b8c1439 5207b90e .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-5-15 UBSAN: array-index-out-of-bounds in __anon_vma_prepare
* Struck through repros no longer work on HEAD.