==================================================================
BUG: KASAN: slab-out-of-bounds in gb_operation_message_init drivers/greybus/operation.c:340 [inline]
BUG: KASAN: slab-out-of-bounds in gb_operation_message_alloc+0x256/0x2c0 drivers/greybus/operation.c:385
Write of size 2 at addr ffff88813697a760 by task syz.0.7059/5464
CPU: 0 UID: 0 PID: 5464 Comm: syz.0.7059 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/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:340 [inline]
gb_operation_message_alloc+0x256/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:1658
usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1742
dummy_timer+0xdb5/0x3840 drivers/usb/gadget/udc/dummy_hcd.c:2051
__run_hrtimer kernel/time/hrtimer.c:2079 [inline]
__hrtimer_run_queues+0x448/0x9a0 kernel/time/hrtimer.c:2136
hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2153
handle_softirqs+0x209/0xa00 kernel/softirq.c:669
__do_softirq kernel/softirq.c:703 [inline]
invoke_softirq kernel/softirq.c:542 [inline]
__irq_exit_rcu+0x17a/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: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:finish_task_switch.isra.0+0x214/0xad0 kernel/sched/core.c:5466
Code: 74 08 3c 03 0f 8e aa 06 00 00 c7 83 40 0d 00 00 00 00 00 00 48 8d 7b 48 e8 19 11 1f 06 e8 94 e7 38 00 fb 49 8d bf 38 16 00 00 <48> b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f b6 04 02 84
RSP: 0018:ffffc900031af970 EFLAGS: 00000202
RAX: 000000000000099d RBX: ffff8881f563a8c0 RCX: 0000000000000000
RDX: 0000000000000001 RSI: ffffffff8951fb56 RDI: ffff88812012d2b8
RBP: ffffc900031af9b0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88811deadac0
R13: 0000000000000000 R14: ffff8881f563b600 R15: ffff88812012bc80
context_switch kernel/sched/core.c:5618 [inline]
__schedule+0x132b/0x4970 kernel/sched/core.c:7437
__schedule_loop kernel/sched/core.c:7514 [inline]
schedule+0xdd/0x2c0 kernel/sched/core.c:7529
futex_do_wait+0x8a/0x180 kernel/futex/waitwake.c:387
__futex_wait+0x1c4/0x360 kernel/futex/waitwake.c:722
futex_wait+0xe6/0x370 kernel/futex/waitwake.c:750
do_futex+0x265/0x440 kernel/futex/syscalls.c:133
__do_sys_futex kernel/futex/syscalls.c:210 [inline]
__se_sys_futex kernel/futex/syscalls.c:191 [inline]
__x64_sys_futex+0x34f/0x4d0 kernel/futex/syscalls.c:191
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x119/0x730 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f8184519b59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007f8182f670e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 00007f81847a5fa8 RCX: 00007f8184519b59
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f81847a5fa8
RBP: 00007f81847a5fa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f81847a6038 R14: 00007ffc7c69ec00 R15: 00007ffc7c69ece8
Allocated by task 5464:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x40 mm/kasan/common.c:79
poison_kmalloc_redzone mm/kasan/common.c:412 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:429
kasan_kmalloc include/linux/kasan.h:267 [inline]
__do_kmalloc_node mm/slub.c:5531 [inline]
__kmalloc_noprof+0x315/0x7e0 mm/slub.c:5556
_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:1658
usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1742
dummy_timer+0xdb5/0x3840 drivers/usb/gadget/udc/dummy_hcd.c:2051
__run_hrtimer kernel/time/hrtimer.c:2079 [inline]
__hrtimer_run_queues+0x448/0x9a0 kernel/time/hrtimer.c:2136
hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2153
handle_softirqs+0x209/0xa00 kernel/softirq.c:669
__do_softirq kernel/softirq.c:703 [inline]
invoke_softirq kernel/softirq.c:542 [inline]
__irq_exit_rcu+0x17a/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: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 ffff88813697a760
which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
allocated 1-byte region [ffff88813697a760, ffff88813697a761)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13697a
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 5332, tgid 5332 (kworker/1:3), ts 142056207978
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1873
prep_new_page mm/page_alloc.c:1881 [inline]
get_page_from_freelist+0x9da/0x2970 mm/page_alloc.c:3963
__alloc_frozen_pages_noprof+0x2a7/0x2f80 mm/page_alloc.c:5505
alloc_slab_page mm/slub.c:3384 [inline]
allocate_slab mm/slub.c:3499 [inline]
new_slab+0xb1/0x6d0 mm/slub.c:3550
refill_objects+0xe3/0x410 mm/slub.c:7546
refill_sheaf mm/slub.c:2917 [inline]
__pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4811
alloc_from_pcs mm/slub.c:4887 [inline]
slab_alloc_node mm/slub.c:5021 [inline]
__kmalloc_cache_noprof+0x49c/0x680 mm/slub.c:5676
_kmalloc_noprof include/linux/slab.h:991 [inline]
usb_control_msg+0xbc/0x4b0 drivers/usb/core/message.c:157
reg_w+0x136/0x190 drivers/media/usb/gspca/conex.c:110
cx11646_jpegInit drivers/media/usb/gspca/conex.c:595 [inline]
sd_init+0xeb8/0x13d0 drivers/media/usb/gspca/conex.c:765
gspca_dev_probe2+0xad0/0x15dd drivers/media/usb/gspca/gspca.c:1527
gspca_dev_probe.cold+0x1a/0xb9 drivers/media/usb/gspca/gspca.c:1603
usb_probe_interface+0x386/0x980 drivers/usb/core/driver.c:399
call_driver_probe drivers/base/dd.c:629 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:707
__driver_probe_device+0x210/0x460 drivers/base/dd.c:869
driver_probe_device+0x4a/0x140 drivers/base/dd.c:899
page last free pid 23 tgid 23 ts 141600166667 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1415 [inline]
__free_frozen_pages+0x792/0x1060 mm/page_alloc.c:2971
rcu_do_batch kernel/rcu/tree.c:2650 [inline]
rcu_core+0x5f0/0x1220 kernel/rcu/tree.c:2919
handle_softirqs+0x209/0xa00 kernel/softirq.c:669
run_ksoftirqd kernel/softirq.c:1133 [inline]
run_ksoftirqd+0x38/0x60 kernel/softirq.c:1125
smpboot_thread_fn+0x41f/0xb90 kernel/smpboot.c:162
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:
ffff88813697a600: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
ffff88813697a680: fa fc fc fc 06 fc fc fc fa fc fc fc fa fc fc fc
>ffff88813697a700: fa fc fc fc fa fc fc fc fa fc fc fc 01 fc fc fc
^
ffff88813697a780: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
ffff88813697a800: fa fc fc fc 00 fc fc fc fa fc fc fc fa fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 74 08 je 0xa
2: 3c 03 cmp $0x3,%al
4: 0f 8e aa 06 00 00 jle 0x6b4
a: c7 83 40 0d 00 00 00 movl $0x0,0xd40(%rbx)
11: 00 00 00
14: 48 8d 7b 48 lea 0x48(%rbx),%rdi
18: e8 19 11 1f 06 call 0x61f1136
1d: e8 94 e7 38 00 call 0x38e7b6
22: fb sti
23: 49 8d bf 38 16 00 00 lea 0x1638(%r15),%rdi
* 2a: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax <-- trapping instruction
31: fc ff df
34: 48 89 fa mov %rdi,%rdx
37: 48 c1 ea 03 shr $0x3,%rdx
3b: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax
3f: 84 .byte 0x84