================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xfcd/0x1190 drivers/hid/hid-mcp2221.c:944 Read of size 1 at addr ffff888044d9ffff by task udevd/28158 CPU: 1 UID: 0 PID: 28158 Comm: udevd Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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+0xfcd/0x1190 drivers/hid/hid-mcp2221.c:944 __hid_input_report drivers/hid/hid-core.c:2130 [inline] hid_input_report+0x407/0x520 drivers/hid/hid-core.c:2157 hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x373/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:1761 [inline] __hrtimer_run_queues+0x529/0xc60 kernel/time/hrtimer.c:1825 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1842 handle_softirqs+0x283/0x870 kernel/softirq.c:579 __do_softirq kernel/softirq.c:613 [inline] invoke_softirq kernel/softirq.c:453 [inline] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680 irq_exit_rcu+0x9/0x30 kernel/softirq.c:696 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1050 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:lock_release+0x2b5/0x3e0 kernel/locking/lockdep.c:5893 Code: 51 48 c7 44 24 20 00 00 00 00 9c 8f 44 24 20 f7 44 24 20 00 02 00 00 75 56 f7 c3 00 02 00 00 74 01 fb 65 48 8b 05 cb e1 02 11 <48> 3b 44 24 28 0f 85 8b 00 00 00 48 83 c4 30 5b 41 5c 41 5d 41 5e RSP: 0018:ffffc900039bf310 EFLAGS: 00000206 RAX: 1708398ff5455200 RBX: 0000000000000202 RCX: 1708398ff5455200 RDX: 0000000000000002 RSI: ffffffff8dba6cac RDI: ffffffff8be33680 RBP: ffff88803369e540 R08: 0000000000000022 R09: ffffffff8172c195 R10: ffffc900039bf498 R11: ffffffff81ac3820 R12: 0000000000000002 R13: 0000000000000002 R14: ffffffff8e139ee0 R15: ffff88803369da00 rcu_lock_release include/linux/rcupdate.h:341 [inline] rcu_read_unlock include/linux/rcupdate.h:871 [inline] class_rcu_destructor include/linux/rcupdate.h:1155 [inline] unwind_next_frame+0x19a9/0x2390 arch/x86/kernel/unwind_orc.c:680 arch_stack_walk+0x11c/0x150 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4365 [inline] __kmalloc_noprof+0x27a/0x4f0 mm/slub.c:4377 kmalloc_noprof include/linux/slab.h:909 [inline] kmalloc_array_noprof include/linux/slab.h:948 [inline] security_inode_init_security+0x107/0x3f0 security/security.c:1829 shmem_mknod+0x1f6/0x3e0 mm/shmem.c:3912 lookup_open fs/namei.c:3708 [inline] open_last_lookups fs/namei.c:3807 [inline] path_openat+0x14f1/0x3830 fs/namei.c:4043 do_filp_open+0x1fa/0x410 fs/namei.c:4073 do_sys_openat2+0x121/0x1c0 fs/open.c:1435 do_sys_open fs/open.c:1450 [inline] __do_sys_openat fs/open.c:1466 [inline] __se_sys_openat fs/open.c:1461 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1461 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:0x7f59418a7407 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:00007ffca5625360 EFLAGS: 00000202 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f5941feb880 RCX: 00007f59418a7407 RDX: 0000000000080241 RSI: 00007ffca56258c0 RDI: ffffffffffffff9c RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000001b6 R11: 0000000000000202 R12: 0000556fd4dc6dfc R13: 0000556fd4dc6dfc R14: 0000000000000001 R15: 0000556fd4de1140 Allocated by task 6155: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4365 [inline] __kmalloc_node_noprof+0x276/0x4e0 mm/slub.c:4371 kmalloc_node_noprof include/linux/slab.h:932 [inline] crypto_alloc_tfmmem crypto/api.c:514 [inline] crypto_create_tfm_node+0x83/0x3f0 crypto/api.c:534 crypto_alloc_tfm_node+0x172/0x3f0 crypto/api.c:642 alg_bind+0x2f7/0x570 crypto/af_alg.c:184 __sys_bind_socket net/socket.c:1858 [inline] __sys_bind+0x2c3/0x3e0 net/socket.c:1889 __do_sys_bind net/socket.c:1894 [inline] __se_sys_bind net/socket.c:1892 [inline] __ia32_sys_bind+0x7a/0x90 net/socket.c:1892 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xb6/0x2b0 arch/x86/entry/syscall_32.c:306 do_fast_syscall_32+0x34/0x80 arch/x86/entry/syscall_32.c:331 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Freed by task 6154: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:243 [inline] __kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2417 [inline] slab_free mm/slub.c:4680 [inline] kfree+0x18e/0x440 mm/slub.c:4879 alg_do_release crypto/af_alg.c:118 [inline] alg_sock_destruct+0x86/0xc0 crypto/af_alg.c:502 __sk_destruct+0x89/0x660 net/core/sock.c:2339 sock_put include/net/sock.h:1960 [inline] af_alg_release+0x83/0xf0 crypto/af_alg.c:125 __sock_release net/socket.c:649 [inline] sock_close+0xc0/0x240 net/socket.c:1439 __fput+0x44c/0xa70 fs/file_table.c:468 task_work_run+0x1d4/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xec/0x110 kernel/entry/common.c:43 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] __do_fast_syscall_32+0x1f4/0x2b0 arch/x86/entry/syscall_32.c:309 do_fast_syscall_32+0x34/0x80 arch/x86/entry/syscall_32.c:331 entry_SYSENTER_compat_after_hwframe+0x84/0x8e The buggy address belongs to the object at ffff888044d9fc00 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 [ffff888044d9fc00, ffff888044d9fe00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888044d9e400 pfn:0x44d9c head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801a441c80 ffffea0000cb2610 ffffea00016de110 raw: ffff888044d9e400 0000000000100003 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801a441c80 ffffea0000cb2610 ffffea00016de110 head: ffff888044d9e400 0000000000100003 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0001136701 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5381, tgid 5381 (syz-executor), ts 1346966245109, free_ts 1339814229906 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab+0x8a/0x370 mm/slub.c:2655 new_slab mm/slub.c:2709 [inline] ___slab_alloc+0xbeb/0x1410 mm/slub.c:3891 __slab_alloc mm/slub.c:3981 [inline] __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] __kmalloc_cache_noprof+0x296/0x3d0 mm/slub.c:4391 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] mca_alloc net/ipv6/mcast.c:876 [inline] __ipv6_dev_mc_inc+0x44f/0xa50 net/ipv6/mcast.c:966 ipv6_add_dev+0xe54/0x1370 net/ipv6/addrconf.c:472 addrconf_notify+0x794/0x1010 net/ipv6/addrconf.c:3650 notifier_call_chain+0x1b6/0x3e0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2267 [inline] call_netdevice_notifiers net/core/dev.c:2281 [inline] register_netdevice+0x1608/0x1ae0 net/core/dev.c:11244 veth_newlink+0x42f/0xa50 drivers/net/veth.c:1855 rtnl_newlink_create+0x310/0xb00 net/core/rtnetlink.c:3825 __rtnl_newlink net/core/rtnetlink.c:3942 [inline] rtnl_newlink+0x16d6/0x1c70 net/core/rtnetlink.c:4057 rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6946 page last free pid 1101 tgid 1101 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] free_unref_folios+0xdbd/0x1520 mm/page_alloc.c:2952 folios_put_refs+0x559/0x640 mm/swap.c:997 release_pages+0x4b4/0x520 mm/swap.c:1037 io_free_region+0xb4/0x270 io_uring/memmap.c:102 io_rings_free io_uring/io_uring.c:2720 [inline] io_ring_ctx_free+0x278/0x4e0 io_uring/io_uring.c:2810 io_ring_exit_work+0x8c4/0x930 io_uring/io_uring.c:3032 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3f9/0x770 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: ffff888044d9fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888044d9ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888044d9ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888044da0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888044da0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 51 push %rcx 1: 48 c7 44 24 20 00 00 movq $0x0,0x20(%rsp) 8: 00 00 a: 9c pushf b: 8f 44 24 20 pop 0x20(%rsp) f: f7 44 24 20 00 02 00 testl $0x200,0x20(%rsp) 16: 00 17: 75 56 jne 0x6f 19: f7 c3 00 02 00 00 test $0x200,%ebx 1f: 74 01 je 0x22 21: fb sti 22: 65 48 8b 05 cb e1 02 mov %gs:0x1102e1cb(%rip),%rax # 0x1102e1f5 29: 11 * 2a: 48 3b 44 24 28 cmp 0x28(%rsp),%rax <-- trapping instruction 2f: 0f 85 8b 00 00 00 jne 0xc0 35: 48 83 c4 30 add $0x30,%rsp 39: 5b pop %rbx 3a: 41 5c pop %r12 3c: 41 5d pop %r13 3e: 41 5e pop %r14