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

Status: premoderation: reported syz repro on 2026/10/22 21:07
Reported-by: syzbot+8cb6f2d80658c76cdaae@syzkaller.appspotmail.com
First crash: 2d16h, last: 2d16h
▶ ▼ Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 BUG: unable to handle kernel paging request in ___cache_free 8 1 1924d 1924d 0/1 auto-closed as invalid on 2021/11/15 22:27

Sample crash report:
================================================================================
UBSAN: array-index-out-of-bounds in kernel/locking/qspinlock.c:131:9
index 6482 is out of range for type 'unsigned long[8]'
CPU: 1 PID: 724 Comm: syz.2.192 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/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
 __slab_free+0x142/0x280 mm/slub.c:3566
 do_slab_free mm/slub.c:3666 [inline]
 ___cache_free+0xbf/0xd0 mm/slub.c:3722
 qlink_free mm/kasan/quarantine.c:168 [inline]
 qlist_free_all+0xc6/0x140 mm/kasan/quarantine.c:187
 kasan_quarantine_reduce+0x14a/0x170 mm/kasan/quarantine.c:294
 __kasan_slab_alloc+0x24/0x80 mm/kasan/common.c:311
 kasan_slab_alloc include/linux/kasan.h:202 [inline]
 slab_post_alloc_hook+0x4f/0x2d0 mm/slab.h:768
 slab_alloc_node mm/slub.c:3382 [inline]
 slab_alloc mm/slub.c:3392 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3399 [inline]
 kmem_cache_alloc+0x166/0x320 mm/slub.c:3408
 kmem_cache_zalloc include/linux/slab.h:689 [inline]
 jbd2_alloc_handle include/linux/jbd2.h:1602 [inline]
 new_handle fs/jbd2/transaction.c:476 [inline]
 jbd2__journal_start+0x13d/0x6e0 fs/jbd2/transaction.c:503
 __ext4_journal_start_sb+0x242/0x4a0 fs/ext4/ext4_jbd2.c:105
 __ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline]
 ext4_dirty_inode+0x8f/0x100 fs/ext4/inode.c:6155
 __mark_inode_dirty+0x1fd/0x9c0 fs/fs-writeback.c:2455
 generic_update_time fs/inode.c:1957 [inline]
 inode_update_time fs/inode.c:1970 [inline]
 __file_update_time+0x245/0x270 fs/inode.c:2158
 file_update_time+0x2f3/0x370 fs/inode.c:2189
 ext4_page_mkwrite+0x2cf/0x1340 fs/ext4/inode.c:6276
 do_page_mkwrite mm/memory.c:3039 [inline]
 do_shared_fault mm/memory.c:4823 [inline]
 do_fault+0xd5b/0x1e30 mm/memory.c:4891
 handle_pte_fault mm/memory.c:5183 [inline]
 __handle_mm_fault mm/memory.c:5325 [inline]
 handle_mm_fault+0x1363/0x26b0 mm/memory.c:5465
 do_user_addr_fault+0x900/0x1030 arch/x86/mm/fault.c:1321
 handle_page_fault arch/x86/mm/fault.c:1464 [inline]
 exc_page_fault+0x51/0xb0 arch/x86/mm/fault.c:1517
 asm_exc_page_fault+0x27/0x30 arch/x86/include/asm/idtentry.h:608
RIP: 0033:0x7f51be86cea3
Code: 80 00 00 00 8b b4 24 c0 00 00 00 89 30 e9 a0 fa ff ff 48 89 c2 48 8d 35 f3 a9 1c 00 48 8d 3d a9 aa 1c 00 31 c0 e8 3d 76 fe ff <89> 32 e9 58 ef ff ff 48 8d 05 57 a8 37 00 48 8d 3d 68 88 ee 00 c6
RSP: 002b:00007ffdaa959af0 EFLAGS: 00010246
RAX: 000000000003fde8 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000001b33c24000 RSI: 0000000000040000 RDI: 00007f51bebe7708
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 00007ffdaa959d80
 </TASK>
================================================================================
general protection fault, probably for non-canonical address 0xdffffc000024baff: 0000 [#1] PREEMPT SMP KASAN
KASAN: probably user-memory-access in range [0x000000000125d7f8-0x000000000125d7ff]
CPU: 1 PID: 724 Comm: syz.2.192 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/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 5c e8 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 22 e9 b4 fc
RSP: 0000:ffffc90000977440 EFLAGS: 00010006
RAX: 000000000024baff RBX: ffff88810006c000 RCX: ffff888119160000
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffffc90000977530 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0f6ee4c R12: 1ffff1103ede71c9
R13: 000000000125d7f8 R14: 1ffff1102000d800 R15: ffffffff866e4430
FS:  00005555648f7500(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b33c24000 CR3: 000000012b791000 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: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
 __slab_free+0x142/0x280 mm/slub.c:3566
 do_slab_free mm/slub.c:3666 [inline]
 ___cache_free+0xbf/0xd0 mm/slub.c:3722
 qlink_free mm/kasan/quarantine.c:168 [inline]
 qlist_free_all+0xc6/0x140 mm/kasan/quarantine.c:187
 kasan_quarantine_reduce+0x14a/0x170 mm/kasan/quarantine.c:294
 __kasan_slab_alloc+0x24/0x80 mm/kasan/common.c:311
 kasan_slab_alloc include/linux/kasan.h:202 [inline]
 slab_post_alloc_hook+0x4f/0x2d0 mm/slab.h:768
 slab_alloc_node mm/slub.c:3382 [inline]
 slab_alloc mm/slub.c:3392 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3399 [inline]
 kmem_cache_alloc+0x166/0x320 mm/slub.c:3408
 kmem_cache_zalloc include/linux/slab.h:689 [inline]
 jbd2_alloc_handle include/linux/jbd2.h:1602 [inline]
 new_handle fs/jbd2/transaction.c:476 [inline]
 jbd2__journal_start+0x13d/0x6e0 fs/jbd2/transaction.c:503
 __ext4_journal_start_sb+0x242/0x4a0 fs/ext4/ext4_jbd2.c:105
 __ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline]
 ext4_dirty_inode+0x8f/0x100 fs/ext4/inode.c:6155
 __mark_inode_dirty+0x1fd/0x9c0 fs/fs-writeback.c:2455
 generic_update_time fs/inode.c:1957 [inline]
 inode_update_time fs/inode.c:1970 [inline]
 __file_update_time+0x245/0x270 fs/inode.c:2158
 file_update_time+0x2f3/0x370 fs/inode.c:2189
 ext4_page_mkwrite+0x2cf/0x1340 fs/ext4/inode.c:6276
 do_page_mkwrite mm/memory.c:3039 [inline]
 do_shared_fault mm/memory.c:4823 [inline]
 do_fault+0xd5b/0x1e30 mm/memory.c:4891
 handle_pte_fault mm/memory.c:5183 [inline]
 __handle_mm_fault mm/memory.c:5325 [inline]
 handle_mm_fault+0x1363/0x26b0 mm/memory.c:5465
 do_user_addr_fault+0x900/0x1030 arch/x86/mm/fault.c:1321
 handle_page_fault arch/x86/mm/fault.c:1464 [inline]
 exc_page_fault+0x51/0xb0 arch/x86/mm/fault.c:1517
 asm_exc_page_fault+0x27/0x30 arch/x86/include/asm/idtentry.h:608
RIP: 0033:0x7f51be86cea3
Code: 80 00 00 00 8b b4 24 c0 00 00 00 89 30 e9 a0 fa ff ff 48 89 c2 48 8d 35 f3 a9 1c 00 48 8d 3d a9 aa 1c 00 31 c0 e8 3d 76 fe ff <89> 32 e9 58 ef ff ff 48 8d 05 57 a8 37 00 48 8d 3d 68 88 ee 00 c6
RSP: 002b:00007ffdaa959af0 EFLAGS: 00010246
RAX: 000000000003fde8 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000001b33c24000 RSI: 0000000000040000 RDI: 00007f51bebe7708
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 00007ffdaa959d80
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
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 5c e8 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 22 e9 b4 fc
RSP: 0000:ffffc90000977440 EFLAGS: 00010006
RAX: 000000000024baff RBX: ffff88810006c000 RCX: ffff888119160000
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffffc90000977530 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0f6ee4c R12: 1ffff1103ede71c9
R13: 000000000125d7f8 R14: 1ffff1102000d800 R15: ffffffff866e4430
FS:  00005555648f7500(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b33c24000 CR3: 000000012b791000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
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 5c e8 b4 fc       	call   0xfcb4e872
  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 22 e9 b4 fc       	call   0xfcb4e962

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