OpenCloudOS-Kernel/sound/soc/sof
Peter Ujfalusi 10d93a9819
ASoC: SOF: imx: imx8: Bar index is only valid for IRAM and SRAM types
i.MX8 only uses SOF_FW_BLK_TYPE_IRAM (1) and SOF_FW_BLK_TYPE_SRAM (3)
bars, everything else is left as 0 in sdev->bar[] array.

If a broken or purposefully crafted firmware image is loaded with other
types of FW_BLK_TYPE then a kernel crash can be triggered.

Make sure that only IRAM/SRAM type is converted to bar index.

Fixes: 202acc565a ("ASoC: SOF: imx: Add i.MX8 HW support")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20210915122116.18317-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15 16:23:48 +01:00
..
imx ASoC: SOF: imx: imx8: Bar index is only valid for IRAM and SRAM types 2021-09-15 16:23:48 +01:00
intel ASoC: SOF: intel: remove duplicate include 2021-08-24 19:15:02 +01:00
xtensa ASoC: SOF: Fix DSP oops stack dump output contents 2021-09-15 13:07:51 +01:00
Kconfig ASoC: SOF: add Kconfig option for probe workqueues 2021-04-12 17:05:50 +01:00
Makefile ASoC: SOF: pci: split PCI into different drivers 2021-03-02 15:32:00 +01:00
compress.c ASoC: SOF: Intel: Constify sof_probe_compressed_ops 2021-06-01 14:05:15 +01:00
compress.h ASoC: SOF: Intel: Constify sof_probe_compressed_ops 2021-06-01 14:05:15 +01:00
control.c ASoC: SOF: control: override volume info callback 2020-11-20 13:49:05 +00:00
core.c Merge remote-tracking branch 'asoc/for-5.13' into asoc-next 2021-04-23 19:01:02 +01:00
debug.c ASoC: SOF: remove superfluous NULL check in debugfs read 2021-03-16 13:25:46 +00:00
ipc.c ASoC: SOF: relax ABI checks and avoid unnecessary warnings 2021-02-11 17:31:56 +00:00
loader.c ASoC: SOF: loader: Use snd_sof_dsp_block_read() instead sof_block_read() 2021-05-21 13:13:38 +01:00
nocodec.c ASOC: SOF: simplify nocodec mode 2021-04-12 17:05:55 +01:00
ops.c ASoC: SOF: modify the SOF_DBG flags 2020-12-11 13:22:57 +00:00
ops.h ASoC: SOF: ops: don't return void value 2021-05-21 13:13:40 +01:00
pcm.c ASoC: SOF: pcm: export snd_pcm_dai_link_fixup 2021-04-12 17:05:54 +01:00
pm.c ASoC: SOF: reset enabled_cores state at suspend 2021-06-01 14:03:01 +01:00
probe.c ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only 2020-05-01 17:45:24 +01:00
probe.h ASoC: SOF: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
sof-acpi-dev.c ASoC: SOF: Check desc->ops directly in acpi/pci/of probe functions 2021-05-21 13:13:35 +01:00
sof-acpi-dev.h ASoC: SOF: ACPI: avoid reverse module dependency 2021-03-02 15:31:40 +01:00
sof-audio.c ASoC: SOF: add a helper to get topology configured bclk 2021-07-11 23:48:30 +01:00
sof-audio.h ASoC: SOF: parse multiple SSP DAI and hw configs 2021-03-29 17:28:17 +01:00
sof-of-dev.c ASoC: SOF: Check desc->ops directly in acpi/pci/of probe functions 2021-05-21 13:13:35 +01:00
sof-pci-dev.c ASoC: SOF: Intel: Use DMI string to search for adl_mx98373_rt5682 variant 2021-08-03 18:26:10 +01:00
sof-pci-dev.h ASoC: SOF: pci: split PCI into different drivers 2021-03-02 15:32:00 +01:00
sof-priv.h ASoC: SOF: change signature of set_mach_params() callback 2021-04-12 17:05:52 +01:00
topology.c ASoC: SOF: topology: fix assignment to use le32_to_cpu 2021-05-21 13:13:39 +01:00
trace.c ASoC: SOF: trace: Add runtime trace filtering mechanism 2020-12-07 14:22:05 +00:00
utils.c ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only 2020-05-01 17:45:24 +01:00