android_kernel_xiaomi_sm8450/drivers/remoteproc
Aleksandr Mishin 6b50462b47 remoteproc: imx_rproc: Skip over memory region when node value is NULL
[ Upstream commit 2fa26ca8b786888673689ccc9da6094150939982 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-19 05:41:08 +02:00
..
da8xx_remoteproc.c
imx_rproc.c remoteproc: imx_rproc: Skip over memory region when node value is NULL 2024-08-19 05:41:08 +02:00
ingenic_rproc.c
Kconfig remoteproc: stm32: use correct format strings on 64-bit 2024-03-26 18:22:02 -04:00
keystone_remoteproc.c
Makefile
mtk_common.h
mtk_scp_ipi.c remoteproc/mtk_scp: Move clk ops outside send_lock 2023-03-11 16:40:04 +01:00
mtk_scp.c
omap_remoteproc.c
omap_remoteproc.h
qcom_common.c
qcom_common.h
qcom_pil_info.c
qcom_pil_info.h
qcom_q6v5_adsp.c
qcom_q6v5_mss.c remoteproc: qcom_q6v5_mss: Use a carveout to authenticate modem headers 2023-03-11 16:39:45 +01:00
qcom_q6v5_pas.c remoteproc: qcom_q6v5_pas: Fix missing of_node_put() in adsp_alloc_memory_region() 2023-01-14 10:16:08 +01:00
qcom_q6v5_wcss.c
qcom_q6v5.c
qcom_q6v5.h
qcom_sysmon.c remoteproc: sysmon: fix memory leak in qcom_add_sysmon_subdev() 2023-01-14 10:16:08 +01:00
qcom_wcnss_iris.c
qcom_wcnss.c
qcom_wcnss.h
remoteproc_cdev.c
remoteproc_core.c remoteproc: Add new get_loaded_rsc_table() to rproc_ops 2024-03-26 18:22:01 -04:00
remoteproc_coredump.c
remoteproc_debugfs.c
remoteproc_elf_helpers.h
remoteproc_elf_loader.c
remoteproc_internal.h remoteproc: Add new get_loaded_rsc_table() to rproc_ops 2024-03-26 18:22:01 -04:00
remoteproc_sysfs.c
remoteproc_virtio.c
st_remoteproc.c remoteproc: st: Call of_node_put() on iteration error 2023-05-17 11:48:15 +02:00
st_slim_rproc.c
stm32_rproc.c remoteproc: stm32: fix phys_addr_t format string 2024-03-26 18:22:04 -04:00
ti_k3_dsp_remoteproc.c
ti_k3_r5_remoteproc.c remoteproc: k3-r5: Jump to error handling labels in start/stop errors 2024-07-05 09:12:32 +02:00
ti_sci_proc.h
wkup_m3_rproc.c