linux/sound/soc/intel
Takashi Sakamoto e5a1347391 ASoC: Intel: Skylake: fix invalid memory access due to wrong reference of pointer
commit d1a6fe41d3 upstream.

In 'skl_tplg_set_module_init_data()', a pointer to 'params' member of
'struct skl_algo_data' is calculated, then casted to (u32 *) and assigned
to a member of configuration data. The configuration data is passed to the
other functions and used to process intel IPC. In this processing, the
value of member is used to get message data, however this can bring invalid
memory access in 'skl_set_module_params()' as a result of calculation of
a pointer for actual message data.

(sound/soc/intel/skylake/skl-topology.c)
skl_tplg_init_pipe_modules()
->skl_tplg_set_module_init_data() (has this bug)
->skl_tplg_set_module_params()
  (sound/soc/intel/skylake/skl-messages.c)
  ->skl_set_module_params()
    ((char *)param) + data_offset

This commit fixes the bug.

Fixes: abb740033b ("ASoC: Intel: Skylake: Add support to configure module params")
Signed-off-by: Takashi Sakamoto <takashi.sakamoto@miraclelinux.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2017-04-08 09:30:33 +02:00
..
atom ASoC: intel: Fix crash at suspend/resume without card registration 2017-01-06 10:40:16 +01:00
baytrail kthread: kthread worker API cleanup 2016-10-11 15:06:33 -07:00
boards ASoC: cht_bsw_rt5645: Fix leftover kmalloc 2017-01-12 11:39:29 +01:00
common treewide: remove redundant #include <linux/kconfig.h> 2016-10-11 15:06:33 -07:00
haswell kthread: kthread worker API cleanup 2016-10-11 15:06:33 -07:00
skylake ASoC: Intel: Skylake: fix invalid memory access due to wrong reference of pointer 2017-04-08 09:30:33 +02:00
Kconfig Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus 2016-11-04 12:33:45 -06:00
Makefile ASoC: Intel: Add makefile support for SKL driver 2015-07-09 11:54:26 +01:00