==================================================================
BUG: KASAN: use-after-free in mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
Read of size 1 at addr ffff888072d2bfff by task kworker/u8:19/11241
CPU: 1 UID: 0 PID: 11241 Comm: kworker/u8:19 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Workqueue: krds_cp_wq#0/2 rds_connect_worker
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
__hid_input_report+0x41c/0x580 drivers/hid/hid-core.c:2161
hid_irq_in+0x492/0x710 drivers/hid/usbhid/hid-core.c:287
__usb_hcd_giveback_urb+0x374/0x530 drivers/usb/core/hcd.c:1657
dummy_timer+0xac3/0x4b40 drivers/usb/gadget/udc/dummy_hcd.c:2005
__run_hrtimer kernel/time/hrtimer.c:2032 [inline]
__hrtimer_run_queues+0x3bc/0xa10 kernel/time/hrtimer.c:2096
hrtimer_run_softirq+0x17a/0x240 kernel/time/hrtimer.c:2113
handle_softirqs+0x225/0x840 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x220 kernel/softirq.c:735
irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:__rcu_read_unlock+0x5c/0xe0 kernel/rcu/tree_plugin.h:441
Code: 84 c0 75 4f ff 0b 75 1d 4c 8d b7 c8 04 00 00 4c 89 f0 48 c1 e8 03 42 0f b6 04 38 84 c0 75 66 41 83 3e 00 75 27 43 0f b6 04 3c <84> c0 75 41 8b 03 3d 00 00 00 40 73 0f 5b 41 5c 41 5d 41 5e 41 5f
RSP: 0000:ffffc90006327698 EFLAGS: 00000202
RAX: 0000000000000000 RBX: ffff88802acaa3c4 RCX: 0000000000000046
RDX: 0000000000000005 RSI: ffffffff8e25a6b5 RDI: ffff88802aca9f00
RBP: 0000000000000000 R08: ffffffff8a5c8ca4 R09: 0000000000000000
R10: 0000000000000000 R11: ffffffff8e959c20 R12: 1ffff11005595478
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
rcu_read_unlock include/linux/rcupdate.h:873 [inline]
__ipv6_chk_addr_and_flags+0x688/0x7e0 net/ipv6/addrconf.c:-1
ipv6_chk_addr_and_flags net/ipv6/addrconf.c:2031 [inline]
ipv6_chk_addr+0x3a/0x60 net/ipv6/addrconf.c:1972
__inet6_bind+0x799/0xf30 net/ipv6/af_inet6.c:367
kernel_bind+0x13e/0x1c0 net/socket.c:3646
rds_tcp_conn_path_connect+0x53b/0x920 net/rds/tcp_connect.c:175
rds_connect_worker+0x1d8/0x290 net/rds/threads.c:176
process_one_work kernel/workqueue.c:3322 [inline]
process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3486
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xf1e13 pfn:0x72d2b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 00000000000f1e13 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x428c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_COMP), pid 24139, tgid 24138 (syz.3.6868), ts 1064011659080, free_ts 1064019814137
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859
prep_new_page mm/page_alloc.c:1867 [inline]
get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
alloc_pages_mpol+0x212/0x380 mm/mempolicy.c:2490
alloc_frozen_pages_noprof mm/mempolicy.c:2561 [inline]
alloc_pages_noprof+0xac/0x2a0 mm/mempolicy.c:2581
alloc_skb_with_frags+0x1eb/0x760 net/core/skbuff.c:6780
sock_alloc_send_pskb+0x878/0x990 net/core/sock.c:3010
packet_alloc_skb net/packet/af_packet.c:2932 [inline]
packet_snd net/packet/af_packet.c:3025 [inline]
packet_sendmsg+0x3258/0x5040 net/packet/af_packet.c:3114
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:775
__sock_sendmsg net/socket.c:790 [inline]
__sys_sendto+0x408/0x5a0 net/socket.c:2252
__do_sys_sendto net/socket.c:2259 [inline]
__se_sys_sendto net/socket.c:2255 [inline]
__ia32_sys_sendto+0xdd/0x100 net/socket.c:2255
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0x23e/0x6f0 arch/x86/entry/syscall_32.c:307
do_fast_syscall_32+0x33/0x70 arch/x86/entry/syscall_32.c:332
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
page last free pid 24139 tgid 24138 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1406 [inline]
__free_frozen_pages+0xc1e/0xd10 mm/page_alloc.c:2950
__folio_put+0x4b3/0x590 mm/swap.c:112
folio_put include/linux/mm.h:2124 [inline]
put_page include/linux/mm.h:2193 [inline]
put_netmem include/net/netmem.h:394 [inline]
skb_page_unref include/linux/skbuff_ref.h:43 [inline]
__skb_frag_unref include/linux/skbuff_ref.h:56 [inline]
skb_release_data+0x573/0xab0 net/core/skbuff.c:1110
skb_release_all net/core/skbuff.c:1191 [inline]
__kfree_skb+0x5d/0x210 net/core/skbuff.c:1205
kfree_skb_reason include/linux/skbuff.h:1323 [inline]
kfree_skb include/linux/skbuff.h:1332 [inline]
____dev_forward_skb include/linux/netdevice.h:4450 [inline]
__dev_forward_skb2+0x525/0x730 net/core/dev.c:2441
veth_forward_skb drivers/net/veth.c:323 [inline]
veth_xmit+0x493/0xe60 drivers/net/veth.c:379
__netdev_start_xmit include/linux/netdevice.h:5400 [inline]
netdev_start_xmit include/linux/netdevice.h:5409 [inline]
xmit_one net/core/dev.c:3889 [inline]
dev_hard_start_xmit+0x2cd/0x830 net/core/dev.c:3905
__dev_queue_xmit+0x1435/0x37f0 net/core/dev.c:4872
packet_snd net/packet/af_packet.c:3082 [inline]
packet_sendmsg+0x3d95/0x5040 net/packet/af_packet.c:3114
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:775
__sock_sendmsg net/socket.c:790 [inline]
__sys_sendto+0x408/0x5a0 net/socket.c:2252
__do_sys_sendto net/socket.c:2259 [inline]
__se_sys_sendto net/socket.c:2255 [inline]
__ia32_sys_sendto+0xdd/0x100 net/socket.c:2255
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0x23e/0x6f0 arch/x86/entry/syscall_32.c:307
do_fast_syscall_32+0x33/0x70 arch/x86/entry/syscall_32.c:332
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
Memory state around the buggy address:
ffff888072d2be80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888072d2bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888072d2bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff888072d2c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888072d2c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 84 c0 test %al,%al
2: 75 4f jne 0x53
4: ff 0b decl (%rbx)
6: 75 1d jne 0x25
8: 4c 8d b7 c8 04 00 00 lea 0x4c8(%rdi),%r14
f: 4c 89 f0 mov %r14,%rax
12: 48 c1 e8 03 shr $0x3,%rax
16: 42 0f b6 04 38 movzbl (%rax,%r15,1),%eax
1b: 84 c0 test %al,%al
1d: 75 66 jne 0x85
1f: 41 83 3e 00 cmpl $0x0,(%r14)
23: 75 27 jne 0x4c
25: 43 0f b6 04 3c movzbl (%r12,%r15,1),%eax
* 2a: 84 c0 test %al,%al <-- trapping instruction
2c: 75 41 jne 0x6f
2e: 8b 03 mov (%rbx),%eax
30: 3d 00 00 00 40 cmp $0x40000000,%eax
35: 73 0f jae 0x46
37: 5b pop %rbx
38: 41 5c pop %r12
3a: 41 5d pop %r13
3c: 41 5e pop %r14
3e: 41 5f pop %r15