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

Status: premoderation: reported syz repro on 2026/10/31 19:47
Reported-by: syzbot+087a8b29b67d62c1b9cc@syzkaller.appspotmail.com
First crash: 6d04h, last: 6d04h

Sample crash report:
================================================================================
UBSAN: array-index-out-of-bounds in kernel/locking/qspinlock.c:131:9
index 5319 is out of range for type 'unsigned long[8]'
CPU: 0 PID: 6233 Comm: syz-executor Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x24 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 dump_stack+0x15/0x24 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:131 [inline]
 __pv_queued_spin_lock_slowpath+0x9ea/0xc40 kernel/locking/qspinlock.c:471
 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [inline]
 queued_spin_lock_slowpath+0x47/0x50 arch/x86/include/asm/qspinlock.h:51
 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
 do_raw_spin_lock include/linux/spinlock.h:187 [inline]
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
 _raw_spin_lock_irqsave+0x120/0x130 kernel/locking/spinlock.c:162
 get_partial_node mm/slub.c:2238 [inline]
 get_partial mm/slub.c:2353 [inline]
 ___slab_alloc+0x410/0xb70 mm/slub.c:3154
 __slab_alloc+0x5e/0xa0 mm/slub.c:3263
 slab_alloc_node mm/slub.c:3348 [inline]
 slab_alloc mm/slub.c:3392 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3399 [inline]
 kmem_cache_alloc+0x1a8/0x320 mm/slub.c:3408
 copy_sighand+0x54/0x220 kernel/fork.c:1786
 copy_process+0x127b/0x3500 kernel/fork.c:2481
 kernel_clone+0x22f/0x7f0 kernel/fork.c:2903
 __do_sys_clone kernel/fork.c:3046 [inline]
 __se_sys_clone kernel/fork.c:3030 [inline]
 __x64_sys_clone+0x193/0x200 kernel/fork.c:3030
 x64_sys_call+0x990/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:57
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f92761c7fd2
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:00007ffee5c14f20 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007ffee5c14f20 RCX: 00007f92761c7fd2
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 00007ffee5c150ac R08: 0000000000000000 R09: 0000000000000001
R10: 00005555893397d0 R11: 0000000000000246 R12: 0000000000000000
R13: 00000000000927c0 R14: 000000000000d17b R15: 00007ffee5c15100
 </TASK>
================================================================================
general protection fault, probably for non-canonical address 0xff67fc9e9f68722f: 0000 [#1] PREEMPT SMP KASAN
KASAN: maybe wild-memory-access in range [0xfb4004f4fb439178-0xfb4004f4fb43917f]
CPU: 0 PID: 6233 Comm: syz-executor Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
RIP: 0010:__pv_queued_spin_lock_slowpath+0x2c8/0xc40 kernel/locking/qspinlock.c:474
Code: 86 4c 89 f8 48 c1 e8 03 80 3c 10 00 74 12 4c 89 ff e8 1c de b4 fc 48 ba 00 00 00 00 00 fc ff df 4d 03 2f 4c 89 e8 48 c1 e8 03 <80> 3c 10 00 4d 89 ef 4c 8b 6c 24 30 74 12 4c 89 ff e8 e2 de b4 fc
RSP: 0018:ffffc90000b8f780 EFLAGS: 00010802
RAX: 1f68009e9f68722f RBX: ffff88810006c000 RCX: ffff88811818e540
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffffc90000b8f870 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0f6ee4c R12: 1ffff1103edc71c9
R13: fb4004f4fb43917b R14: 1ffff1102000d800 R15: ffffffff866e1fd8
FS:  0000555589339500(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9276f556c8 CR3: 0000000111ed0000 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:591 [inline]
 queued_spin_lock_slowpath+0x47/0x50 arch/x86/include/asm/qspinlock.h:51
 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
 do_raw_spin_lock include/linux/spinlock.h:187 [inline]
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
 _raw_spin_lock_irqsave+0x120/0x130 kernel/locking/spinlock.c:162
 get_partial_node mm/slub.c:2238 [inline]
 get_partial mm/slub.c:2353 [inline]
 ___slab_alloc+0x410/0xb70 mm/slub.c:3154
 __slab_alloc+0x5e/0xa0 mm/slub.c:3263
 slab_alloc_node mm/slub.c:3348 [inline]
 slab_alloc mm/slub.c:3392 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3399 [inline]
 kmem_cache_alloc+0x1a8/0x320 mm/slub.c:3408
 copy_sighand+0x54/0x220 kernel/fork.c:1786
 copy_process+0x127b/0x3500 kernel/fork.c:2481
 kernel_clone+0x22f/0x7f0 kernel/fork.c:2903
 __do_sys_clone kernel/fork.c:3046 [inline]
 __se_sys_clone kernel/fork.c:3030 [inline]
 __x64_sys_clone+0x193/0x200 kernel/fork.c:3030
 x64_sys_call+0x990/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:57
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f92761c7fd2
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:00007ffee5c14f20 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007ffee5c14f20 RCX: 00007f92761c7fd2
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 00007ffee5c150ac R08: 0000000000000000 R09: 0000000000000001
R10: 00005555893397d0 R11: 0000000000000246 R12: 0000000000000000
R13: 00000000000927c0 R14: 000000000000d17b R15: 00007ffee5c15100
----------------
Code disassembly (best guess):
   0:	86 4c 89 f8          	xchg   %cl,-0x8(%rcx,%rcx,4)
   4:	48 c1 e8 03          	shr    $0x3,%rax
   8:	80 3c 10 00          	cmpb   $0x0,(%rax,%rdx,1)
   c:	74 12                	je     0x20
   e:	4c 89 ff             	mov    %r15,%rdi
  11:	e8 1c de b4 fc       	call   0xfcb4de32
  16:	48 ba 00 00 00 00 00 	movabs $0xdffffc0000000000,%rdx
  1d:	fc ff df
  20:	4d 03 2f             	add    (%r15),%r13
  23:	4c 89 e8             	mov    %r13,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	80 3c 10 00          	cmpb   $0x0,(%rax,%rdx,1) <-- trapping instruction
  2e:	4d 89 ef             	mov    %r13,%r15
  31:	4c 8b 6c 24 30       	mov    0x30(%rsp),%r13
  36:	74 12                	je     0x4a
  38:	4c 89 ff             	mov    %r15,%rdi
  3b:	e8 e2 de b4 fc       	call   0xfcb4df22

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/31 19:46 android14-6.1 eff17ca626fd 2041d3f8 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-1 UBSAN: array-index-out-of-bounds in copy_sighand
* Struck through repros no longer work on HEAD.