================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff88805822ffff by task udevd/14513 CPU: 1 UID: 0 PID: 14513 Comm: udevd Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948 __hid_input_report drivers/hid/hid-core.c:2130 [inline] hid_input_report+0x40a/0x520 drivers/hid/hid-core.c:2157 hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x376/0x540 drivers/usb/core/hcd.c:1661 dummy_timer+0x862/0x4550 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1777 [inline] __hrtimer_run_queues+0x529/0xc60 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1858 handle_softirqs+0x283/0x870 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1052 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:netlink_recvmsg+0x183/0xa30 net/netlink/af_netlink.c:1925 Code: 0f 85 ca 06 00 00 41 8b 07 4d 8d 3c 06 49 83 c7 08 4c 89 f8 48 c1 e8 03 42 80 3c 20 00 74 08 4c 89 ff e8 30 e1 c1 f8 4d 8b 3f <4d> 85 ff 44 89 6c 24 24 0f 85 76 06 00 00 e8 7a 3f 5c f8 4c 8b 7c RSP: 0018:ffffc9001aeb78a0 EFLAGS: 00000246 RAX: 1ffff1100b11a441 RBX: ffff88807b14e000 RCX: 1ffff110063f2cba RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888031f965d0 RBP: ffffc9001aeb79c8 R08: ffffffff8f5b9137 R09: 1ffffffff1eb7226 R10: dffffc0000000000 R11: fffffbfff1eb7227 R12: dffffc0000000000 R13: 0000000000000040 R14: ffff8880588d2080 R15: 0000000000000000 sock_recvmsg_nosec net/socket.c:1078 [inline] sock_recvmsg+0x229/0x270 net/socket.c:1100 ____sys_recvmsg+0x1c9/0x460 net/socket.c:2850 ___sys_recvmsg+0x1b5/0x510 net/socket.c:2892 __sys_recvmsg net/socket.c:2925 [inline] __do_sys_recvmsg net/socket.c:2931 [inline] __se_sys_recvmsg net/socket.c:2928 [inline] __x64_sys_recvmsg+0x198/0x260 net/socket.c:2928 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff630ea7407 Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007ffc1d3189a0 EFLAGS: 00000202 ORIG_RAX: 000000000000002f RAX: ffffffffffffffda RBX: 00007ff631586880 RCX: 00007ff630ea7407 RDX: 0000000000000000 RSI: 00007ffc1d318a30 RDI: 000000000000000c RBP: 0000564bbe457910 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000564bbe482550 R13: 00007ffc1d318af0 R14: 00007ffc1d318a3c R15: 0000000000000000 Allocated by task 16552: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 poison_kmalloc_redzone mm/kasan/common.c:400 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:417 kasan_kmalloc include/linux/kasan.h:262 [inline] __kmalloc_cache_noprof+0x3d5/0x6f0 mm/slub.c:5724 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] tomoyo_find_next_domain+0xdc/0x1aa0 security/tomoyo/domain.c:710 tomoyo_bprm_check_security+0x11c/0x180 security/tomoyo/tomoyo.c:102 security_bprm_check+0x89/0x270 security/security.c:1341 search_binary_handler fs/exec.c:1660 [inline] exec_binprm fs/exec.c:1702 [inline] bprm_execve+0x8ee/0x1450 fs/exec.c:1754 do_execveat_common+0x510/0x6a0 fs/exec.c:1860 do_execve fs/exec.c:1934 [inline] __do_sys_execve fs/exec.c:2010 [inline] __se_sys_execve fs/exec.c:2005 [inline] __x64_sys_execve+0x94/0xb0 fs/exec.c:2005 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 16552: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 __kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2514 [inline] slab_free mm/slub.c:6566 [inline] kfree+0x19a/0x6d0 mm/slub.c:6773 tomoyo_find_next_domain+0x173e/0x1aa0 security/tomoyo/domain.c:892 tomoyo_bprm_check_security+0x11c/0x180 security/tomoyo/tomoyo.c:102 security_bprm_check+0x89/0x270 security/security.c:1341 search_binary_handler fs/exec.c:1660 [inline] exec_binprm fs/exec.c:1702 [inline] bprm_execve+0x8ee/0x1450 fs/exec.c:1754 do_execveat_common+0x510/0x6a0 fs/exec.c:1860 do_execve fs/exec.c:1934 [inline] __do_sys_execve fs/exec.c:2010 [inline] __se_sys_execve fs/exec.c:2005 [inline] __x64_sys_execve+0x94/0xb0 fs/exec.c:2005 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88805822fc00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 511 bytes to the right of allocated 512-byte region [ffff88805822fc00, ffff88805822fe00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5822c head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88813fe26c80 ffffea000114f000 dead000000000002 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88813fe26c80 ffffea000114f000 dead000000000002 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0001608b01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 12, tgid 12 (kworker/u8:0), ts 77568381112, free_ts 23550020686 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3884 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5183 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3030 [inline] allocate_slab+0x96/0x3a0 mm/slub.c:3203 new_slab mm/slub.c:3257 [inline] ___slab_alloc+0xe94/0x1920 mm/slub.c:4627 __slab_alloc+0x65/0x100 mm/slub.c:4746 __slab_alloc_node mm/slub.c:4822 [inline] slab_alloc_node mm/slub.c:5233 [inline] __kmalloc_cache_noprof+0x411/0x6f0 mm/slub.c:5719 kmalloc_noprof include/linux/slab.h:957 [inline] batadv_forw_packet_alloc+0x1e9/0x390 net/batman-adv/send.c:506 batadv_iv_ogm_aggregate_new net/batman-adv/bat_iv_ogm.c:570 [inline] batadv_iv_ogm_queue_add+0x85f/0xd30 net/batman-adv/bat_iv_ogm.c:677 batadv_iv_ogm_schedule_buff net/batman-adv/bat_iv_ogm.c:841 [inline] batadv_iv_ogm_schedule+0x866/0xf00 net/batman-adv/bat_iv_ogm.c:873 batadv_iv_send_outstanding_bat_ogm_packet+0x6c6/0x7e0 net/batman-adv/bat_iv_ogm.c:1709 process_one_work kernel/workqueue.c:3263 [inline] process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3346 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x436/0x7d0 arch/x86/kernel/process.c:148 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1394 [inline] __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2906 __free_pages mm/page_alloc.c:5302 [inline] free_contig_range+0x1bd/0x4a0 mm/page_alloc.c:7146 destroy_args+0x69/0x660 mm/debug_vm_pgtable.c:958 debug_vm_pgtable+0x39f/0x3b0 mm/debug_vm_pgtable.c:1345 do_one_initcall+0x233/0x820 init/main.c:1283 do_initcall_level+0x104/0x190 init/main.c:1345 do_initcalls+0x59/0xa0 init/main.c:1361 kernel_init_freeable+0x334/0x4b0 init/main.c:1593 kernel_init+0x1d/0x1d0 init/main.c:1483 ret_from_fork+0x436/0x7d0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88805822fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805822ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88805822ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888058230000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888058230080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 0f 85 ca 06 00 00 jne 0x6d0 6: 41 8b 07 mov (%r15),%eax 9: 4d 8d 3c 06 lea (%r14,%rax,1),%r15 d: 49 83 c7 08 add $0x8,%r15 11: 4c 89 f8 mov %r15,%rax 14: 48 c1 e8 03 shr $0x3,%rax 18: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) 1d: 74 08 je 0x27 1f: 4c 89 ff mov %r15,%rdi 22: e8 30 e1 c1 f8 call 0xf8c1e157 27: 4d 8b 3f mov (%r15),%r15 * 2a: 4d 85 ff test %r15,%r15 <-- trapping instruction 2d: 44 89 6c 24 24 mov %r13d,0x24(%rsp) 32: 0f 85 76 06 00 00 jne 0x6ae 38: e8 7a 3f 5c f8 call 0xf85c3fb7 3d: 4c rex.WR 3e: 8b .byte 0x8b 3f: 7c .byte 0x7c