anolis-cloud-kernel/drivers/remoteproc
Aleksandr Mishin dfa30b1558 remoteproc: imx_rproc: Skip over memory region when node value is NULL
ANBZ: #12926

commit 2fa26ca8b7 upstream.

In imx_rproc_addr_init() "nph = of_count_phandle_with_args()" just counts
number of phandles. But phandles may be empty. So of_parse_phandle() in
the parsing loop (0 < a < nph) may return NULL which is later dereferenced.
Adjust this issue by adding NULL-return check.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: a0ff4aa6f0 ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver")
Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240606075204.12354-1-amishin@t-argos.ru
[Fixed title to fit within the prescribed 70-75 charcters]
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Fixes: CVE-2024-43860
Signed-off-by: Guanghui Feng <guanghuifeng@linux.alibaba.com>
Reviewed-by: Guixin Liu <kanie@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/4976
2025-03-31 02:12:56 +00:00
..
Kconfig
Makefile
da8xx_remoteproc.c
imx_rproc.c remoteproc: imx_rproc: Skip over memory region when node value is NULL 2025-03-31 02:12:56 +00:00
ingenic_rproc.c
keystone_remoteproc.c
mtk_common.h
mtk_scp.c
mtk_scp_ipi.c
omap_remoteproc.c
omap_remoteproc.h
qcom_common.c
qcom_common.h
qcom_pil_info.c
qcom_pil_info.h
qcom_q6v5.c
qcom_q6v5.h
qcom_q6v5_adsp.c remoteproc: qcom: Fix missing of_node_put in adsp_alloc_memory_region 2022-04-08 14:40:26 +02:00
qcom_q6v5_mss.c remoteproc: qcom_q6v5_mss: Fix some leaks in q6v5_alloc_memory_region 2022-04-08 14:40:26 +02:00
qcom_q6v5_pas.c
qcom_q6v5_wcss.c
qcom_sysmon.c
qcom_wcnss.c remoteproc: qcom_wcnss: Add missing of_node_put() in wcnss_alloc_memory_region 2022-04-08 14:40:26 +02:00
qcom_wcnss.h
qcom_wcnss_iris.c
remoteproc_cdev.c
remoteproc_core.c remoteproc: Fix dma_mem leak after rproc_shutdown 2024-08-09 06:40:17 +00:00
remoteproc_coredump.c
remoteproc_debugfs.c remoteproc: Fix count check in rproc_coredump_write() 2022-04-08 14:39:51 +02:00
remoteproc_elf_helpers.h
remoteproc_elf_loader.c
remoteproc_internal.h
remoteproc_sysfs.c
remoteproc_virtio.c virtio: record the maximum queue num supported by the device. 2024-05-15 06:32:36 +00:00
st_remoteproc.c
st_slim_rproc.c
stm32_rproc.c
ti_k3_dsp_remoteproc.c
ti_k3_r5_remoteproc.c
ti_sci_proc.h
wkup_m3_rproc.c