All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Ben Skeggs <bskeggs@redhat.com>
Cc: John Hubbard <jhubbard@nvidia.com>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	David Airlie <airlied@linux.ie>,
	Maling list - DRI developers  <dri-devel@lists.freedesktop.org>,
	nouveau <nouveau@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/nouveau/secboot/acr: fix memory leak
Date: Thu, 13 Sep 2018 14:35:02 -0700	[thread overview]
Message-ID: <CAGXu5jKd5SEabmr4sCW-=Oksi6WvO11tDB_9Un1fRYQAoq2h0w@mail.gmail.com> (raw)
In-Reply-To: <f35a04a0-fa60-7905-96bf-36a0dfb055a8@nvidia.com>

On Fri, Sep 7, 2018 at 8:02 PM, John Hubbard <jhubbard@nvidia.com> wrote:
> On 8/2/18 12:51 PM, Gustavo A. R. Silva wrote:
>> Hi all,
>>
>> Friendly ping! Who can take this?
>>
>> Thanks
>> --
>> Gustavo
>>
>> On 07/24/2018 08:27 AM, Gustavo A. R. Silva wrote:
>>> In case memory resources for *bl_desc* were allocated, release
>>> them before return.
>>>
>>> Addresses-Coverity-ID: 1472021 ("Resource leak")
>>> Fixes: 0d466901552a ("drm/nouveau/secboot/acr: Remove VLA usage")
>>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>>> ---
>>>  drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
>>> index d02e183..5c14d6a 100644
>>> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
>>> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
>>> @@ -801,6 +801,7 @@ acr_r352_load(struct nvkm_acr *_acr, struct nvkm_falcon *falcon,
>>>              bl = acr->hsbl_unload_blob;
>>>      } else {
>>>              nvkm_error(_acr->subdev, "invalid secure boot blob!\n");
>>> +            kfree(bl_desc);
>>>              return -EINVAL;
>>>      }
>>>
>>>
>
> Hi Gustavo,
>
> Seeing as how I've been working on this corner of Nouveau lately (don't ask, haha),
> I reviewed and also tested this. It looks good, you can add:
>
> Reviewed-by: John Hubbard <jhubbard@nvidia.com>

Ben can you take this?

Reviewed-by: Kees Cook <keescook@chromium.org>

-Kees

-- 
Kees Cook
Pixel Security

WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
To: Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: "Gustavo A. R. Silva"
	<gustavo-L1vi/lXTdts+Va1GwOuvDg@public.gmane.org>,
	David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Maling list - DRI developers
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	nouveau
	<nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH] drm/nouveau/secboot/acr: fix memory leak
Date: Thu, 13 Sep 2018 14:35:02 -0700	[thread overview]
Message-ID: <CAGXu5jKd5SEabmr4sCW-=Oksi6WvO11tDB_9Un1fRYQAoq2h0w@mail.gmail.com> (raw)
In-Reply-To: <f35a04a0-fa60-7905-96bf-36a0dfb055a8-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On Fri, Sep 7, 2018 at 8:02 PM, John Hubbard <jhubbard@nvidia.com> wrote:
> On 8/2/18 12:51 PM, Gustavo A. R. Silva wrote:
>> Hi all,
>>
>> Friendly ping! Who can take this?
>>
>> Thanks
>> --
>> Gustavo
>>
>> On 07/24/2018 08:27 AM, Gustavo A. R. Silva wrote:
>>> In case memory resources for *bl_desc* were allocated, release
>>> them before return.
>>>
>>> Addresses-Coverity-ID: 1472021 ("Resource leak")
>>> Fixes: 0d466901552a ("drm/nouveau/secboot/acr: Remove VLA usage")
>>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>>> ---
>>>  drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
>>> index d02e183..5c14d6a 100644
>>> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
>>> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
>>> @@ -801,6 +801,7 @@ acr_r352_load(struct nvkm_acr *_acr, struct nvkm_falcon *falcon,
>>>              bl = acr->hsbl_unload_blob;
>>>      } else {
>>>              nvkm_error(_acr->subdev, "invalid secure boot blob!\n");
>>> +            kfree(bl_desc);
>>>              return -EINVAL;
>>>      }
>>>
>>>
>
> Hi Gustavo,
>
> Seeing as how I've been working on this corner of Nouveau lately (don't ask, haha),
> I reviewed and also tested this. It looks good, you can add:
>
> Reviewed-by: John Hubbard <jhubbard@nvidia.com>

Ben can you take this?

Reviewed-by: Kees Cook <keescook@chromium.org>

-Kees

-- 
Kees Cook
Pixel Security
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

  reply	other threads:[~2018-09-13 21:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 13:27 [PATCH] drm/nouveau/secboot/acr: fix memory leak Gustavo A. R. Silva
2018-08-02 19:51 ` Gustavo A. R. Silva
2018-09-08  3:02   ` John Hubbard
2018-09-08  3:02     ` John Hubbard
2018-09-13 21:35     ` Kees Cook [this message]
2018-09-13 21:35       ` Kees Cook
2018-09-14  7:26       ` [Nouveau] " Ben Skeggs

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='CAGXu5jKd5SEabmr4sCW-=Oksi6WvO11tDB_9Un1fRYQAoq2h0w@mail.gmail.com' \
    --to=keescook@chromium.org \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo@embeddedor.com \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    /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.