==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x101c/0x1090 drivers/hid/hid-mcp2221.c:964
Read of size 1 at addr ffff888120ab3fff by task syz.1.2109/12629
CPU: 1 UID: 0 PID: 12629 Comm: syz.1.2109 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report+0xdf/0x1d0 mm/kasan/report.c:595
mcp2221_raw_event+0x101c/0x1090 drivers/hid/hid-mcp2221.c:964
__hid_input_report.constprop.0+0x319/0x470 drivers/hid/hid-core.c:2161
hid_irq_in+0x55d/0x710 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x38d/0x610 drivers/usb/core/hcd.c:1657
usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741
dummy_timer+0xda1/0x36c0 drivers/usb/gadget/udc/dummy_hcd.c:2005
__run_hrtimer kernel/time/hrtimer.c:1930 [inline]
__hrtimer_run_queues+0x470/0xa00 kernel/time/hrtimer.c:1994
hrtimer_run_softirq+0x17d/0x2c0 kernel/time/hrtimer.c:2011
handle_softirqs+0x1dd/0x9e0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x160/0x210 kernel/softirq.c:735
irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1061
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:179 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:198
Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 96 a8 1e fa 48 89 df e8 6e f8 1e fa f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 01 00 00 00 e8 45 30 12 fa 65 8b 05 2e 0a 87 05 85 c0 74 16 5b
RSP: 0018:ffffc90015f57b18 EFLAGS: 00000246
RAX: 0000000000000002 RBX: ffffffff940be188 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff890ca24b RDI: ffffffff87b08200
RBP: 0000000000000206 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 1ffff92002beaf6a
R13: ffffc90015f57cb0 R14: 0000000000000000 R15: ffffffff940be188
__debug_object_init+0x2de/0x3d0 lib/debugobjects.c:782
debug_hrtimer_init_on_stack kernel/time/hrtimer.c:480 [inline]
debug_setup_on_stack kernel/time/hrtimer.c:522 [inline]
hrtimer_setup_sleeper_on_stack+0x24/0x80 kernel/time/hrtimer.c:2260
futex_setup_timer+0x4a/0xf0 kernel/futex/core.c:469
futex_wait+0xcb/0x370 kernel/futex/waitwake.c:716
do_futex+0x1ef/0x350 kernel/futex/syscalls.c:130
__do_sys_futex kernel/futex/syscalls.c:207 [inline]
__se_sys_futex kernel/futex/syscalls.c:188 [inline]
__x64_sys_futex+0x34f/0x4d0 kernel/futex/syscalls.c:188
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0x7f0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f9aad64ce59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffedb6379c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 000000000011279a RCX: 00007f9aad64ce59
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f9aad8c5fac
RBP: 000000000000015e R08: 00007f9aae405000 R09: 0000000000000000
R10: 00007ffedb637ad0 R11: 0000000000000246 R12: 00007ffedb637af0
R13: 00007f9aad8c5fac R14: 00000000001128f8 R15: 00007ffedb637ad0
Allocated by task 2848:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__do_kmalloc_node mm/slub.c:5296 [inline]
__kmalloc_node_track_caller_noprof+0x306/0x800 mm/slub.c:5408
kmalloc_reserve+0xe8/0x350 net/core/skbuff.c:635
__alloc_skb+0x185/0x710 net/core/skbuff.c:713
alloc_skb include/linux/skbuff.h:1385 [inline]
alloc_skb_with_frags+0xdd/0x760 net/core/skbuff.c:6766
sock_alloc_send_pskb+0x801/0x980 net/core/sock.c:2998
unix_dgram_sendmsg+0x3c7/0x1810 net/unix/af_unix.c:2141
sock_sendmsg_nosec net/socket.c:787 [inline]
__sock_sendmsg net/socket.c:802 [inline]
__sys_sendto+0x468/0x4b0 net/socket.c:2265
__do_sys_sendto net/socket.c:2272 [inline]
__se_sys_sendto net/socket.c:2268 [inline]
__x64_sys_sendto+0xe0/0x1c0 net/socket.c:2268
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0x7f0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 2840:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x43/0x70 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2689 [inline]
slab_free mm/slub.c:6251 [inline]
kfree+0x204/0x650 mm/slub.c:6566
skb_kfree_head net/core/skbuff.c:1075 [inline]
skb_free_head+0xb9/0x160 net/core/skbuff.c:1087
skb_release_data+0x6c5/0x8e0 net/core/skbuff.c:1114
skb_release_all net/core/skbuff.c:1189 [inline]
__kfree_skb net/core/skbuff.c:1203 [inline]
consume_skb net/core/skbuff.c:1436 [inline]
consume_skb+0xc4/0x110 net/core/skbuff.c:1430
__unix_dgram_recvmsg+0x754/0xc30 net/unix/af_unix.c:2669
unix_dgram_recvmsg+0xcd/0x100 net/unix/af_unix.c:2686
sock_recvmsg_nosec net/socket.c:1137 [inline]
sock_recvmsg+0x1a4/0x1f0 net/socket.c:1159
sock_read_iter+0x2c6/0x3c0 net/socket.c:1229
new_sync_read fs/read_write.c:493 [inline]
vfs_read+0x957/0xb30 fs/read_write.c:574
ksys_read+0x1f8/0x250 fs/read_write.c:717
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0x7f0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff888120ab3c00
which belongs to the cache kmalloc-cg-512 of size 512
The buggy address is located 511 bytes to the right of
allocated 512-byte region [ffff888120ab3c00, ffff888120ab3e00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x120ab0
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888120ab0211
flags: 0x200000000000040(head|node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000040 ffff88810005d140 dead000000000100 dead000000000122
raw: 0000000000000000 0000040000100010 00000000f5000000 ffff888120ab0211
head: 0200000000000040 ffff88810005d140 dead000000000100 dead000000000122
head: 0000000000000000 0000040000100010 00000000f5000000 ffff888120ab0211
head: 0200000000000002 ffffffffffffff01 00000000ffffffff 00000000ffffffff
head: ffff888100000000 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 2848, tgid 2848 (klogd), ts 1055886916673, free_ts 1054832152660
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1853
prep_new_page mm/page_alloc.c:1861 [inline]
get_page_from_freelist+0x20a5/0x3850 mm/page_alloc.c:3941
__alloc_frozen_pages_noprof+0x273/0x28a0 mm/page_alloc.c:5221
alloc_slab_page mm/slub.c:3278 [inline]
allocate_slab mm/slub.c:3467 [inline]
new_slab+0xa6/0x6b0 mm/slub.c:3525
refill_objects+0x277/0x420 mm/slub.c:7272
refill_sheaf mm/slub.c:2816 [inline]
__pcs_replace_empty_main+0x375/0x650 mm/slub.c:4652
alloc_from_pcs mm/slub.c:4750 [inline]
slab_alloc_node mm/slub.c:4884 [inline]
__do_kmalloc_node mm/slub.c:5295 [inline]
__kmalloc_node_track_caller_noprof+0x651/0x800 mm/slub.c:5408
kmalloc_reserve+0xe8/0x350 net/core/skbuff.c:635
__alloc_skb+0x185/0x710 net/core/skbuff.c:713
alloc_skb include/linux/skbuff.h:1385 [inline]
alloc_skb_with_frags+0xdd/0x760 net/core/skbuff.c:6766
sock_alloc_send_pskb+0x801/0x980 net/core/sock.c:2998
unix_dgram_sendmsg+0x3c7/0x1810 net/unix/af_unix.c:2141
sock_sendmsg_nosec net/socket.c:787 [inline]
__sock_sendmsg net/socket.c:802 [inline]
__sys_sendto+0x468/0x4b0 net/socket.c:2265
__do_sys_sendto net/socket.c:2272 [inline]
__se_sys_sendto net/socket.c:2268 [inline]
__x64_sys_sendto+0xe0/0x1c0 net/socket.c:2268
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0x7f0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 2848 tgid 2848 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1397 [inline]
__free_frozen_pages+0x6d8/0xf60 mm/page_alloc.c:2938
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286
__kasan_kmalloc+0x6f/0xa0 mm/kasan/common.c:406
kmalloc_noprof include/linux/slab.h:950 [inline]
syslog_print+0xf8/0x620 kernel/printk/printk.c:1585
do_syslog+0x5bd/0x6d0 kernel/printk/printk.c:1763
__do_sys_syslog kernel/printk/printk.c:1855 [inline]
__se_sys_syslog kernel/printk/printk.c:1853 [inline]
__x64_sys_syslog+0x74/0xb0 kernel/printk/printk.c:1853
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0x7f0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff888120ab3e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888120ab3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888120ab3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888120ab4000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888120ab4080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: f5 cmc
1: 53 push %rbx
2: 48 8b 74 24 10 mov 0x10(%rsp),%rsi
7: 48 89 fb mov %rdi,%rbx
a: 48 83 c7 18 add $0x18,%rdi
e: e8 96 a8 1e fa call 0xfa1ea8a9
13: 48 89 df mov %rbx,%rdi
16: e8 6e f8 1e fa call 0xfa1ef889
1b: f7 c5 00 02 00 00 test $0x200,%ebp
21: 75 23 jne 0x46
23: 9c pushf
24: 58 pop %rax
25: f6 c4 02 test $0x2,%ah
28: 75 37 jne 0x61
* 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction
2f: e8 45 30 12 fa call 0xfa123079
34: 65 8b 05 2e 0a 87 05 mov %gs:0x5870a2e(%rip),%eax # 0x5870a69
3b: 85 c0 test %eax,%eax
3d: 74 16 je 0x55
3f: 5b pop %rbx