All of lore.kernel.org
 help / color / mirror / Atom feed
From: Curtis Malainey <cujomalainey@google.com>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	ALSA development <alsa-devel@alsa-project.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Takashi Iwai <tiwai@suse.com>, Tomasz Figa <tfiga@chromium.org>,
	Mark Brown <broonie@kernel.org>,
	Ricardo Ribalda <ribalda@chromium.org>,
	Jaroslav Kysela <perex@perex.cz>,
	Sound Open Firmware <sound-open-firmware@alsa-project.org>
Subject: Re: [Sound-open-firmware] out-of-bounds access in sound/soc/sof/topology.c
Date: Mon, 18 Apr 2022 18:59:17 -0700	[thread overview]
Message-ID: <CAOReqxhDpmexe_aLHb2-ESjSE2uij2SrPxRCZD3YxZm0JjtwrA@mail.gmail.com> (raw)
In-Reply-To: <Ylk5o3EC/hyX5UQ0@google.com>

> Now control data allocations looks as follows
>
>         scontrol->size = struct_size(scontrol->control_data, chanv,
>                                      le32_to_cpu(mc->num_channels));
>         scontrol->control_data = kzalloc(scontrol->size, GFP_KERNEL);
>
> Which is sizeof(sof_ipc_ctrl_data) + mc->num_channels * sizeof(sof_ipc_ctrl_value_chan)
>
> For some reason it uses sizeof(sof_ipc_ctrl_value_chan), which is not
> the largest member of the union.
>

For the record, this could be hitting as far back as 5.4 as I have
been trying to debug an invalid IPC write in JSL.

WARNING: multiple messages have this Message-ID (diff)
From: Curtis Malainey <cujomalainey@google.com>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: ALSA development <alsa-devel@alsa-project.org>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Takashi Iwai <tiwai@suse.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Mark Brown <broonie@kernel.org>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Ricardo Ribalda <ribalda@chromium.org>,
	Tomasz Figa <tfiga@chromium.org>,
	Sound Open Firmware <sound-open-firmware@alsa-project.org>
Subject: Re: [Sound-open-firmware] out-of-bounds access in sound/soc/sof/topology.c
Date: Mon, 18 Apr 2022 18:59:17 -0700	[thread overview]
Message-ID: <CAOReqxhDpmexe_aLHb2-ESjSE2uij2SrPxRCZD3YxZm0JjtwrA@mail.gmail.com> (raw)
In-Reply-To: <Ylk5o3EC/hyX5UQ0@google.com>

> Now control data allocations looks as follows
>
>         scontrol->size = struct_size(scontrol->control_data, chanv,
>                                      le32_to_cpu(mc->num_channels));
>         scontrol->control_data = kzalloc(scontrol->size, GFP_KERNEL);
>
> Which is sizeof(sof_ipc_ctrl_data) + mc->num_channels * sizeof(sof_ipc_ctrl_value_chan)
>
> For some reason it uses sizeof(sof_ipc_ctrl_value_chan), which is not
> the largest member of the union.
>

For the record, this could be hitting as far back as 5.4 as I have
been trying to debug an invalid IPC write in JSL.

  parent reply	other threads:[~2022-04-19  1:59 UTC|newest]

Thread overview: 18+ 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  9:23 ` Sergey Senozhatsky
2022-04-15 16:00 ` Pierre-Louis Bossart
2022-04-15 16:00   ` Pierre-Louis Bossart
2022-04-16  1:05   ` Sergey Senozhatsky
2022-04-16  1:05     ` Sergey Senozhatsky
2022-04-19 11:50   ` Péter Ujfalusi
2022-04-19 11:50     ` Péter Ujfalusi
2022-04-19 13:07     ` Pierre-Louis Bossart
2022-04-19 13:07       ` Pierre-Louis Bossart
2022-04-19 18:04       ` [Sound-open-firmware] " Curtis Malainey
2022-04-19 18:04         ` Curtis Malainey
2022-04-27  6:55       ` Sergey Senozhatsky
2022-04-27  6:55         ` Sergey Senozhatsky
2022-04-27  7:26         ` Péter Ujfalusi
2022-04-27  7:26           ` Péter Ujfalusi
2022-04-19  1:59 ` Curtis Malainey [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=CAOReqxhDpmexe_aLHb2-ESjSE2uij2SrPxRCZD3YxZm0JjtwrA@mail.gmail.com \
    --to=cujomalainey@google.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.