linux/sound/soc
Ben Hutchings 50dd2ea8ef
ASoC: wm_adsp: Fix validation of firmware and coeff lengths
The checks for whether another region/block header could be present
are subtracting the size from the current offset.  Obviously we should
instead subtract the offset from the size.

The checks for whether the region/block data fit in the file are
adding the data size to the current offset and header size, without
checking for integer overflow.  Rearrange these so that overflow is
impossible.

Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2017-12-08 17:17:35 +00:00
..
adi
amd Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ac97-mfd', 'asoc/topic/amd' and 'asoc/topic/arizona-mfd' into asoc-next 2017-11-10 21:31:02 +00:00
atmel License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
au1x License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bcm Merge remote-tracking branches 'asoc/topic/cygnus', 'asoc/topic/da7213', 'asoc/topic/davinci' and 'asoc/topic/doc' into asoc-next 2017-11-10 21:31:10 +00:00
blackfin License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cirrus License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
codecs ASoC: wm_adsp: Fix validation of firmware and coeff lengths 2017-12-08 17:17:35 +00:00
davinci Merge remote-tracking branches 'asoc/topic/cygnus', 'asoc/topic/da7213', 'asoc/topic/davinci' and 'asoc/topic/doc' into asoc-next 2017-11-10 21:31:10 +00:00
dwc ASoC: dwc: fix typos in Kconfig 2017-10-09 09:47:48 +01:00
fsl Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/fallthrough', 'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/graph' into asoc-next 2017-11-10 21:31:13 +00:00
generic Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/fallthrough', 'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/graph' into asoc-next 2017-11-10 21:31:13 +00:00
hisilicon ASoC: hisilicon: constify snd_soc_dai_ops structure 2017-07-17 16:16:58 +01:00
img Merge remote-tracking branches 'asoc/topic/hdmi', 'asoc/topic/img' and 'asoc/topic/kirkwood' into asoc-next 2017-11-10 21:31:17 +00:00
intel ASoC: Intel: Add help text for SND_SOC_INTEL_SST_TOPLEVEL 2017-11-15 11:43:41 +00:00
jz4740 ASoC: jz4740: Handle return value of clk_prepare_enable. 2017-07-26 13:01:18 +01:00
kirkwood ASoC: kirkwood: make kirkwood_soc_platform const 2017-09-27 10:02:18 -07:00
mediatek License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mxs License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nuc900 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
omap ASoC: Updates for v4.15 2017-11-13 15:45:57 +01:00
pxa Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ac97-mfd', 'asoc/topic/amd' and 'asoc/topic/arizona-mfd' into asoc-next 2017-11-10 21:31:02 +00:00
qcom Merge remote-tracking branch 'asoc/topic/qcom' into asoc-next 2017-11-10 21:30:56 +00:00
rockchip Merge remote-tracking branch 'asoc/topic/rockchip' into asoc-next 2017-11-10 21:31:00 +00:00
samsung Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/stm32', 'asoc/topic/sunxi' and 'asoc/topic/tas571x' into asoc-next 2017-11-10 21:31:29 +00:00
sh Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/fallthrough', 'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/graph' into asoc-next 2017-11-10 21:31:13 +00:00
sirf License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
spear License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sti
stm Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/stm32', 'asoc/topic/sunxi' and 'asoc/topic/tas571x' into asoc-next 2017-11-10 21:31:29 +00:00
sunxi Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/stm32', 'asoc/topic/sunxi' and 'asoc/topic/tas571x' into asoc-next 2017-11-10 21:31:29 +00:00
tegra License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
txx9 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ux500 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xtensa locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE() 2017-10-25 11:01:08 +02:00
zte ASoC: zte: spdif: remove duplicate initialization of dma_data 2017-09-19 12:56:50 +01:00
Kconfig ASoC: move ACPI common code out of Intel/sst tree 2017-10-21 11:21:09 +01:00
Makefile Merge remote-tracking branch 'asoc/topic/intel' into asoc-next 2017-11-10 21:30:53 +00:00
soc-ac97.c
soc-acpi.c ASoC: move ACPI common code out of Intel/sst tree 2017-10-21 11:21:09 +01:00
soc-cache.c
soc-compress.c ASoC: snd_soc_component_driver has snd_compr_ops 2017-10-23 11:28:01 +02:00
soc-core.c Merge remote-tracking branches 'asoc/topic/cygnus', 'asoc/topic/da7213', 'asoc/topic/davinci' and 'asoc/topic/doc' into asoc-next 2017-11-10 21:31:10 +00:00
soc-dapm.c Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next 2017-11-10 21:30:51 +00:00
soc-devres.c
soc-generic-dmaengine-pcm.c
soc-io.c ASoC: add snd_soc_component_read32 2017-11-08 21:19:36 +00:00
soc-jack.c Merge remote-tracking branches 'asoc/topic/hisi', 'asoc/topic/img', 'asoc/topic/jack' and 'asoc/topic/jz4740' into asoc-next 2017-09-01 12:12:41 +01:00
soc-ops.c
soc-pcm.c ASoC: snd_soc_component_driver has pmdown_time 2017-10-23 11:28:02 +02:00
soc-topology.c ASoC: topology: Fix a potential memory leak in 'soc_tplg_dapm_widget_denum_create()' 2017-09-14 14:13:03 -07:00
soc-utils.c ASoC: soc-utils: make snd_soc_platform_driver const 2017-08-14 17:21:41 +01:00