==================================================================
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 ffff888035fd4a82 by task dhcpcd-run-hook/5963
CPU: 0 UID: 0 PID: 5963 Comm: dhcpcd-run-hook 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:ptlock_ptr include/linux/mm.h:3982 [inline]
RIP: 0010:pte_lockptr include/linux/mm.h:4006 [inline]
RIP: 0010:pte_offset_map_lock+0x127/0x210 mm/pgtable-generic.c:422
Code: ff e8 cd 79 9b ff 4d 21 f5 49 c1 ed 06 4d 01 fd 49 83 c5 28 4c 89 e8 48 c1 e8 03 49 be 00 00 00 00 00 fc ff df 42 80 3c 30 00 <74> 08 4c 89 ef e8 df 3d 15 00 4d 8b 6d 00 4c 89 ef e8 c3 8a f4 09
RSP: 0018:ffffc9000382f288 EFLAGS: 00000246
RAX: 1ffffd40003e4c15 RBX: ffff8880348e9f20 RCX: ffff88802a64be80
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 000000007c982067 R08: ffffffff822dd969 R09: 0000000000000000
R10: ffffc9000382f520 R11: fffff52000705ea6 R12: 1ffff1100691d3e4
R13: ffffea0001f260a8 R14: dffffc0000000000 R15: ffffea0000000000
copy_pte_range mm/memory.c:1298 [inline]
copy_pmd_range+0x6a7/0x5c00 mm/memory.c:1453
copy_pud_range mm/memory.c:1488 [inline]
copy_p4d_range mm/memory.c:1512 [inline]
copy_page_range+0xcf9/0x1320 mm/memory.c:1598
dup_mmap+0xdd7/0x1c80 mm/mmap.c:1813
dup_mm kernel/fork.c:1551 [inline]
copy_mm+0x2ae/0x640 kernel/fork.c:1604
copy_process+0x1ecc/0x4510 kernel/fork.c:2330
kernel_clone+0x2d7/0x940 kernel/fork.c:2800
__do_sys_clone kernel/fork.c:2942 [inline]
__se_sys_clone kernel/fork.c:2926 [inline]
__x64_sys_clone+0x1b6/0x230 kernel/fork.c:2926
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x16a/0x530 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x00007f473c799636
Code: 89 df e8 6d e8 f6 ff 45 31 c0 31 d2 31 f6 64 48 8b 04 25 10 00 00 00 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 52 89 c5 85 c0 75 31 64 48 8b 04 25 10 00 00
RSP: 002b:00007ffc18eb4ac0 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007ffc18eb4ac8 RCX: 00007f473c799636
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 0000560fa9b59e60 R08: 0000000000000000 R09: 0000560fa9b59c30
R10: 00007f473c5fff50 R11: 0000000000000246 R12: 0000560fa9b5db40
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Allocated by task 5963:
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 ffff888035fd4a80
which belongs to the cache kmalloc-8 of size 8
The buggy address is located 2 bytes inside of
allocated 3-byte region [ffff888035fd4a80, ffff888035fd4a83)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888035fd4de0 pfn:0x35fd4
flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000200 ffff88813fe3b500 ffffea0000a3e7d0 ffffea0000a8d4d0
raw: ffff888035fd4de0 0000000000800073 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 1, tgid 1 (swapper/0), ts 25821870388
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
kobject_set_name_vargs+0x61/0x110 lib/kobject.c:274
kobject_add_varg lib/kobject.c:368 [inline]
kobject_init_and_add+0xee/0x1a0 lib/kobject.c:457
lookup_or_create_module_kobject+0xf1/0x180 kernel/params.c:781
kernel_add_sysfs_param+0x14/0xe0 kernel/params.c:804
param_sysfs_builtin+0x199/0x250 kernel/params.c:852
param_sysfs_builtin_init+0x23/0x30 kernel/params.c:988
do_one_initcall+0x250/0x870 init/main.c:1419
page_owner free stack trace missing
Memory state around the buggy address:
ffff888035fd4980: fa fc fc fc fa fc fc fc 07 fc fc fc 07 fc fc fc
ffff888035fd4a00: fa fc fc fc 00 fc fc fc 00 fc fc fc 00 fc fc fc
>ffff888035fd4a80: 03 fc fc fc 07 fc fc fc 07 fc fc fc 06 fc fc fc
^
ffff888035fd4b00: 05 fc fc fc 05 fc fc fc fa fc fc fc 00 fc fc fc
ffff888035fd4b80: 06 fc fc fc 06 fc fc fc 06 fc fc fc fa fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: ff ljmp (bad)
1: e8 cd 79 9b ff call 0xff9b79d3
6: 4d 21 f5 and %r14,%r13
9: 49 c1 ed 06 shr $0x6,%r13
d: 4d 01 fd add %r15,%r13
10: 49 83 c5 28 add $0x28,%r13
14: 4c 89 e8 mov %r13,%rax
17: 48 c1 e8 03 shr $0x3,%rax
1b: 49 be 00 00 00 00 00 movabs $0xdffffc0000000000,%r14
22: fc ff df
25: 42 80 3c 30 00 cmpb $0x0,(%rax,%r14,1)
* 2a: 74 08 je 0x34 <-- trapping instruction
2c: 4c 89 ef mov %r13,%rdi
2f: e8 df 3d 15 00 call 0x153e13
34: 4d 8b 6d 00 mov 0x0(%r13),%r13
38: 4c 89 ef mov %r13,%rdi
3b: e8 c3 8a f4 09 call 0x9f48b03