From: "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>
To: Sergey Senozhatsky <senozhatsky@chromium.org>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: alsa-devel@alsa-project.org,
Kai Vehmanen <kai.vehmanen@linux.intel.com>,
linux-kernel@vger.kernel.org,
Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Mark Brown <broonie@kernel.org>,
Ricardo Ribalda <ribalda@chromium.org>,
Tomasz Figa <tfiga@chromium.org>,
Jaska Uimonen <jaska.uimonen@linux.intel.com>,
sound-open-firmware@alsa-project.org
Subject: Re: out-of-bounds access in sound/soc/sof/topology.c
Date: Wed, 27 Apr 2022 10:26:28 +0300 [thread overview]
Message-ID: <e349e9ca-7a4f-8d65-3ade-5ac4dfd5700a@linux.intel.com> (raw)
In-Reply-To: <Ymjo1aHD4V6bNHz7@google.com>
On 27/04/2022 09:55, Sergey Senozhatsky wrote:
> On (22/04/19 08:07), Pierre-Louis Bossart wrote:
>>> Your analyzes are spot on, unfortunately. But...
>>>
>>> As of today, the sof_get_control_data() is in the call path of
>>> (ipc3-topology.c):
>>>
>>> sof_widget_update_ipc_comp_process() -> sof_process_load() ->
>>> sof_get_control_data()
>>>
>>> sof_widget_update_ipc_comp_process() is the ipc_setup callback for
>>> snd_soc_dapm_effect. If I'm not mistaken these only carries bin payload
>>> and never MIXER/ENUM/SWITCH/VOLUME.
>>> This means that the sof_get_control_data() is only called with
>>> SND_SOC_TPLG_TYPE_BYTES and for that the allocated data area is correct.
>>>
>>> This can explain why we have not seen any issues so far. This does not
>>> renders the code right, as how it is written atm is wrong.
>>
>>
>> Sergey's results with KASAN show that there's a real-life problem though. I also don't understand how that might happen.
>>
>> Could it be that these results are with a specific topology where our assumptions are incorrect?
>
> Is there anything I can do to help?
I will send a patch shortly, I think it is going to be easy to backport
for you and test it.
--
Péter
next prev parent reply other threads:[~2022-04-27 7:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-15 9:23 out-of-bounds access in sound/soc/sof/topology.c Sergey Senozhatsky
2022-04-15 16:00 ` Pierre-Louis Bossart
2022-04-16 1:05 ` Sergey Senozhatsky
2022-04-19 11:50 ` Péter Ujfalusi
2022-04-19 13:07 ` Pierre-Louis Bossart
2022-04-19 18:04 ` [Sound-open-firmware] " Curtis Malainey
2022-04-27 6:55 ` Sergey Senozhatsky
2022-04-27 7:26 ` Péter Ujfalusi [this message]
2022-04-19 1:59 ` [Sound-open-firmware] " Curtis Malainey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e349e9ca-7a4f-8d65-3ade-5ac4dfd5700a@linux.intel.com \
--to=peter.ujfalusi@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jaska.uimonen@linux.intel.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=ribalda@chromium.org \
--cc=senozhatsky@chromium.org \
--cc=sound-open-firmware@alsa-project.org \
--cc=tfiga@chromium.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox