==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff88810d7b7fff by task kworker/0:9/14020
CPU: 0 UID: 0 PID: 14020 Comm: kworker/0:9 Not tainted syzkaller #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Workqueue: events legacy_dvb_usb_read_remote_control
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xcd/0x630 mm/kasan/report.c:482
kasan_report+0xe0/0x110 mm/kasan/report.c:595
mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948
__hid_input_report.constprop.0+0x314/0x470 drivers/hid/hid-core.c:2139
hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x38b/0x610 drivers/usb/core/hcd.c:1657
usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1741
dummy_timer+0x1809/0x3ad0 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1777 [inline]
__hrtimer_run_queues+0x202/0xc40 kernel/time/hrtimer.c:1841
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858
handle_softirqs+0x208/0x940 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xfa/0x160 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+0x90/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+0x995/0xc60 kernel/printk/printk.c:3216
Code: 00 e8 bf 65 29 00 9c 5d 81 e5 00 02 00 00 31 ff 48 89 ee e8 ed 49 21 00 48 85 ed 0f 85 8e 01 00 00 e8 0f 4f 21 00 fb 4c 89 e8 <48> c1 e8 03 42 80 3c 38 00 0f 84 b4 fe ff ff 4c 89 ef e8 54 20 83
RSP: 0018:ffffc90008cf7788 EFLAGS: 00000293
RAX: ffffffff898164f8 RBX: 0000000000000001 RCX: ffffffff815ea053
RDX: ffff88812b3157c0 RSI: ffffffff815ea061 RDI: 0000000000000007
RBP: 0000000000000000 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000000 R11: ffff88812b316268 R12: 0000000000000000
R13: ffffffff898164f8 R14: ffffffff898164a0 R15: dffffc0000000000
console_flush_all kernel/printk/printk.c:3289 [inline]
__console_flush_and_unlock kernel/printk/printk.c:3319 [inline]
console_unlock+0xef/0x240 kernel/printk/printk.c:3359
vprintk_emit+0x407/0x6b0 kernel/printk/printk.c:2426
_printk+0xc7/0x100 kernel/printk/printk.c:2451
m920x_read drivers/media/usb/dvb-usb/m920x.c:40 [inline]
m920x_rc_query+0x496/0x770 drivers/media/usb/dvb-usb/m920x.c:193
legacy_dvb_usb_read_remote_control+0x10c/0x4f0 drivers/media/usb/dvb-usb/dvb-usb-remote.c:123
process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257
process_scheduled_works kernel/workqueue.c:3340 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421
kthread+0x3c5/0x780 kernel/kthread.c:463
ret_from_fork+0x74f/0xa30 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
Allocated by task 5223:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
kasan_save_track+0x14/0x30 mm/kasan/common.c:77
poison_kmalloc_redzone mm/kasan/common.c:397 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:414
kmalloc_noprof include/linux/slab.h:957 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
uevent_show+0x165/0x3a0 drivers/base/core.c:2751
dev_attr_show+0x56/0xe0 drivers/base/core.c:2421
sysfs_kf_seq_show+0x216/0x3e0 fs/sysfs/file.c:65
seq_read_iter+0x50e/0x12d0 fs/seq_file.c:230
kernfs_fop_read_iter+0x46c/0x610 fs/kernfs/file.c:297
new_sync_read fs/read_write.c:491 [inline]
vfs_read+0x8bf/0xcf0 fs/read_write.c:572
ksys_read+0x12a/0x250 fs/read_write.c:715
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x570 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 5223:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
kasan_save_track+0x14/0x30 mm/kasan/common.c:77
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:252 [inline]
__kasan_slab_free+0x43/0x70 mm/kasan/common.c:284
kasan_slab_free include/linux/kasan.h:234 [inline]
slab_free_hook mm/slub.c:2540 [inline]
slab_free mm/slub.c:6670 [inline]
kfree+0x2c8/0x680 mm/slub.c:6878
uevent_show+0x2cf/0x3a0 drivers/base/core.c:2764
dev_attr_show+0x56/0xe0 drivers/base/core.c:2421
sysfs_kf_seq_show+0x216/0x3e0 fs/sysfs/file.c:65
seq_read_iter+0x50e/0x12d0 fs/seq_file.c:230
kernfs_fop_read_iter+0x46c/0x610 fs/kernfs/file.c:297
new_sync_read fs/read_write.c:491 [inline]
vfs_read+0x8bf/0xcf0 fs/read_write.c:572
ksys_read+0x12a/0x250 fs/read_write.c:715
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x570 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88810d7b6000
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 [ffff88810d7b6000, ffff88810d7b7000)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10d7b0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x200000000000040(head|node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000040 ffff888100042140 ffffea0004e9e000 dead000000000002
raw: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 0200000000000040 ffff888100042140 ffffea0004e9e000 dead000000000002
head: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 0200000000000003 ffffea000435ec01 00000000ffffffff 00000000ffffffff
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5237, tgid 5237 (kworker/0:4), ts 123039228620, free_ts 122772392394
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1846
prep_new_page mm/page_alloc.c:1854 [inline]
get_page_from_freelist+0x1058/0x3cb0 mm/page_alloc.c:3915
__alloc_frozen_pages_noprof+0x259/0x21c0 mm/page_alloc.c:5210
alloc_pages_mpol+0xe4/0x410 mm/mempolicy.c:2486
alloc_slab_page mm/slub.c:3075 [inline]
allocate_slab mm/slub.c:3248 [inline]
new_slab+0x2c3/0x430 mm/slub.c:3302
___slab_alloc+0xe20/0x1ca0 mm/slub.c:4656
__slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4779
__slab_alloc_node mm/slub.c:4855 [inline]
slab_alloc_node mm/slub.c:5251 [inline]
__do_kmalloc_node mm/slub.c:5656 [inline]
__kmalloc_noprof+0x4c6/0x8d0 mm/slub.c:5669
kmalloc_noprof include/linux/slab.h:961 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
gspca_dev_probe2+0x138/0x1c20 drivers/media/usb/gspca/gspca.c:1459
sd_probe+0x96/0xc0 drivers/media/usb/gspca/spca1528.c:422
usb_probe_interface+0x303/0xa80 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xb20 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x470 drivers/base/dd.c:801
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831
__device_attach_driver+0x1df/0x350 drivers/base/dd.c:959
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
page last free pid 2861 tgid 2861 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0x795/0x1010 mm/page_alloc.c:2943
discard_slab mm/slub.c:3346 [inline]
__put_partials+0x130/0x170 mm/slub.c:3886
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4c/0xf0 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:349
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4953 [inline]
slab_alloc_node mm/slub.c:5263 [inline]
kmem_cache_alloc_noprof+0x26e/0x740 mm/slub.c:5270
getname_flags.part.0+0x4c/0x550 fs/namei.c:146
getname_flags+0x93/0xf0 include/linux/audit.h:345
getname include/linux/fs.h:2498 [inline]
do_sys_openat2+0xb7/0x260 fs/open.c:1426
do_sys_open fs/open.c:1436 [inline]
__do_sys_openat fs/open.c:1452 [inline]
__se_sys_openat fs/open.c:1447 [inline]
__x64_sys_openat+0x174/0x210 fs/open.c:1447
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x570 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88810d7b7e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88810d7b7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88810d7b7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88810d7b8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88810d7b8080: 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: bf 65 29 00 9c mov $0x9c002965,%edi
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 ed 49 21 00 call 0x214a05
18: 48 85 ed test %rbp,%rbp
1b: 0f 85 8e 01 00 00 jne 0x1af
21: e8 0f 4f 21 00 call 0x214f35
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 84 b4 fe ff ff je 0xfffffeed
39: 4c 89 ef mov %r13,%rdi
3c: e8 .byte 0xe8
3d: 54 push %rsp
3e: 20 .byte 0x20
3f: 83 .byte 0x83