Re: [Sound-open-firmware] [PATCH v4 04/14] ASoC: SOF: Add support for IPC IO between DSP and Host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 14, 2019 at 08:56:42AM -0600, Pierre-Louis Bossart wrote:
> On 2/14/19 5:52 AM, Takashi Iwai wrote:
> > Pierre-Louis Bossart wrote:

> > > +		ret = snd_sof_dsp_get_reply(sdev, msg);
> > > +		if (msg->reply_size)
> > > +			memcpy(reply_data, msg->reply_data, msg->reply_size);

> > I'd add a sanity check here for avoiding a buffer overflow.
> > The reply buffer seems to be allocated in PAGE_SIZE.  Will it be more
> > than that?

> Good point, we'll check all the info returned by the DSP and see if they
> need to be range-checked or size-checked.

I think it's better to just do the range checks even if they're not
needed right now, it's safer in case someone adds bigger messages or
there's some bug that corrupts the size.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux