All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Lee <SteveS.Lee@maximintegrated.com>
To: Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.de>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: RE: [GIT PULL] ASoC updates for v5.8
Date: Wed, 3 Jun 2020 06:54:21 +0000	[thread overview]
Message-ID: <MWHPR11MB2047E3836D41C0F76101299092880@MWHPR11MB2047.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200602190334.GK5684@sirena.org.uk>

> -----Original Message-----
> From: Mark Brown <broonie@kernel.org>
> Sent: Wednesday, June 3, 2020 4:04 AM
> To: Takashi Iwai <tiwai@suse.de>
> Cc: alsa-devel@alsa-project.org; Liam Girdwood <lgirdwood@gmail.com>;
> Steve Lee <SteveS.Lee@maximintegrated.com>
> Subject: Re: [GIT PULL] ASoC updates for v5.8
> 
> On Tue, Jun 02, 2020 at 06:42:25PM +0200, Takashi Iwai wrote:
> 
> > But, looking more at the code around that line, I could spot many
> > other bugs.  You cannot trust the firmware file and you must check the
> > size.  The current code can trigger out-of-bound accesses and crash
> > very easily when a malformed firmware file is tossed; e.g. just put an
> > empty file (or a huge file) as dsm_param.bin.
> 
> Yeah, it's not great - the potential impact is limited by regmap which will bounds
> check attempts to write beyond the last register (though now I look again we're
> using unsigned values so we should definitely be limiting the lower size) but it
> would be better to limit it to just the registers that should be being configured.
> Possibly even just to one valid file length if it's always all the same registers
> being configured.
> 
> Steve?

  Thanks for suggest in detail. I will update as limiting size as prevent potential risk.


  reply	other threads:[~2020-06-03  6:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-01 12:13 [GIT PULL] ASoC updates for v5.8 Mark Brown
2020-06-01 18:44 ` Takashi Iwai
2020-06-01 21:17   ` Takashi Iwai
2020-06-02 16:42     ` Takashi Iwai
2020-06-02 19:03       ` Mark Brown
2020-06-03  6:54         ` Steve Lee [this message]
2020-06-03  6:51       ` Steve Lee

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=MWHPR11MB2047E3836D41C0F76101299092880@MWHPR11MB2047.namprd11.prod.outlook.com \
    --to=steves.lee@maximintegrated.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=tiwai@suse.de \
    /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.