CVE-2026-138843

Not scored yetLast modified Nov 30, 2026

Description

In the Linux kernel, the following vulnerability has been resolved:

usb: typec: ucsi: ccg: Validate altmode index in GET_CURRENT_CAM response

When the PPM reports more than one DisplayPort alternate mode for a connector, ucsi_ccg_update_altmodes() merges them into a single entry in uc->updated[] and sets uc->has_multiple_dp. In that case, ucsi_ccg_update_get_current_cam_cmd() rewrites the response of the GET_CURRENT_CAM command. The response is a single byte holding the index of the currently active alternate mode, and it is provided by the PPM firmware.

The function uses this byte directly as an index into uc->orig[], and then uses the linked_idx read from that entry as the translated index into uc->updated[]. Both arrays have UCSI_MAX_ALTMODES entries, but neither index is checked against that size.

If a malicious or buggy PPM reports a value of UCSI_MAX_ALTMODES or larger, e.g. 0xFF, uc->orig[cam].linked_idx reads over the end of uc->orig[]. The byte read from there is then used as the index for writing cam into uc->updated[new_cam].active_idx, so the out-of-bounds read is followed by an out-of-bounds write. This happens without any userspace action, since the UCSI core issues GET_CURRENT_CAM on its own when handling connector changes.

Fix this by rejecting responses whose index is out of range, printing an error and returning -EPROTO, so that the caller cannot accept this. Also check linked_idx before using it as an index, so that the write into uc->updated[] is always within bounds.

The response is now only processed when the command completed without an error. ucsi_sync_control_common() only reads the response when the CCI reports command completion, so otherwise the buffer is not filled and must not be mistaken for an invalid index.

This bug was found with a Python script that traces where firmware input is used.

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Nov 30, 2026
Last modified
Nov 30, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-138844In the Linux kernel, the following vulnerability has been resolved: usb: core: don't set drvdata to NULL in usb_unbind_interface() usb_unbCVE-2026-138845In the Linux kernel, the following vulnerability has been resolved: cxl/port: Clear cached dport pointers when a dport is removed Switch dCVE-2026-138846In the Linux kernel, the following vulnerability has been resolved: vfio/mlx5: Fix boundary check in set_report_output() Use > instead of CVE-2026-138847In the Linux kernel, the following vulnerability has been resolved: xen-blkfront: Fix IO race during unplug During unplug, blkfront stops CVE-2026-138848In the Linux kernel, the following vulnerability has been resolved: slimbus: messaging: fix leaked PM vote on tid allocation failure In slCVE-2026-1388497.8In the Linux kernel, the following vulnerability has been resolved: misc: fastrpc: Allocate entire reserved memory for Audio PD in probe ACVE-2026-138858.8Use after free in Skia in Google Chrome on Android prior to 150.0.7871.47 allowed a remote attacker to execute arbitrary code inside a sandbCVE-2026-1388507.8In the Linux kernel, the following vulnerability has been resolved: misc: fastrpc: fix double-free in fastrpc_map_attach() error path map-CVE-2026-138851In the Linux kernel, the following vulnerability has been resolved: USB: cdc-acm: fix urb leak on disconnect Make sure to drop the referenCVE-2026-1388528.4In the Linux kernel, the following vulnerability has been resolved: wifi: ath12k: validate MAC/PHY capability count before saving FirmwareCVE-2026-1388537.0In the Linux kernel, the following vulnerability has been resolved: drm/ttm: return an error when kmapping a BO without pages ttm_tt objecCVE-2026-1388547.8In the Linux kernel, the following vulnerability has been resolved: iommu/dma: Catch scatterlist length overflows It is possible, when a v
CVE-2026-138843: Unscored | Vulnix