soundwire: qcom: fix storing port config out-of-bounds
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
soundwire: qcom: fix storing port config out-of-bounds
The 'qcom_swrm_ctrl->pconfig' has size of QCOM_SDW_MAX_PORTS (14), however we index it starting from 1, not 0, to match real port numbers. This can lead to writing port config past 'pconfig' bounds and overwriting next member of 'qcom_swrm_ctrl' struct. Reported also by smatch:
drivers/soundwire/qcom.c:1269 qcom_swrm_get_port_config() error: buffer overflow 'ctrl->pconfig' 14 <= 14
From the CVE record · Linux
The Qualcomm SoundWire driver can write a port configuration past the end of its pconfig array, overwriting the next member of the controller structure. This can occur because the array has 14 entries but is indexed using port numbers starting at 1. The input does not specify how an attacker could trigger this or whether access or user interaction is required.
Engineers running Linux kernels with the Qualcomm SoundWire driver should check their versions; affected versions are not specified.