==================================================================
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 ffff88806bdb6ee2 by task swapper/0/0
CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/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:1658
dummy_timer+0xa9a/0x4ce0 drivers/usb/gadget/udc/dummy_hcd.c:2051
__run_hrtimer kernel/time/hrtimer.c:2079 [inline]
__hrtimer_run_queues+0x3bc/0xa10 kernel/time/hrtimer.c:2136
hrtimer_run_softirq+0x1e3/0x2e0 kernel/time/hrtimer.c:2153
handle_softirqs+0x265/0x8d0 kernel/softirq.c:669
__do_softirq kernel/softirq.c:703 [inline]
invoke_softirq kernel/softirq.c:542 [inline]
__irq_exit_rcu+0xc6/0x220 kernel/softirq.c:786
irq_exit_rcu+0x9/0x30 kernel/softirq.c:809
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1073 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1073
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:finish_task_switch+0x413/0xc60 kernel/sched/core.c:5434
Code: 04 00 00 41 c7 84 24 20 0e 00 00 00 00 00 00 0f 1f 44 00 00 49 83 c4 48 4c 89 e7 e8 77 4e 8b 0a e8 72 8b 3a 00 fb 4c 8b 65 c8 <49> 8d bc 24 18 17 00 00 48 89 f8 48 c1 e8 03 42 0f b6 04 30 84 c0
RSP: 0018:ffffffff90007a40 EFLAGS: 00000202
RAX: 000000000013dae5 RBX: ffff8880b823d3a0 RCX: 8000000000000001
RDX: 0000000000000000 RSI: ffffffff8e9f0244 RDI: ffffffff8cb01080
RBP: ffffffff90007a90 R08: ffffffff91e120bf R09: 1ffffffff23c2417
R10: dffffc0000000000 R11: fffffbfff23c2418 R12: ffffffff9008efc0
R13: ffffffff9008efc0 R14: dffffc0000000000 R15: 1ffff11017047a74
context_switch kernel/sched/core.c:5586 [inline]
__schedule+0x17e5/0x5830 kernel/sched/core.c:7382
schedule_idle+0x51/0x90 kernel/sched/core.c:7500
do_idle+0x4ad/0x540 kernel/sched/idle.c:384
cpu_startup_entry+0x43/0x60 kernel/sched/idle.c:458
rest_init+0x378/0x3a0 init/main.c:789
start_kernel+0x392/0x3e0 init/main.c:1247
x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:310
x86_64_start_kernel+0x137/0x1b0 arch/x86/kernel/head64.c:291
common_startup_64+0x13e/0x157
Allocated by task 0:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3f/0x90 mm/kasan/common.c:79
poison_kmalloc_redzone mm/kasan/common.c:412 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:429
kasan_kmalloc include/linux/kasan.h:267 [inline]
__do_kmalloc_node mm/slub.c:5527 [inline]
__kmalloc_noprof+0x366/0x710 mm/slub.c:5552
_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:1658
dummy_timer+0xa9a/0x4ce0 drivers/usb/gadget/udc/dummy_hcd.c:2051
__run_hrtimer kernel/time/hrtimer.c:2079 [inline]
__hrtimer_run_queues+0x3bc/0xa10 kernel/time/hrtimer.c:2136
hrtimer_run_softirq+0x1e3/0x2e0 kernel/time/hrtimer.c:2153
handle_softirqs+0x265/0x8d0 kernel/softirq.c:669
__do_softirq kernel/softirq.c:703 [inline]
invoke_softirq kernel/softirq.c:542 [inline]
__irq_exit_rcu+0xc6/0x220 kernel/softirq.c:786
irq_exit_rcu+0x9/0x30 kernel/softirq.c:809
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1073 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1073
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
The buggy address belongs to the object at ffff88806bdb6ee0
which belongs to the cache kmalloc-8 of size 8
The buggy address is located 2 bytes inside of
allocated 3-byte region [ffff88806bdb6ee0, ffff88806bdb6ee3)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88806bdb6ac0 pfn:0x6bdb6
flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000200 ffff88813fe3b500 ffffea0001b3d750 ffffea0001dc4350
raw: ffff88806bdb6ac0 0000000000800037 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 5716, tgid 5716 (syz-executor), ts 130531706770
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1874
prep_new_page+0x22/0xb0 mm/page_alloc.c:1882
get_page_from_freelist+0x22a1/0x22e0 mm/page_alloc.c:3964
__alloc_frozen_pages_noprof+0x211/0x450 mm/page_alloc.c:5506
alloc_slab_page mm/slub.c:3382 [inline]
allocate_slab+0x7d/0x5e0 mm/slub.c:3497
new_slab mm/slub.c:3548 [inline]
refill_objects+0x2d5/0x350 mm/slub.c:7522
refill_sheaf mm/slub.c:2915 [inline]
__pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4807
alloc_from_pcs mm/slub.c:4883 [inline]
slab_alloc_node mm/slub.c:5017 [inline]
__do_kmalloc_node mm/slub.c:5526 [inline]
__kmalloc_node_track_caller_noprof+0x543/0x720 mm/slub.c:5658
__kmemdup_nul mm/util.c:64 [inline]
kstrdup+0x42/0x100 mm/util.c:84
__kernfs_new_node+0xa9/0x980 fs/kernfs/dir.c:663
kernfs_new_node+0xea/0x140 fs/kernfs/dir.c:759
__kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1071
sysfs_add_file_mode_ns+0x237/0x300 fs/sysfs/file.c:316
create_files fs/sysfs/group.c:82 [inline]
internal_create_group+0x679/0x1180 fs/sysfs/group.c:189
internal_create_groups fs/sysfs/group.c:229 [inline]
sysfs_create_groups+0x59/0x120 fs/sysfs/group.c:255
setup_gid_attrs drivers/infiniband/core/sysfs.c:1123 [inline]
ib_setup_port_attrs+0x1780/0x2460 drivers/infiniband/core/sysfs.c:1399
page last free pid 5705 tgid 5705 ts 126332379831 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1416 [inline]
__free_frozen_pages+0xd1a/0xe10 mm/page_alloc.c:2972
tlb_batch_list_free mm/mmu_gather.c:161 [inline]
tlb_finish_mmu+0x13e/0x220 mm/mmu_gather.c:532
exit_mmap+0x4b2/0xa40 mm/mmap.c:1328
__mmput+0x118/0x420 kernel/fork.c:1194
exit_mm+0x18e/0x240 kernel/exit.c:586
do_exit+0x6a8/0x2360 kernel/exit.c:967
do_group_exit+0x22d/0x2f0 kernel/exit.c:1123
get_signal+0x136a/0x1430 kernel/signal.c:3113
arch_do_signal_or_restart+0xbb/0x860 arch/x86/kernel/signal.c:337
__exit_to_user_mode_loop kernel/entry/common.c:66 [inline]
exit_to_user_mode_loop+0x10e/0x770 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:343 [inline]
do_syscall_64+0x32c/0x530 arch/x86/entry/syscall_64.c:107
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88806bdb6d80: 06 fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
ffff88806bdb6e00: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
>ffff88806bdb6e80: fa fc fc fc fa fc fc fc fa fc fc fc 03 fc fc fc
^
ffff88806bdb6f00: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
ffff88806bdb6f80: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 00 00 add %al,(%rax)
2: 41 c7 84 24 20 0e 00 movl $0x0,0xe20(%r12)
9: 00 00 00 00 00
e: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
13: 49 83 c4 48 add $0x48,%r12
17: 4c 89 e7 mov %r12,%rdi
1a: e8 77 4e 8b 0a call 0xa8b4e96
1f: e8 72 8b 3a 00 call 0x3a8b96
24: fb sti
25: 4c 8b 65 c8 mov -0x38(%rbp),%r12
* 29: 49 8d bc 24 18 17 00 lea 0x1718(%r12),%rdi <-- trapping instruction
30: 00
31: 48 89 f8 mov %rdi,%rax
34: 48 c1 e8 03 shr $0x3,%rax
38: 42 0f b6 04 30 movzbl (%rax,%r14,1),%eax
3d: 84 c0 test %al,%al