==================================================================
BUG: KASAN: slab-out-of-bounds in gb_operation_message_init drivers/greybus/operation.c:341 [inline]
BUG: KASAN: slab-out-of-bounds in gb_operation_message_alloc+0x26e/0x2c0 drivers/greybus/operation.c:385
Write of size 2 at addr ffff88810fb34962 by task kworker/1:1/30
CPU: 1 UID: 0 PID: 30 Comm: kworker/1:1 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: usb_hub_wq hub_event
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+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report+0xdf/0x1c0 mm/kasan/report.c:595
gb_operation_message_init drivers/greybus/operation.c:341 [inline]
gb_operation_message_alloc+0x26e/0x2c0 drivers/greybus/operation.c:385
gb_operation_create_common+0x9f/0x710 drivers/greybus/operation.c:532
gb_operation_create_incoming drivers/greybus/operation.c:644 [inline]
gb_connection_recv_request drivers/greybus/operation.c:926 [inline]
gb_connection_recv+0x1dc/0x1050 drivers/greybus/operation.c:1063
greybus_data_rcvd+0x244/0x600 drivers/greybus/connection.c:89
cport_in_callback+0x1fb/0x280 drivers/greybus/es2.c:840
__usb_hcd_giveback_urb+0x38e/0x610 drivers/usb/core/hcd.c:1657
usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741
dummy_timer+0xdaf/0x3820 drivers/usb/gadget/udc/dummy_hcd.c:2023
__run_hrtimer kernel/time/hrtimer.c:2074 [inline]
__hrtimer_run_queues+0x462/0x9c0 kernel/time/hrtimer.c:2131
hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2148
handle_softirqs+0x1d9/0x9b0 kernel/softirq.c:645
__do_softirq kernel/softirq.c:679 [inline]
invoke_softirq kernel/softirq.c:519 [inline]
__irq_exit_rcu+0x168/0x210 kernel/softirq.c:758
irq_exit_rcu+0x9/0x30 kernel/softirq.c:775
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:lock_acquire+0x5e/0x380 kernel/locking/lockdep.c:5947
Code: 05 8f ac 93 0b 83 f8 07 0f 87 da 00 00 00 48 0f a3 05 1e 0c 85 09 0f 82 c9 02 00 00 8b 35 be 19 85 09 85 f6 0f 85 c7 00 00 00 <48> 8b 44 24 30 65 48 2b 05 2d ac 93 0b 0f 85 09 03 00 00 48 83 c4
RSP: 0018:ffffc90000206e08 EFLAGS: 00000206
RAX: 0000000000000046 RBX: 0000000000000000 RCX: 0000000000000100
RDX: 0000000000000001 RSI: ffffffff892bda86 RDI: ffffffff87d2bd80
RBP: ffffffff8a0b9040 R08: 000000000000fd22 R09: 000000000000013a
R10: 0000000000000200 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x1a4/0x1bd0 kernel/locking/mutex.c:821
device_links_write_lock drivers/base/core.c:322 [inline]
device_links_driver_bound+0x100/0xca0 drivers/base/core.c:1399
driver_bound+0xf0/0x220 drivers/base/dd.c:457
really_probe+0x3d4/0xa60 drivers/base/dd.c:756
__driver_probe_device+0x210/0x460 drivers/base/dd.c:868
driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
__device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098
device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x64/0x160 drivers/base/bus.c:620
device_add+0x121d/0x1970 drivers/base/core.c:3776
usb_set_configuration+0xd97/0x1dc0 drivers/usb/core/message.c:2274
usb_generic_driver_probe+0xa1/0xe0 drivers/usb/core/generic.c:250
usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:293
call_driver_probe drivers/base/dd.c:628 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:706
__driver_probe_device+0x210/0x460 drivers/base/dd.c:868
driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
__device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098
device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x64/0x160 drivers/base/bus.c:620
device_add+0x121d/0x1970 drivers/base/core.c:3776
usb_new_device.part.0+0xcc2/0x1686 drivers/usb/core/hub.c:2713
usb_new_device drivers/usb/core/hub.c:5838 [inline]
hub_port_connect drivers/usb/core/hub.c:5585 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5725 [inline]
port_event drivers/usb/core/hub.c:5889 [inline]
hub_event.cold+0x51a/0xe9d drivers/usb/core/hub.c:5971
process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396
process_scheduled_works kernel/workqueue.c:3479 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560
kthread+0x373/0x450 kernel/kthread.c:436
ret_from_fork+0x69f/0xc90 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Allocated by task 30:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:409 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:426
kasan_kmalloc include/linux/kasan.h:263 [inline]
__do_kmalloc_node mm/slub.c:5414 [inline]
__kmalloc_noprof+0x315/0x7e0 mm/slub.c:5439
_kmalloc_noprof include/linux/slab.h:995 [inline]
_kzalloc_noprof include/linux/slab.h:1312 [inline]
gb_operation_message_alloc+0x9b/0x2c0 drivers/greybus/operation.c:380
gb_operation_create_common+0x9f/0x710 drivers/greybus/operation.c:532
gb_operation_create_incoming drivers/greybus/operation.c:644 [inline]
gb_connection_recv_request drivers/greybus/operation.c:926 [inline]
gb_connection_recv+0x1dc/0x1050 drivers/greybus/operation.c:1063
greybus_data_rcvd+0x244/0x600 drivers/greybus/connection.c:89
cport_in_callback+0x1fb/0x280 drivers/greybus/es2.c:840
__usb_hcd_giveback_urb+0x38e/0x610 drivers/usb/core/hcd.c:1657
usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741
dummy_timer+0xdaf/0x3820 drivers/usb/gadget/udc/dummy_hcd.c:2023
__run_hrtimer kernel/time/hrtimer.c:2074 [inline]
__hrtimer_run_queues+0x462/0x9c0 kernel/time/hrtimer.c:2131
hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2148
handle_softirqs+0x1d9/0x9b0 kernel/softirq.c:645
__do_softirq kernel/softirq.c:679 [inline]
invoke_softirq kernel/softirq.c:519 [inline]
__irq_exit_rcu+0x168/0x210 kernel/softirq.c:758
irq_exit_rcu+0x9/0x30 kernel/softirq.c:775
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
The buggy address belongs to the object at ffff88810fb34960
which belongs to the cache kmalloc-8 of size 8
The buggy address is located 2 bytes inside of
allocated 3-byte region [ffff88810fb34960, ffff88810fb34963)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10fb34
flags: 0x200000000000000(node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000000 ffff888100041500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000800080 00000000f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1131, tgid 1131 (kworker/0:2), ts 242767110968
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871
prep_new_page mm/page_alloc.c:1879 [inline]
get_page_from_freelist+0xf4b/0x3440 mm/page_alloc.c:3943
__alloc_frozen_pages_noprof+0x2d7/0x2f70 mm/page_alloc.c:5436
alloc_slab_page mm/slub.c:3347 [inline]
allocate_slab mm/slub.c:3462 [inline]
new_slab+0xa9/0x6e0 mm/slub.c:3513
refill_objects+0xe3/0x410 mm/slub.c:7418
refill_sheaf mm/slub.c:2885 [inline]
__pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4774
alloc_from_pcs mm/slub.c:4850 [inline]
slab_alloc_node mm/slub.c:4984 [inline]
__kmalloc_cache_noprof+0x4a1/0x680 mm/slub.c:5559
_kmalloc_noprof include/linux/slab.h:991 [inline]
m920x_rc_query+0x58/0x750 drivers/media/usb/dvb-usb/m920x.c:184
legacy_dvb_usb_read_remote_control+0x10c/0x4f0 drivers/media/usb/dvb-usb/dvb-usb-remote.c:123
process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396
process_scheduled_works kernel/workqueue.c:3479 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560
kthread+0x373/0x450 kernel/kthread.c:436
ret_from_fork+0x69f/0xc90 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
page last free pid 0 tgid 0 ts 242307251335 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1418 [inline]
__free_frozen_pages+0x714/0xfc0 mm/page_alloc.c:2962
__pagetable_free include/linux/mm.h:3804 [inline]
pagetable_free include/linux/mm.h:3828 [inline]
pagetable_dtor_free include/linux/mm.h:3927 [inline]
__tlb_remove_table include/asm-generic/tlb.h:221 [inline]
__tlb_remove_table_free mm/mmu_gather.c:228 [inline]
tlb_remove_table_rcu+0x2cf/0x380 mm/mmu_gather.c:291
rcu_do_batch kernel/rcu/tree.c:2650 [inline]
rcu_core+0x5f0/0x1260 kernel/rcu/tree.c:2919
handle_softirqs+0x1d9/0x9b0 kernel/softirq.c:645
__do_softirq kernel/softirq.c:679 [inline]
invoke_softirq kernel/softirq.c:519 [inline]
__irq_exit_rcu+0x168/0x210 kernel/softirq.c:758
irq_exit_rcu+0x9/0x30 kernel/softirq.c:775
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
Memory state around the buggy address:
ffff88810fb34800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88810fb34880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88810fb34900: fc fc fc fc fc fc fc fc fc fc fc fc 03 fc fc fc
^
ffff88810fb34980: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
ffff88810fb34a00: fa fc fc fc 04 fc fc fc fa fc fc fc fa fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 05 8f ac 93 0b add $0xb93ac8f,%eax
5: 83 f8 07 cmp $0x7,%eax
8: 0f 87 da 00 00 00 ja 0xe8
e: 48 0f a3 05 1e 0c 85 bt %rax,0x9850c1e(%rip) # 0x9850c34
15: 09
16: 0f 82 c9 02 00 00 jb 0x2e5
1c: 8b 35 be 19 85 09 mov 0x98519be(%rip),%esi # 0x98519e0
22: 85 f6 test %esi,%esi
24: 0f 85 c7 00 00 00 jne 0xf1
* 2a: 48 8b 44 24 30 mov 0x30(%rsp),%rax <-- trapping instruction
2f: 65 48 2b 05 2d ac 93 sub %gs:0xb93ac2d(%rip),%rax # 0xb93ac64
36: 0b
37: 0f 85 09 03 00 00 jne 0x346
3d: 48 rex.W
3e: 83 .byte 0x83
3f: c4 .byte 0xc4