==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff88812b60bfff by task kworker/0:8/19451
CPU: 0 UID: 0 PID: 19451 Comm: kworker/0:8 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+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/0x1a0 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:1777 [inline]
__hrtimer_run_queues+0x516/0x990 kernel/time/hrtimer.c:1841
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858
handle_softirqs+0x1dd/0x8f0 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:3216
Code: 00 e8 11 59 28 00 9c 5d 81 e5 00 02 00 00 31 ff 48 89 ee e8 5f 76 20 00 48 85 ed 0f 85 d7 01 00 00 e8 71 7b 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:ffffc900143c77c8 EFLAGS: 00000293
RAX: ffffffff89a50638 RBX: ffffffff89a505e0 RCX: ffffffff8190c081
RDX: ffff888138ce1d40 RSI: ffffffff8190c08f RDI: ffff888138ce1d40
RBP: 0000000000000000 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 000000000003a04e
R13: ffffffff89a50638 R14: ffffc900143c7848 R15: dffffc0000000000
console_flush_all kernel/printk/printk.c:3289 [inline]
__console_flush_and_unlock kernel/printk/printk.c:3319 [inline]
console_unlock+0x103/0x260 kernel/printk/printk.c:3359
vprintk_emit+0x407/0x6b0 kernel/printk/printk.c:2426
_printk+0xcf/0x110 kernel/printk/printk.c:2451
legacy_dvb_usb_read_remote_control.cold+0x11/0x16 drivers/media/usb/dvb-usb/dvb-usb-remote.c:124
process_one_work+0x9c2/0x1840 kernel/workqueue.c:3257
process_scheduled_works kernel/workqueue.c:3340 [inline]
worker_thread+0x5da/0xe40 kernel/workqueue.c:3421
kthread+0x3b3/0x730 kernel/kthread.c:463
ret_from_fork+0x6c3/0xa20 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
Allocated by task 26035:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
unpoison_slab_object mm/kasan/common.c:340 [inline]
__kasan_slab_alloc+0x6e/0x70 mm/kasan/common.c:366
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4953 [inline]
slab_alloc_node mm/slub.c:5263 [inline]
kmem_cache_alloc_noprof+0x266/0x760 mm/slub.c:5270
mt_alloc_one lib/maple_tree.c:174 [inline]
mas_alloc_nodes+0x280/0x390 lib/maple_tree.c:1110
mas_preallocate+0x39c/0xf10 lib/maple_tree.c:5194
vma_iter_prealloc mm/vma.h:505 [inline]
__mmap_new_vma mm/vma.c:2515 [inline]
__mmap_region+0x1109/0x2430 mm/vma.c:2745
mmap_region+0x180/0x3e0 mm/vma.c:2823
do_mmap+0xc53/0x12d0 mm/mmap.c:558
vm_mmap_pgoff+0x201/0x390 mm/util.c:581
ksys_mmap_pgoff+0x328/0x5b0 mm/mmap.c:604
__do_sys_mmap arch/x86/kernel/sys_x86_64.c:89 [inline]
__se_sys_mmap arch/x86/kernel/sys_x86_64.c:82 [inline]
__x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:82
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xc9/0x570 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 22:
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:2540 [inline]
__rcu_free_sheaf_prepare+0x5d/0x280 mm/slub.c:2763
rcu_free_sheaf+0x1a/0xd0 mm/slub.c:6226
rcu_do_batch kernel/rcu/tree.c:2605 [inline]
rcu_core+0x7c0/0x15c0 kernel/rcu/tree.c:2857
handle_softirqs+0x1dd/0x8f0 kernel/softirq.c:622
run_ksoftirqd kernel/softirq.c:1063 [inline]
run_ksoftirqd+0x38/0x60 kernel/softirq.c:1055
smpboot_thread_fn+0x3d3/0xaa0 kernel/smpboot.c:160
kthread+0x3b3/0x730 kernel/kthread.c:463
ret_from_fork+0x6c3/0xa20 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
The buggy address belongs to the object at ffff88812b60be00
which belongs to the cache maple_node of size 256
The buggy address is located 255 bytes to the right of
allocated 256-byte region [ffff88812b60be00, ffff88812b60bf00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12b60a
head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0x200000000000040(head|node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000040 ffff88810004bc80 ffffea0004a60c80 dead000000000003
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 0200000000000040 ffff88810004bc80 ffffea0004a60c80 dead000000000003
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 0200000000000001 ffffea0004ad8281 00000000ffffffff 00000000ffffffff
head: ffff88812b60bb40 0000000000000000 00000000ffffffff 0000000000000002
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 25786, tgid 25786 (rm), ts 2558150278455, free_ts 2541196747654
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1e1/0x250 mm/page_alloc.c:1884
prep_new_page mm/page_alloc.c:1892 [inline]
get_page_from_freelist+0xd57/0x3b20 mm/page_alloc.c:3945
__alloc_frozen_pages_noprof+0x269/0x2230 mm/page_alloc.c:5240
alloc_pages_mpol+0xe8/0x410 mm/mempolicy.c:2486
alloc_slab_page mm/slub.c:3075 [inline]
allocate_slab mm/slub.c:3248 [inline]
new_slab+0x2c4/0x440 mm/slub.c:3302
___slab_alloc+0xda3/0x1ca0 mm/slub.c:4656
__kmem_cache_alloc_bulk+0x20f/0x700 mm/slub.c:7431
refill_sheaf mm/slub.c:2650 [inline]
__prefill_sheaf_pfmemalloc+0x42/0x90 mm/slub.c:5328
kmem_cache_prefill_sheaf+0x1b7/0x420 mm/slub.c:5422
mt_get_sheaf lib/maple_tree.c:189 [inline]
mas_alloc_nodes+0x2c3/0x390 lib/maple_tree.c:1140
mas_preallocate+0x39c/0xf10 lib/maple_tree.c:5194
vma_iter_prealloc mm/vma.h:505 [inline]
__split_vma+0x33d/0xdf0 mm/vma.c:524
vms_gather_munmap_vmas+0x3aa/0x12a0 mm/vma.c:1421
__mmap_setup mm/vma.c:2403 [inline]
__mmap_region+0x46e/0x2430 mm/vma.c:2727
mmap_region+0x180/0x3e0 mm/vma.c:2823
do_mmap+0xc53/0x12d0 mm/mmap.c:558
page last free pid 5224 tgid 5224 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1433 [inline]
__free_frozen_pages+0x7d1/0x1010 mm/page_alloc.c:2973
rcu_do_batch kernel/rcu/tree.c:2605 [inline]
rcu_core+0x7c0/0x15c0 kernel/rcu/tree.c:2857
handle_softirqs+0x1dd/0x8f0 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
Memory state around the buggy address:
ffff88812b60be80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88812b60bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88812b60bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88812b60c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88812b60c080: 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: 11 59 28 adc %ebx,0x28(%rcx)
5: 00 9c 5d 81 e5 00 02 add %bl,0x200e581(%rbp,%rbx,2)
c: 00 00 add %al,(%rax)
e: 31 ff xor %edi,%edi
10: 48 89 ee mov %rbp,%rsi
13: e8 5f 76 20 00 call 0x207677
18: 48 85 ed test %rbp,%rbp
1b: 0f 85 d7 01 00 00 jne 0x1f8
21: e8 71 7b 20 00 call 0x207b97
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