diff options
author | Dragos Tarcatu <dragos_tarcatu@mentor.com> | 2019-11-06 08:58:16 -0600 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-11-06 15:31:12 +0000 |
commit | 9508ef5a980f5d847cad9b932b6ada8f2a3466c1 (patch) | |
tree | c2c6e0ebd24d1fb6904217eced068176ba19019c /include/sound/hda_codec.h | |
parent | e44f3d49f900c645af434a3a1dfdbfb79c4a7851 (diff) |
ASoC: SOF: topology: Fix bytes control size checks
When using the example SOF amp widget topology, KASAN dumps this
when the AMP bytes kcontrol gets loaded:
[ 9.579548] BUG: KASAN: slab-out-of-bounds in
sof_control_load+0x8cc/0xac0 [snd_sof]
[ 9.588194] Write of size 40 at addr ffff8882314559dc by task
systemd-udevd/2411
Fix that by rejecting the topology if the bytes data size > max_size
Fixes: 311ce4fe7637d ("ASoC: SOF: Add support for loading topologies")
Reviewed-by: Jaska Uimonen <jaska.uimonen@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191106145816.9367-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/hda_codec.h')
0 files changed, 0 insertions, 0 deletions