WSL2-Linux-Kernel/sound/soc/intel
Takashi Sakamoto d1a6fe41d3 ASoC: Intel: Skylake: fix invalid memory access due to wrong reference of pointer
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>
Cc: <stable@vger.kernel.org> # v4.5+
2017-03-07 15:19:39 +01:00
..
atom ASoC: Intel: add support for ALC3270 codec 2017-01-31 20:14:23 +00:00
baytrail ASoC: intel: Replace kthread with work 2016-11-30 17:41:13 +00:00
boards Merge remote-tracking branch 'asoc/topic/intel' into asoc-next 2017-02-19 16:35:45 +00:00
common ASoC: Intel: Common: Update dsp register poll implementation 2017-01-06 18:14:45 +00:00
haswell ASoC: intel: Replace kthread with work 2016-11-30 17:41:13 +00:00
skylake ASoC: Intel: Skylake: fix invalid memory access due to wrong reference of pointer 2017-03-07 15:19:39 +01:00
Kconfig ASoC: Intel: remove ignored dependencies 2017-01-17 17:46:58 +00:00
Makefile ASoC: Intel: rename SND_SST_MFLD_PLATFORM to SND_SST_ATOM_HIFI2_PLATFORM 2017-01-17 17:46:40 +00:00