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

Status: premoderation: reported syz repro on 2026/10/18 11:49
Reported-by: syzbot+02d4be64683f7c64c43d@syzkaller.appspotmail.com
First crash: 14d, last: 14d

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: 0 PID: 368 Comm: syz-executor 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
 kmem_cache_zalloc include/linux/slab.h:740 [inline]
 copy_signal+0x53/0x5f0 kernel/fork.c:1721
 copy_process+0x1104/0x3230 kernel/fork.c:2352
 kernel_clone+0x233/0x960 kernel/fork.c:2744
 __do_sys_clone kernel/fork.c:2870 [inline]
 __se_sys_clone kernel/fork.c:2854 [inline]
 __x64_sys_clone+0x198/0x210 kernel/fork.c:2854
 x64_sys_call+0x41f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:57
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f58ed863fd2
Code: 89 e7 e8 71 8b f7 ff 45 31 c0 31 d2 31 f6 64 48 8b 04 25 10 00 00 00 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 66 89 c5 85 c0 75 3b 64 48 8b 04 25 10 00 00
RSP: 002b:00007ffc052577e0 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007ffc052577e0 RCX: 00007f58ed863fd2
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 00007ffc0525796c R08: 0000000000000000 R09: 0000000000000001
R10: 0000555565b0c7d0 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f58eda8d3e0 R14: 000000000000e8ec R15: 00007ffc052579c0
 </TASK>
================================================================================
general protection fault, probably for non-canonical address 0xff66ba379f672f73: 0000 [#1] PREEMPT SMP KASAN
KASAN: maybe wild-memory-access in range [0xfb35f1bcfb397b98-0xfb35f1bcfb397b9f]
CPU: 0 PID: 368 Comm: syz-executor 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 2f 4b 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 a9 4b 59
RSP: 0018:ffffc90000a777c0 EFLAGS: 00010802
RAX: 1f66be379f672f73 RBX: ffff88810006c000 RCX: ffffffff85ea92d0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffffc90000a778b0 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0e1904c R12: 1ffff1103ee07151
R13: dffffc0000000000 R14: 1ffff1102000d800 R15: fb35f1bcfb397b99
FS:  0000555565b0c500(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f58ee5f26c8 CR3: 000000010ddc9000 CR4: 00000000003506b0
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
 kmem_cache_zalloc include/linux/slab.h:740 [inline]
 copy_signal+0x53/0x5f0 kernel/fork.c:1721
 copy_process+0x1104/0x3230 kernel/fork.c:2352
 kernel_clone+0x233/0x960 kernel/fork.c:2744
 __do_sys_clone kernel/fork.c:2870 [inline]
 __se_sys_clone kernel/fork.c:2854 [inline]
 __x64_sys_clone+0x198/0x210 kernel/fork.c:2854
 x64_sys_call+0x41f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:57
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f58ed863fd2
Code: 89 e7 e8 71 8b f7 ff 45 31 c0 31 d2 31 f6 64 48 8b 04 25 10 00 00 00 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 66 89 c5 85 c0 75 3b 64 48 8b 04 25 10 00 00
RSP: 002b:00007ffc052577e0 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007ffc052577e0 RCX: 00007f58ed863fd2
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 00007ffc0525796c R08: 0000000000000000 R09: 0000000000000001
R10: 0000555565b0c7d0 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f58eda8d3e0 R14: 000000000000e8ec R15: 00007ffc052579c0
 </TASK>
Modules linked in:
---[ end trace c6809f3901e964da ]---
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 2f 4b 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 a9 4b 59
RSP: 0018:ffffc90000a777c0 EFLAGS: 00010802
RAX: 1f66be379f672f73 RBX: ffff88810006c000 RCX: ffffffff85ea92d0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffffc90000a778b0 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0e1904c R12: 1ffff1103ee07151
R13: dffffc0000000000 R14: 1ffff1102000d800 R15: fb35f1bcfb397b99
FS:  0000555565b0c500(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f58ee5f26c8 CR3: 000000010ddc9000 CR4: 00000000003506b0
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 2f 4b 59 00       	call   0x594b4a
  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:	a9                   	.byte 0xa9
  3e:	4b 59                	rex.WXB pop %r9

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/18 11:48 android13-5.15-lts ff23d765b06f 432c0077 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-5-15 UBSAN: array-index-out-of-bounds in copy_signal
* Struck through repros no longer work on HEAD.