================================================================== 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+0x242/0x280 drivers/greybus/operation.c:385 Write of size 2 at addr ffff88802bb5a022 by task syz.0.17/5842 CPU: 0 UID: 0 PID: 5842 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 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 gb_operation_message_init drivers/greybus/operation.c:341 [inline] gb_operation_message_alloc+0x242/0x280 drivers/greybus/operation.c:385 gb_operation_create_common+0xa9/0x650 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+0x284/0x1280 drivers/greybus/operation.c:1063 greybus_data_rcvd+0x22c/0x550 drivers/greybus/connection.c:89 cport_in_callback+0x1bd/0x3b0 drivers/greybus/es2.c:840 __usb_hcd_giveback_urb+0x378/0x540 drivers/usb/core/hcd.c:1657 dummy_timer+0xa91/0x4cf0 drivers/usb/gadget/udc/dummy_hcd.c:2019 __run_hrtimer kernel/time/hrtimer.c:2067 [inline] __hrtimer_run_queues+0x3bc/0xa10 kernel/time/hrtimer.c:2124 hrtimer_run_softirq+0x1e3/0x2e0 kernel/time/hrtimer.c:2141 handle_softirqs+0x226/0x860 kernel/softirq.c:645 __do_softirq kernel/softirq.c:679 [inline] invoke_softirq kernel/softirq.c:519 [inline] __irq_exit_rcu+0xcb/0x220 kernel/softirq.c:767 irq_exit_rcu+0x9/0x30 kernel/softirq.c:784 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:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:211 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x47/0x80 kernel/locking/spinlock.c:221 Code: f7 e8 5d b5 bc f5 f7 c3 00 02 00 00 74 05 e8 50 f2 e8 f5 9c 58 a9 00 02 00 00 75 29 f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 f4 ce ad f5 65 48 8b 05 9c 71 ad 07 48 85 c0 74 18 5b 41 5e c3 RSP: 0018:ffffc900033df7a0 EFLAGS: 00000206 RAX: 0000000000000006 RBX: 0000000000000246 RCX: 8000000000000001 RDX: 0000000000000000 RSI: ffffffff8e474d42 RDI: 0000000000000001 RBP: 0000000000000008 R08: ffffffff907a187f R09: 1ffffffff20f430f R10: dffffc0000000000 R11: fffffbfff20f4310 R12: ffff888074b43020 R13: 1ffff1100502a018 R14: ffff888028150000 R15: dffffc0000000000 spin_unlock_irqrestore include/linux/spinlock.h:425 [inline] dummy_queue+0x477/0x900 drivers/usb/gadget/udc/dummy_hcd.c:769 usb_ep_queue+0xf1/0x3c0 drivers/usb/gadget/udc/core.c:305 raw_process_ep_io+0x5e4/0xd80 drivers/usb/gadget/legacy/raw_gadget.c:1114 raw_ioctl_ep_write drivers/usb/gadget/legacy/raw_gadget.c:1153 [inline] raw_ioctl+0x251c/0x41c0 drivers/usb/gadget/legacy/raw_gadget.c:1325 __do_compat_sys_ioctl fs/ioctl.c:695 [inline] __se_compat_sys_ioctl fs/ioctl.c:638 [inline] __ia32_compat_sys_ioctl+0x5ea/0x950 fs/ioctl.c:638 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline] __do_fast_syscall_32+0x27a/0x6a0 arch/x86/entry/syscall_32.c:291 do_fast_syscall_32+0x33/0x70 arch/x86/entry/syscall_32.c:316 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf70af0ec Code: 90 85 d2 74 0a 89 ce 81 e6 ff 0f 00 00 89 32 85 c0 74 05 c1 e9 0c 89 08 31 c0 5e 5d c3 90 0f 1f 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 58 b8 RSP: 002b:00000000f68a44b4 EFLAGS: 00000206 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000040085507 RDX: 00000000f68a44f8 RSI: 00000000f7477ff4 RDI: 00000000f68a4504 RBP: 00000000f68a5518 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 5842: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5414 [inline] __kmalloc_noprof+0x36b/0x720 mm/slub.c:5439 _kmalloc_noprof include/linux/slab.h:995 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] gb_operation_message_alloc+0x8c/0x280 drivers/greybus/operation.c:380 gb_operation_create_common+0xa9/0x650 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+0x284/0x1280 drivers/greybus/operation.c:1063 greybus_data_rcvd+0x22c/0x550 drivers/greybus/connection.c:89 cport_in_callback+0x1bd/0x3b0 drivers/greybus/es2.c:840 __usb_hcd_giveback_urb+0x378/0x540 drivers/usb/core/hcd.c:1657 dummy_timer+0xa91/0x4cf0 drivers/usb/gadget/udc/dummy_hcd.c:2019 __run_hrtimer kernel/time/hrtimer.c:2067 [inline] __hrtimer_run_queues+0x3bc/0xa10 kernel/time/hrtimer.c:2124 hrtimer_run_softirq+0x1e3/0x2e0 kernel/time/hrtimer.c:2141 handle_softirqs+0x226/0x860 kernel/softirq.c:645 __do_softirq kernel/softirq.c:679 [inline] invoke_softirq kernel/softirq.c:519 [inline] __irq_exit_rcu+0xcb/0x220 kernel/softirq.c:767 irq_exit_rcu+0x9/0x30 kernel/softirq.c:784 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 The buggy address belongs to the object at ffff88802bb5a020 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 2 bytes inside of allocated 3-byte region [ffff88802bb5a020, ffff88802bb5a023) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2bb5a flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801b041500 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 0xd2c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 11897549784 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab+0x7d/0x620 mm/slub.c:3462 new_slab mm/slub.c:3513 [inline] refill_objects+0x2d5/0x350 mm/slub.c:7410 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] __kmalloc_cache_noprof+0x39b/0x600 mm/slub.c:5559 _kmalloc_noprof include/linux/slab.h:991 [inline] usb_control_msg+0x73/0x3e0 drivers/usb/core/message.c:157 hub_power_on+0x1b6/0x460 arch/x86/include/asm/bitops.h:-1 hub_activate+0x363/0x1b20 drivers/usb/core/hub.c:1144 hub_configure drivers/usb/core/hub.c:1771 [inline] hub_probe+0x28fc/0x3c00 drivers/usb/core/hub.c:2006 usb_probe_interface+0x788/0xe50 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x254/0xae0 drivers/base/dd.c:706 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026 page_owner free stack trace missing Memory state around the buggy address: ffff88802bb59f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802bb59f80: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc >ffff88802bb5a000: fa fc fc fc 03 fc fc fc 06 fc fc fc 07 fc fc fc ^ ffff88802bb5a080: 06 fc fc fc 06 fc fc fc 00 fc fc fc 00 fc fc fc ffff88802bb5a100: 00 fc fc fc 00 fc fc fc 00 fc fc fc 00 fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: f7 e8 imul %eax 2: 5d pop %rbp 3: b5 bc mov $0xbc,%ch 5: f5 cmc 6: f7 c3 00 02 00 00 test $0x200,%ebx c: 74 05 je 0x13 e: e8 50 f2 e8 f5 call 0xf5e8f263 13: 9c pushf 14: 58 pop %rax 15: a9 00 02 00 00 test $0x200,%eax 1a: 75 29 jne 0x45 1c: f7 c3 00 02 00 00 test $0x200,%ebx 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 f4 ce ad f5 call 0xf5adcf23 <-- trapping instruction 2f: 65 48 8b 05 9c 71 ad mov %gs:0x7ad719c(%rip),%rax # 0x7ad71d3 36: 07 37: 48 85 c0 test %rax,%rax 3a: 74 18 je 0x54 3c: 5b pop %rbx 3d: 41 5e pop %r14 3f: c3 ret