mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
There are two issues related to the number of ports coming from Devicetree when exceeding in total QCOM_SDW_MAX_PORTS. Both lead to incorrect memory accesses: 1. With DTS having too big value of input or output ports, the driver, when copying port parameters from local/stack arrays into 'pconfig' array in 'struct qcom_swrm_ctrl', will iterate over their sizes. 2. If DTS also has too many parameters for these ports (e.g. qcom,ports-sinterval-low), the driver will overflow buffers on the stack when reading these properties from DTS. Add a sanity check so incorrect DTS will not cause kernel memory corruption. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20230222144412.237832-2-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org> |
||
|---|---|---|
| .. | ||
| bus_type.c | ||
| bus.c | ||
| bus.h | ||
| cadence_master.c | ||
| cadence_master.h | ||
| debugfs.c | ||
| dmi-quirks.c | ||
| generic_bandwidth_allocation.c | ||
| intel_auxdevice.c | ||
| intel_auxdevice.h | ||
| intel_bus_common.c | ||
| intel_init.c | ||
| intel.c | ||
| intel.h | ||
| Kconfig | ||
| Makefile | ||
| master.c | ||
| mipi_disco.c | ||
| qcom.c | ||
| slave.c | ||
| stream.c | ||
| sysfs_local.h | ||
| sysfs_slave_dpn.c | ||
| sysfs_slave.c | ||