All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: "T. Williams" <tdwilliamsiv@gmail.com>,
	"Wentland, Harry" <harry.wentland@amd.com>,
	 "Leo (Sunpeng) Li" <sunpeng.li@amd.com>,
	Dave Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	 Wayne Lin <Wayne.Lin@amd.com>,
	"Lipski, Mikita" <mikita.lipski@amd.com>,
	 "Kazlauskas, Nicholas" <Nicholas.Kazlauskas@amd.com>,
	Stylon Wang <stylon.wang@amd.com>,  Eryk Brol <eryk.brol@amd.com>,
	Jerry Zuo <Jerry.Zuo@amd.com>,
	 Victor Lu <victorchengchi.lu@amd.com>,
	Aurabindo Pillai <aurabindo.pillai@amd.com>,
	 Nirmoy Das <nirmoy.das@amd.com>,
	Anson Jacob <Anson.Jacob@amd.com>,
	 amd-gfx list <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/amdgpu: fix out of bounds write
Date: Wed, 27 Oct 2021 15:05:11 +0200	[thread overview]
Message-ID: <CAMeQTsa7bmCwEsHc-vAMCh=NhSScJa_KTrKfcPxOU6gf0x2c5w@mail.gmail.com> (raw)
In-Reply-To: <CAMeQTsZcEXSQswdUuZRbh7y7ik83KwQngzxqs04QDTqOWLO5pA@mail.gmail.com>

On Wed, Oct 27, 2021 at 12:08 PM Patrik Jakobsson
<patrik.r.jakobsson@gmail.com> wrote:
>
> On Wed, Oct 13, 2021 at 10:41 PM Alex Deucher <alexdeucher@gmail.com> wrote:
> >
> > On Wed, Oct 13, 2021 at 4:04 PM T. Williams <tdwilliamsiv@gmail.com> wrote:
> > >
> >
> > The description and s-o-b should go here and the patch seems to be
> > mangled.  I've manually applied this.  Please fix up your mailer in
> > the future.
> >
> > Thanks for the fix.
>
> Hi Thelford and Alex
>
> There are several more instances of size being used instead of
> wr_buf_size in amdgpu_dm_debugfs.c.
>
> IMO the proper fix here would be to revert
> 918698d5c2b50433714d2042f55b55b090faa167

Actually, there's one instance that a revert doesn't cover. Instead I
sent out a patch to fix the remaining ones.

>
> -Patrik
>
> >
> > Alex
> >
> >
> > > ---
> > >  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> > > index 87daa78a32b8..17f2756a64dc 100644
> > > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> > > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> > > @@ -263,7 +263,7 @@ static ssize_t dp_link_settings_write(struct file *f, const char __user *buf,
> > >         if (!wr_buf)
> > >                 return -ENOSPC;
> > >
> > > -       if (parse_write_buffer_into_params(wr_buf, size,
> > > +       if (parse_write_buffer_into_params(wr_buf, wr_buf_size,
> > >                                            (long *)param, buf,
> > >                                            max_param_num,
> > >                                            &param_nums)) {
> > > --
> > >
> > > Size can be any value and is user controlled resulting in overwriting the 40 byte array wr_buf with an arbitrary length of data from buf.
> > >
> > > Signed-off-by: Thelford Williams <tdwilliamsiv@gmail.com>

  reply	other threads:[~2021-10-27 13:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 20:04 [PATCH] drm/amdgpu: fix out of bounds write T. Williams
2021-10-13 20:40 ` Alex Deucher
2021-10-27 10:08   ` Patrik Jakobsson
2021-10-27 13:05     ` Patrik Jakobsson [this message]
2021-10-27 14:39 Guenter Roeck
2021-10-27 15:22 ` Harry Wentland
2021-10-27 15:59   ` Guenter Roeck

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='CAMeQTsa7bmCwEsHc-vAMCh=NhSScJa_KTrKfcPxOU6gf0x2c5w@mail.gmail.com' \
    --to=patrik.r.jakobsson@gmail.com \
    --cc=Anson.Jacob@amd.com \
    --cc=Jerry.Zuo@amd.com \
    --cc=Nicholas.Kazlauskas@amd.com \
    --cc=Wayne.Lin@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aurabindo.pillai@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=eryk.brol@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=mikita.lipski@amd.com \
    --cc=nirmoy.das@amd.com \
    --cc=stylon.wang@amd.com \
    --cc=sunpeng.li@amd.com \
    --cc=tdwilliamsiv@gmail.com \
    --cc=victorchengchi.lu@amd.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.