[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202504301357.0B1DB9FD@keescook>
Date: Wed, 30 Apr 2025 13:58:24 -0700
From: Kees Cook <kees@...nel.org>
To: Péter Ujfalusi <peter.ujfalusi@...ux.intel.com>
Cc: Liam Girdwood <lgirdwood@...il.com>,
Bard Liao <yung-chuan.liao@...ux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Daniel Baluta <daniel.baluta@....com>,
Kai Vehmanen <kai.vehmanen@...ux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.dev>,
Mark Brown <broonie@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, sound-open-firmware@...a-project.org,
linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH] ASoC: SOF: ipc4-pcm: Adjust pipeline_list->pipelines
allocation type
On Mon, Apr 28, 2025 at 03:38:30PM +0300, Péter Ujfalusi wrote:
>
>
> On 26/04/2025 09:25, Kees Cook wrote:
> > In preparation for making the kmalloc family of allocators type aware,
> > we need to make sure that the returned type from the allocation matches
> > the type of the variable being assigned. (Before, the allocator would
> > always return "void *", which can be implicitly cast to any pointer type.)
> >
> > The assigned type is "struct snd_sof_pipeline **", but the returned type
> > will be "struct snd_sof_widget **". These are the same size allocation
> > (pointer size) but the types don't match. Adjust the allocation type to
> > match the assignment.
>
> It looks like that this is indeed an oversight and a bug introduced by a
> mostly mechanical change (introduced in v6.3).
>
> Can you add:
> Fixes: 9c04363d222b ("ASoC: SOF: Introduce struct snd_sof_pipeline")
>
> and:
> Acked-by: Peter Ujfalusi <peter.ujfalusi@...ux.intel.com>
Thanks! I can carry the patch if you'd like? I assumed this would go
through regular maintainers.
-Kees
--
Kees Cook
Powered by blists - more mailing lists