==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff888121a73fff by task kworker/0:9/21680
CPU: 0 UID: 0 PID: 21680 Comm: kworker/0:9 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Workqueue: events legacy_dvb_usb_read_remote_control
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+0x156/0x4c9 mm/kasan/report.c:482
kasan_report+0xdf/0x1e0 mm/kasan/report.c:595
mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:948
__hid_input_report.constprop.0+0x314/0x460 drivers/hid/hid-core.c:2139
hid_irq_in+0x52e/0x6b0 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+0xd85/0x3670 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1785 [inline]
__hrtimer_run_queues+0x50e/0xa70 kernel/time/hrtimer.c:1849
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1866
handle_softirqs+0x1de/0x9d0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xed/0x150 kernel/softirq.c:723
irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:console_flush_one_record+0xac3/0xe50 kernel/printk/printk.c:3270
Code: 00 e8 51 5a 28 00 9c 5d 81 e5 00 02 00 00 31 ff 48 89 ee e8 5f 62 20 00 48 85 ed 0f 85 d7 01 00 00 e8 71 67 20 00 fb 4c 89 e8 <48> c1 e8 03 42 80 3c 38 00 0f 85 64 03 00 00 48 8b 0c 24 48 8b 6b
RSP: 0018:ffffc900028477e0 EFLAGS: 00000293
RAX: ffffffff89c75f58 RBX: ffffffff89c75f00 RCX: ffffffff81914f21
RDX: ffff888133b61d00 RSI: ffffffff81914f2f RDI: ffff888133b61d00
RBP: 0000000000000000 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 000000000002670d
R13: ffffffff89c75f58 R14: ffffc90002847860 R15: dffffc0000000000
console_flush_all kernel/printk/printk.c:3343 [inline]
__console_flush_and_unlock kernel/printk/printk.c:3373 [inline]
console_unlock+0x103/0x260 kernel/printk/printk.c:3413
vprintk_emit+0x407/0x6b0 kernel/printk/printk.c:2479
_printk+0xcf/0x110 kernel/printk/printk.c:2504
m920x_read drivers/media/usb/dvb-usb/m920x.c:40 [inline]
m920x_rc_query.cold+0x2b/0x30 drivers/media/usb/dvb-usb/m920x.c:188
legacy_dvb_usb_read_remote_control+0x10c/0x4f0 drivers/media/usb/dvb-usb/dvb-usb-remote.c:123
process_one_work+0x9d7/0x1920 kernel/workqueue.c:3275
process_scheduled_works kernel/workqueue.c:3358 [inline]
worker_thread+0x5da/0xe40 kernel/workqueue.c:3439
kthread+0x370/0x450 kernel/kthread.c:467
ret_from_fork+0x6c3/0xcb0 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Allocated by task 2842:
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:5219 [inline]
__kmalloc_node_track_caller_noprof+0x306/0x800 mm/slub.c:5327
kmalloc_reserve+0xe8/0x350 net/core/skbuff.c:635
__alloc_skb+0x185/0x710 net/core/skbuff.c:713
alloc_skb include/linux/skbuff.h:1383 [inline]
alloc_skb_with_frags+0xe0/0x810 net/core/skbuff.c:6750
sock_alloc_send_pskb+0x801/0x980 net/core/sock.c:2995
unix_dgram_sendmsg+0x3c7/0x1820 net/unix/af_unix.c:2125
sock_sendmsg_nosec net/socket.c:727 [inline]
__sock_sendmsg net/socket.c:742 [inline]
__sys_sendto+0x4aa/0x520 net/socket.c:2206
__do_sys_sendto net/socket.c:2213 [inline]
__se_sys_sendto net/socket.c:2209 [inline]
__x64_sys_sendto+0xe0/0x1c0 net/socket.c:2209
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x106/0x7b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 2835:
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:2687 [inline]
slab_free mm/slub.c:6124 [inline]
kfree+0x1dc/0x640 mm/slub.c:6442
skb_kfree_head net/core/skbuff.c:1089 [inline]
skb_free_head+0x119/0x220 net/core/skbuff.c:1101
skb_release_data+0x79b/0x9d0 net/core/skbuff.c:1128
skb_release_all net/core/skbuff.c:1203 [inline]
__kfree_skb net/core/skbuff.c:1217 [inline]
consume_skb net/core/skbuff.c:1450 [inline]
consume_skb+0xc4/0x110 net/core/skbuff.c:1444
__unix_dgram_recvmsg+0x754/0xc30 net/unix/af_unix.c:2653
unix_dgram_recvmsg+0xd0/0x110 net/unix/af_unix.c:2670
sock_recvmsg_nosec net/socket.c:1078 [inline]
sock_recvmsg+0x1f9/0x250 net/socket.c:1100
sock_read_iter+0x2c6/0x3c0 net/socket.c:1170
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+0x106/0x7b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff888121a73c00
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 [ffff888121a73c00, ffff888121a73e00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x121a70
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888121a70211
flags: 0x200000000000040(head|node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000040 ffff88810005d140 dead000000000100 dead000000000122
raw: 0000000000000000 0000040000100010 00000000f5000000 ffff888121a70211
head: 0200000000000040 ffff88810005d140 dead000000000100 dead000000000122
head: 0000000000000000 0000040000100010 00000000f5000000 ffff888121a70211
head: 0200000000000002 ffffea0004869c01 00000000ffffffff 00000000ffffffff
head: ffff888121a71f00 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 2842, tgid 2842 (klogd), ts 1819576857258, free_ts 1818773174220
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x153/0x170 mm/page_alloc.c:1889
prep_new_page mm/page_alloc.c:1897 [inline]
get_page_from_freelist+0xf10/0x39f0 mm/page_alloc.c:3962
__alloc_frozen_pages_noprof+0x273/0x2860 mm/page_alloc.c:5250
alloc_slab_page mm/slub.c:3255 [inline]
allocate_slab mm/slub.c:3444 [inline]
new_slab+0xa6/0x6e0 mm/slub.c:3502
refill_objects+0x26b/0x400 mm/slub.c:7134
refill_sheaf mm/slub.c:2804 [inline]
alloc_full_sheaf mm/slub.c:2825 [inline]
__pcs_replace_empty_main+0x19f/0x600 mm/slub.c:4588
alloc_from_pcs mm/slub.c:4681 [inline]
slab_alloc_node mm/slub.c:4815 [inline]
__do_kmalloc_node mm/slub.c:5218 [inline]
__kmalloc_node_track_caller_noprof+0x651/0x800 mm/slub.c:5327
kmalloc_reserve+0xe8/0x350 net/core/skbuff.c:635
__alloc_skb+0x185/0x710 net/core/skbuff.c:713
alloc_skb include/linux/skbuff.h:1383 [inline]
alloc_skb_with_frags+0xe0/0x810 net/core/skbuff.c:6750
sock_alloc_send_pskb+0x801/0x980 net/core/sock.c:2995
unix_dgram_sendmsg+0x3c7/0x1820 net/unix/af_unix.c:2125
sock_sendmsg_nosec net/socket.c:727 [inline]
__sock_sendmsg net/socket.c:742 [inline]
__sys_sendto+0x4aa/0x520 net/socket.c:2206
__do_sys_sendto net/socket.c:2213 [inline]
__se_sys_sendto net/socket.c:2209 [inline]
__x64_sys_sendto+0xe0/0x1c0 net/socket.c:2209
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x106/0x7b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 17255 tgid 17255 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1433 [inline]
__free_frozen_pages+0x7b1/0xfb0 mm/page_alloc.c:2978
hiddev_free drivers/hid/hid-core.c:763 [inline]
kref_put include/linux/kref.h:65 [inline]
hid_device_release+0x138/0x1a0 drivers/hid/hid-core.c:770
device_release+0xa4/0x240 drivers/base/core.c:2565
kobject_cleanup lib/kobject.c:689 [inline]
kobject_release lib/kobject.c:720 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x1f7/0x640 lib/kobject.c:737
put_device+0x1f/0x30 drivers/base/core.c:3797
usbhid_probe+0xf2d/0x1350 drivers/hid/usbhid/hid-core.c:1461
usb_probe_interface+0x303/0x8f0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:583 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:661
__driver_probe_device+0x1de/0x400 drivers/base/dd.c:803
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:833
__device_attach_driver+0x1ff/0x3e0 drivers/base/dd.c:961
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4d0 drivers/base/dd.c:1033
device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1088
bus_probe_device+0x64/0x160 drivers/base/bus.c:574
device_add+0x11d9/0x1950 drivers/base/core.c:3689
Memory state around the buggy address:
ffff888121a73e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888121a73f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888121a73f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888121a74000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888121a74080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 00 e8 add %ch,%al
2: 51 push %rcx
3: 5a pop %rdx
4: 28 00 sub %al,(%rax)
6: 9c pushf
7: 5d pop %rbp
8: 81 e5 00 02 00 00 and $0x200,%ebp
e: 31 ff xor %edi,%edi
10: 48 89 ee mov %rbp,%rsi
13: e8 5f 62 20 00 call 0x206277
18: 48 85 ed test %rbp,%rbp
1b: 0f 85 d7 01 00 00 jne 0x1f8
21: e8 71 67 20 00 call 0x206797
26: fb sti
27: 4c 89 e8 mov %r13,%rax
* 2a: 48 c1 e8 03 shr $0x3,%rax <-- trapping instruction
2e: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1)
33: 0f 85 64 03 00 00 jne 0x39d
39: 48 8b 0c 24 mov (%rsp),%rcx
3d: 48 rex.W
3e: 8b .byte 0x8b
3f: 6b .byte 0x6b