Files
Rafael Ortolan 244a84a926 driver/usb: Fix buffer overflow issue detected by KASAN
Fix stack-out-of-bounds issue detected by KASAN, which could result
in random kernel memory corruptions:

[685:tcpc_event_type]==================================================================
[685:tcpc_event_type]BUG: KASAN: stack-out-of-bounds in mt6360_transmit+0xec/0x260
[685:tcpc_event_type]Write of size 28 at addr ffffffe6ca09f963 by task tcpc_event_type/685
[685:tcpc_event_type]
[685:tcpc_event_type]CPU: 1 PID: 685 Comm: tcpc_event_type Tainted: G S      W  O    4.14.186+ #1
[685:tcpc_event_type]Hardware name: MT6853V/NZA (DT)
[685:tcpc_event_type]Call trace:
[685:tcpc_event_type] dump_backtrace+0x0/0x374
[685:tcpc_event_type] show_stack+0x20/0x2c
[685:tcpc_event_type] dump_stack+0x148/0x1b8
[685:tcpc_event_type] print_address_description+0x70/0x248
[685:tcpc_event_type] __kasan_report+0x150/0x180
[685:tcpc_event_type] kasan_report+0x10/0x18
[685:tcpc_event_type] check_memory_region+0x18c/0x198
[685:tcpc_event_type] memcpy+0x48/0x68
[685:tcpc_event_type] mt6360_transmit+0xec/0x260
[685:tcpc_event_type] tcpci_transmit+0xb8/0xe4
[685:tcpc_event_type] pd_send_message+0x238/0x388
[685:tcpc_event_type] pd_reply_svdm_request+0x1f0/0x2f8
[685:tcpc_event_type] pd_dpm_ufp_request_id_info+0xcc/0x188
[685:tcpc_event_type] pe_ufp_vdm_get_identity_entry+0x1c/0x28
[685:tcpc_event_type] pd_handle_event+0x3cc/0x74c
[685:tcpc_event_type] pd_policy_enGine_run+0x18c/0x748
[685:tcpc_event_type] tcpc_event_thread_fn+0x1b4/0x32c
[685:tcpc_event_type] kthread+0x2a8/0x2c0
[685:tcpc_event_type] ret_from_fork+0x10/0x18
[685:tcpc_event_type]==================================================================

Change-Id: I25ee1b2457592d470619f3bea1fb3fc1a2bc678c
Reviewed-on: https://gerrit.mot.com/2320832
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Murilo Alves <alvesm@motorola.com>
Reviewed-by: Gilberto Gambugge Neto <gambugge@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
Signed-off-by: Murilo Alves <alvesm@motorola.com>
Reviewed-on: https://gerrit.mot.com/2334041
Reviewed-by: Rafael Ortolan <rafones@motorola.com>
Reviewed-by: Zhihong Kang <kangzh@motorola.com>
2025-12-13 16:31:14 +00:00
..
2025-10-18 10:51:07 +00:00
2024-06-02 15:10:57 +01:00
2024-06-02 15:10:55 +01:00
2025-10-18 10:51:01 +00:00
2025-10-18 10:51:03 +00:00
2025-10-18 10:51:02 +00:00
2022-02-10 17:34:26 +08:00
2025-10-18 10:51:03 +00:00