linux-sg2042/sound/soc/intel/skylake
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
..
Makefile ASoC: Intel: Skylake: Add strip extended manifest utility 2016-05-30 18:24:41 +01:00
bxt-sst.c ASoC: Intel: bxtn: Use DSP poll API to poll FW status 2017-01-06 18:14:48 +00:00
skl-messages.c ASoC: Intel: Skylake: Add Geminlake IDs 2017-02-16 18:58:09 +00:00
skl-nhlt.c ASoC: Intel: Skylake: Check device type to get endpoint configuration 2017-02-16 18:58:09 +00:00
skl-nhlt.h ASoC: Intel: Skylake: Add api to retrieve dmic array info from nhlt 2016-05-30 18:16:44 +01:00
skl-pcm.c Merge remote-tracking branch 'asoc/topic/intel' into asoc-next 2017-02-19 16:35:45 +00:00
skl-sst-cldma.c ASoC: intel: Replace kthread with work 2016-11-30 17:41:13 +00:00
skl-sst-cldma.h ASoC: Intel: Skylake: add code loader DMA operations 2015-07-16 21:46:50 +01:00
skl-sst-dsp.c ASoC: Intel: Skylake: Add DSP muti-core infrastructure 2016-06-22 16:13:12 +01:00
skl-sst-dsp.h ASoC: Intel: Skylake: Clean up manifest info 2017-01-06 18:14:31 +00:00
skl-sst-ipc.c ASoC: intel: Replace kthread with work 2016-11-30 17:41:13 +00:00
skl-sst-ipc.h ASoC: Intel: Skylake: Clean up manifest info 2017-01-06 18:14:31 +00:00
skl-sst-utils.c ASoC: Intel: Skylake: Fix a shift wrapping bug 2016-10-26 11:13:55 +01:00
skl-sst.c ASoC: Intel: Skylake: Release FW ctx in cleanup 2017-01-06 18:14:58 +00:00
skl-topology.c ASoC: Intel: Skylake: fix invalid memory access due to wrong reference of pointer 2017-03-07 15:19:39 +01:00
skl-topology.h ASoC: Intel: Skylake: Clean up manifest info 2017-01-06 18:14:31 +00:00
skl-tplg-interface.h ASoC: Intel: Skylake: Clean up manifest info 2017-01-06 18:14:31 +00:00
skl.c ASoC: Intel: Skylake: Add Geminlake IDs 2017-02-16 18:58:09 +00:00
skl.h ASoC: Intel: Skylake: Check device type to get endpoint configuration 2017-02-16 18:58:09 +00:00