syzbot


KASAN: slab-out-of-bounds Read in mcp2221_raw_event

Status: upstream: reported C repro on 2026/06/03 13:39
Reported-by: syzbot+4823889ef9f2f6f7ea07@syzkaller.appspotmail.com
First crash: 5d21h, last: 3d22h
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in mcp2221_raw_event input usb 19 C 1144 243d 549d 29/29 fixed on 2025/10/09 01:15
linux-6.6 KASAN: use-after-free Read in mcp2221_raw_event 19 15 196d 353d 0/2 auto-obsoleted due to no activity on 2026/03/04 14:46
upstream KASAN: slab-out-of-bounds Read in mcp2221_raw_event (2) usb input prio:high 19 C error 684 1d14h 239d 0/29 upstream: reported C repro on 2025/10/13 04:00

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1062/0x1240 drivers/hid/hid-mcp2221.c:858
Read of size 1 at addr ffff88805f87ffff by task syz-executor/5891

CPU: 0 PID: 5891 Comm: syz-executor Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Call Trace:
 <IRQ>
 dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:364 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:468
 kasan_report+0x117/0x150 mm/kasan/report.c:581
 mcp2221_raw_event+0x1062/0x1240 drivers/hid/hid-mcp2221.c:858
 hid_input_report+0x400/0x510 drivers/hid/hid-core.c:2103
 hid_irq_in+0x479/0x6d0 drivers/hid/usbhid/hid-core.c:284
 __usb_hcd_giveback_urb+0x35f/0x520 drivers/usb/core/hcd.c:1650
 dummy_timer+0x8de/0x3320 drivers/usb/gadget/udc/dummy_hcd.c:2003
 __run_hrtimer kernel/time/hrtimer.c:1754 [inline]
 __hrtimer_run_queues+0x520/0xc40 kernel/time/hrtimer.c:1818
 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1835
 handle_softirqs+0x280/0x820 kernel/softirq.c:578
 __do_softirq kernel/softirq.c:612 [inline]
 invoke_softirq kernel/softirq.c:452 [inline]
 __irq_exit_rcu+0xd3/0x190 kernel/softirq.c:661
 irq_exit_rcu+0x9/0x20 kernel/softirq.c:673
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline]
 sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687
RIP: 0010:unwind_get_return_address+0x5/0xc0 arch/x86/kernel/unwind_orc.c:365
Code: d9 80 e1 07 80 c1 03 38 c1 0f 8c 49 ff ff ff 48 89 df e8 7e 35 a4 00 e9 3c ff ff ff e8 64 24 4d 09 0f 1f 40 00 f3 0f 1e fa 55 <41> 57 41 56 53 48 89 fb 49 be 00 00 00 00 00 fc ff df e8 54 f5 4b
RSP: 0018:ffffc9000468f298 EFLAGS: 00000293
RAX: ffffffff8132a5a2 RBX: ffffc9000468f360 RCX: ffff888022a78000
RDX: 0000000000000000 RSI: 0000000080000000 RDI: ffffc9000468f2a8
RBP: ffffc9000468f330 R08: ffff888022a78000 R09: 0000000000000003
R10: 0000000000000004 R11: 0000000000000000 R12: ffffffff8a88631a
R13: 1ffff1100454f0ae R14: ffffffff8175c750 R15: ffffc9000468f2a8
 arch_stack_walk+0x11d/0x190 arch/x86/kernel/stacktrace.c:26
 stack_trace_save+0xaa/0x100 kernel/stacktrace.c:122
 save_stack+0x125/0x230 mm/page_owner.c:128
 __reset_page_owner+0x4e/0x190 mm/page_owner.c:149
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1181 [inline]
 free_unref_page_prepare+0x7b2/0x8c0 mm/page_alloc.c:2365
 free_unref_page_list+0xbe/0x860 mm/page_alloc.c:2504
 release_pages+0x1f7a/0x2200 mm/swap.c:1022
 __folio_batch_release+0x71/0xe0 mm/swap.c:1042
 folio_batch_release include/linux/pagevec.h:83 [inline]
 shmem_undo_range+0x630/0x1b20 mm/shmem.c:1026
 shmem_truncate_range mm/shmem.c:1135 [inline]
 shmem_evict_inode+0x245/0x9e0 mm/shmem.c:1264
 evict+0x4ca/0x8d0 fs/inode.c:705
 __dentry_kill+0x431/0x650 fs/dcache.c:611
 dentry_kill+0xb8/0x290 fs/dcache.c:-1
 dput+0xfe/0x1e0 fs/dcache.c:918
 __fput+0x5e5/0x970 fs/file_table.c:392
 task_work_run+0x1d4/0x260 kernel/task_work.c:245
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177
 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
 syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302
 do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f083b19e097
Code: a2 c7 05 5c 06 25 00 00 00 00 00 eb 96 e8 e1 12 00 00 90 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffcccb63cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 00007f083b2321ca RCX: 00007f083b19e097
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffcccb63db0
RBP: 00007ffcccb63db0 R08: 00007ffcccb64db0 R09: 00000000ffffffff
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffcccb64e40
R13: 00007f083b2321ca R14: 0000000000014ed6 R15: 00007ffcccb64e80
 </TASK>

Allocated by task 77:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
 ____kasan_kmalloc mm/kasan/common.c:375 [inline]
 __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384
 kasan_kmalloc include/linux/kasan.h:198 [inline]
 __do_kmalloc_node mm/slab_common.c:1007 [inline]
 __kmalloc_node_track_caller+0xb2/0x230 mm/slab_common.c:1027
 kmalloc_reserve+0x116/0x240 net/core/skbuff.c:584
 __alloc_skb+0x138/0x2c0 net/core/skbuff.c:653
 alloc_skb include/linux/skbuff.h:1316 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:748 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:805 [inline]
 nsim_dev_trap_report_work+0x293/0xb10 drivers/net/netdevsim/dev.c:851
 process_one_work kernel/workqueue.c:2653 [inline]
 process_scheduled_works+0xa5d/0x15d0 kernel/workqueue.c:2730
 worker_thread+0xa55/0xfc0 kernel/workqueue.c:2811
 kthread+0x2fa/0x390 kernel/kthread.c:388
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

Freed by task 77:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
 kasan_save_free_info+0x2e/0x50 mm/kasan/generic.c:522
 ____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:237
 kasan_slab_free include/linux/kasan.h:164 [inline]
 slab_free_hook mm/slub.c:1811 [inline]
 slab_free_freelist_hook+0x130/0x1a0 mm/slub.c:1837
 slab_free mm/slub.c:3830 [inline]
 __kmem_cache_free+0xba/0x1e0 mm/slub.c:3843
 skb_kfree_head net/core/skbuff.c:946 [inline]
 skb_free_head net/core/skbuff.c:958 [inline]
 skb_release_data+0x5dc/0x7b0 net/core/skbuff.c:988
 skb_release_all net/core/skbuff.c:1054 [inline]
 __kfree_skb net/core/skbuff.c:1068 [inline]
 consume_skb+0xb2/0x110 net/core/skbuff.c:1284
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:821 [inline]
 nsim_dev_trap_report_work+0x77e/0xb10 drivers/net/netdevsim/dev.c:851
 process_one_work kernel/workqueue.c:2653 [inline]
 process_scheduled_works+0xa5d/0x15d0 kernel/workqueue.c:2730
 worker_thread+0xa55/0xfc0 kernel/workqueue.c:2811
 kthread+0x2fa/0x390 kernel/kthread.c:388
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

The buggy address belongs to the object at ffff88805f87e000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 4095 bytes to the right of
 allocated 4096-byte region [ffff88805f87e000, ffff88805f87f000)

The buggy address belongs to the physical page:
page:ffffea00017e1e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5f878
head:ffffea00017e1e00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888017c42140 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 77, tgid 77 (kworker/u4:5), ts 84487198921, free_ts 84431385920
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1581
 prep_new_page mm/page_alloc.c:1588 [inline]
 get_page_from_freelist+0x1951/0x19e0 mm/page_alloc.c:3220
 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4500
 alloc_slab_page+0x5d/0x160 mm/slub.c:1881
 allocate_slab mm/slub.c:2028 [inline]
 new_slab+0x87/0x2d0 mm/slub.c:2081
 ___slab_alloc+0xc5d/0x12f0 mm/slub.c:3253
 __slab_alloc mm/slub.c:3339 [inline]
 __slab_alloc_node mm/slub.c:3392 [inline]
 slab_alloc_node mm/slub.c:3485 [inline]
 __kmem_cache_alloc_node+0x19e/0x250 mm/slub.c:3534
 __do_kmalloc_node mm/slab_common.c:1006 [inline]
 __kmalloc_node_track_caller+0xa2/0x230 mm/slab_common.c:1027
 kmalloc_reserve+0x116/0x240 net/core/skbuff.c:584
 __alloc_skb+0x138/0x2c0 net/core/skbuff.c:653
 alloc_skb include/linux/skbuff.h:1316 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:748 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:805 [inline]
 nsim_dev_trap_report_work+0x293/0xb10 drivers/net/netdevsim/dev.c:851
 process_one_work kernel/workqueue.c:2653 [inline]
 process_scheduled_works+0xa5d/0x15d0 kernel/workqueue.c:2730
 worker_thread+0xa55/0xfc0 kernel/workqueue.c:2811
 kthread+0x2fa/0x390 kernel/kthread.c:388
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1181 [inline]
 free_unref_page_prepare+0x7b2/0x8c0 mm/page_alloc.c:2365
 free_unref_page+0x32/0x2e0 mm/page_alloc.c:2458
 discard_slab mm/slub.c:2127 [inline]
 __unfreeze_partials+0x1cf/0x210 mm/slub.c:2667
 put_cpu_partial+0x17c/0x250 mm/slub.c:2743
 __slab_free+0x319/0x400 mm/slub.c:3700
 qlink_free mm/kasan/quarantine.c:166 [inline]
 qlist_free_all+0x75/0xd0 mm/kasan/quarantine.c:185
 kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292
 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:306
 kasan_slab_alloc include/linux/kasan.h:188 [inline]
 slab_post_alloc_hook+0x6e/0x4b0 mm/slab.h:767
 slab_alloc_node mm/slub.c:3495 [inline]
 slab_alloc mm/slub.c:3503 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3510 [inline]
 kmem_cache_alloc+0x11a/0x2d0 mm/slub.c:3519
 vma_lock_alloc kernel/fork.c:461 [inline]
 vm_area_dup+0x61/0x270 kernel/fork.c:514
 __split_vma+0x1b4/0xc60 mm/mmap.c:2373
 do_vmi_align_munmap+0x3d0/0x16d0 mm/mmap.c:2514
 do_vmi_munmap+0x252/0x2d0 mm/mmap.c:2660
 __vm_munmap+0x1a2/0x3c0 mm/mmap.c:2961
 __do_sys_munmap mm/mmap.c:2978 [inline]
 __se_sys_munmap mm/mmap.c:2975 [inline]
 __x64_sys_munmap+0x60/0x70 mm/mmap.c:2975

Memory state around the buggy address:
 ffff88805f87fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88805f87ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88805f87ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                                ^
 ffff88805f880000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88805f880080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	80 e1 07             	and    $0x7,%cl
   3:	80 c1 03             	add    $0x3,%cl
   6:	38 c1                	cmp    %al,%cl
   8:	0f 8c 49 ff ff ff    	jl     0xffffff57
   e:	48 89 df             	mov    %rbx,%rdi
  11:	e8 7e 35 a4 00       	call   0xa43594
  16:	e9 3c ff ff ff       	jmp    0xffffff57
  1b:	e8 64 24 4d 09       	call   0x94d2484
  20:	0f 1f 40 00          	nopl   0x0(%rax)
  24:	f3 0f 1e fa          	endbr64
  28:	55                   	push   %rbp
* 29:	41 57                	push   %r15 <-- trapping instruction
  2b:	41 56                	push   %r14
  2d:	53                   	push   %rbx
  2e:	48 89 fb             	mov    %rdi,%rbx
  31:	49 be 00 00 00 00 00 	movabs $0xdffffc0000000000,%r14
  38:	fc ff df
  3b:	e8                   	.byte 0xe8
  3c:	54                   	push   %rsp
  3d:	f5                   	cmc
  3e:	4b                   	rex.WXB

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/06/05 02:57 linux-6.6.y 924b4a879cbb 197909be .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in mcp2221_raw_event
2026/06/05 12:18 linux-6.6.y 924b4a879cbb 48b6c3fa .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in mcp2221_raw_event
2026/06/03 13:38 linux-6.6.y 924b4a879cbb 234057e5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in mcp2221_raw_event
* Struck through repros no longer work on HEAD.