==================================================================
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 ffff888134da8ee2 by task syz.2.1080/9035
CPU: 0 UID: 0 PID: 9035 Comm: syz.2.1080 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
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+0xdb2/0x3700 drivers/usb/gadget/udc/dummy_hcd.c:2019
__run_hrtimer kernel/time/hrtimer.c:2067 [inline]
__hrtimer_run_queues+0x462/0x9c0 kernel/time/hrtimer.c:2124
hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2141
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+0x192/0x210 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+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:mas_ascend+0x15b/0xb50 lib/maple_tree.c:981
Code: 00 00 00 44 89 f9 48 d3 eb 41 89 df e8 ce 4e 36 fa 48 8d 7d 4d 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f b6 04 02 <48> 89 fa 83 e2 07 38 d0 7f 08 84 c0 0f 85 c9 08 00 00 48 b8 00 00
RSP: 0018:ffffc9001571f3e8 EFLAGS: 00000a03
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 1ffff92002ae3ecb RSI: ffffffff877e8122 RDI: ffffc9001571f65d
RBP: ffffc9001571f610 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000001 R12: ffff8881121f3c00
R13: ffff8881121f3a18 R14: ffffc9001571f628 R15: 0000000000000001
mas_next_node+0xb1/0x1020 lib/maple_tree.c:4045
mas_next_slot+0x875/0x1960 lib/maple_tree.c:4156
mas_find+0x2ad/0x740 lib/maple_tree.c:5389
vma_next include/linux/mm.h:1676 [inline]
validate_mm+0x11d/0x4e0 mm/vma.c:668
__split_vma+0x102c/0x17d0 mm/vma.c:585
split_vma mm/vma.c:614 [inline]
vma_modify+0x1a2c/0x2290 mm/vma.c:1736
vma_modify_flags+0x1ef/0x350 mm/vma.c:1764
mprotect_fixup+0x27a/0xe00 mm/mprotect.c:824
do_mprotect_pkey+0xa51/0xdd0 mm/mprotect.c:1002
__do_sys_mprotect mm/mprotect.c:1023 [inline]
__se_sys_mprotect mm/mprotect.c:1020 [inline]
__x64_sys_mprotect+0x78/0xc0 mm/mprotect.c:1020
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fba6cdeded7
Code: 89 38 eb 84 0f 1f 80 00 00 00 00 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 48 c7 c0 ff ff ff ff e9 7a ff ff ff b8 0a 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fffad575af8 EFLAGS: 00000206 ORIG_RAX: 000000000000000a
RAX: ffffffffffffffda RBX: 00007fba6b8056c0 RCX: 00007fba6cdeded7
RDX: 0000000000000003 RSI: 0000000000020000 RDI: 00007fba6b7e6000
RBP: 0000000000000000 R08: 00000000ffffffff R09: 0000000000000000
R10: 0000000000021000 R11: 0000000000000206 R12: 00007fffad575c50
R13: ffffffffffffffc0 R14: 0000000000001000 R15: 0000000000000000
Allocated by task 9035:
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:398 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:415
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+0xdb2/0x3700 drivers/usb/gadget/udc/dummy_hcd.c:2019
__run_hrtimer kernel/time/hrtimer.c:2067 [inline]
__hrtimer_run_queues+0x462/0x9c0 kernel/time/hrtimer.c:2124
hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2141
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+0x192/0x210 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+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 ffff888134da8ee0
which belongs to the cache kmalloc-8 of size 8
The buggy address is located 2 bytes inside of
allocated 3-byte region [ffff888134da8ee0, ffff888134da8ee3)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x134da8
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 0xd2c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5246, tgid 5246 (kworker/0:3), ts 106158048581
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/0x3430 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:7410
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]
usb_control_msg+0xbc/0x4b0 drivers/usb/core/message.c:157
usb_get_string+0xab/0x1a0 drivers/usb/core/message.c:902
usb_string_sub+0x103/0x3b0 drivers/usb/core/message.c:941
usb_string+0x2ff/0x570 drivers/usb/core/message.c:1046
usb_cache_string+0x7c/0x100 drivers/usb/core/message.c:1090
usb_enumerate_device drivers/usb/core/hub.c:2547 [inline]
usb_new_device.part.0+0x238/0x1686 drivers/usb/core/hub.c:2678
usb_new_device drivers/usb/core/hub.c:5833 [inline]
hub_port_connect drivers/usb/core/hub.c:5580 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5720 [inline]
port_event drivers/usb/core/hub.c:5884 [inline]
hub_event.cold+0x51a/0xe9d drivers/usb/core/hub.c:5966
process_one_work+0xac7/0x1b10 kernel/workqueue.c:3387
process_scheduled_works kernel/workqueue.c:3470 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3551
page last free pid 14 tgid 14 ts 106135343283 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:3745 [inline]
pagetable_free include/linux/mm.h:3769 [inline]
pagetable_dtor_free include/linux/mm.h:3868 [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
run_ksoftirqd kernel/softirq.c:1108 [inline]
run_ksoftirqd+0x38/0x60 kernel/softirq.c:1100
smpboot_thread_fn+0x3d3/0xab0 kernel/smpboot.c:160
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
Memory state around the buggy address:
ffff888134da8d80: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
ffff888134da8e00: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
>ffff888134da8e80: fa fc fc fc fa fc fc fc fa fc fc fc 03 fc fc fc
^
ffff888134da8f00: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
ffff888134da8f80: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 00 00 add %al,(%rax)
2: 00 44 89 f9 add %al,-0x7(%rcx,%rcx,4)
6: 48 d3 eb shr %cl,%rbx
9: 41 89 df mov %ebx,%r15d
c: e8 ce 4e 36 fa call 0xfa364edf
11: 48 8d 7d 4d lea 0x4d(%rbp),%rdi
15: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
1c: fc ff df
1f: 48 89 fa mov %rdi,%rdx
22: 48 c1 ea 03 shr $0x3,%rdx
26: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax
* 2a: 48 89 fa mov %rdi,%rdx <-- trapping instruction
2d: 83 e2 07 and $0x7,%edx
30: 38 d0 cmp %dl,%al
32: 7f 08 jg 0x3c
34: 84 c0 test %al,%al
36: 0f 85 c9 08 00 00 jne 0x905
3c: 48 rex.W
3d: b8 .byte 0xb8