lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 10 Jan 2022 13:37:34 -0500
From:   Alex Deucher <alexdeucher@...il.com>
To:     Harry Wentland <harry.wentland@....com>
Cc:     José Expósito <jose.exposito89@...il.com>,
        Jude Shih <shenshih@....com>,
        Anson Jacob <Anson.Jacob@....com>,
        "Leo (Sunpeng) Li" <sunpeng.li@....com>,
        xinhui pan <Xinhui.Pan@....com>,
        "Siqueira, Rodrigo" <Rodrigo.Siqueira@....com>,
        LKML <linux-kernel@...r.kernel.org>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        "Kazlauskas, Nicholas" <nicholas.kazlauskas@....com>,
        Dave Airlie <airlied@...ux.ie>,
        Maling list - DRI developers 
        <dri-devel@...ts.freedesktop.org>, Daniel Vetter <daniel@...ll.ch>,
        "Deucher, Alexander" <alexander.deucher@....com>,
        Christian Koenig <christian.koenig@....com>
Subject: Re: [PATCH] drm/amd/display: invalid parameter check in dmub_hpd_callback

Applied.  Thanks!

Alex

On Mon, Jan 10, 2022 at 11:34 AM Harry Wentland <harry.wentland@....com> wrote:
>
> On 2022-01-09 13:42, José Expósito wrote:
> > The function performs a check on the "adev" input parameter, however, it
> > is used before the check.
> >
> > Initialize the "dev" variable after the sanity check to avoid a possible
> > NULL pointer dereference.
> >
> > Fixes: e27c41d5b0681 ("drm/amd/display: Support for DMUB HPD interrupt handling")
> > Addresses-Coverity-ID: 1493909 ("Null pointer dereference")
> > Signed-off-by: José Expósito <jose.exposito89@...il.com>
>
> Reviewed-by: Harry Wentland <harry.wentland@....com>
>
> Harry
>
> > ---
> >  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > index e727f1dd2a9a..7fbded7a6d9c 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > @@ -656,7 +656,7 @@ void dmub_hpd_callback(struct amdgpu_device *adev, struct dmub_notification *not
> >       struct drm_connector_list_iter iter;
> >       struct dc_link *link;
> >       uint8_t link_index = 0;
> > -     struct drm_device *dev = adev->dm.ddev;
> > +     struct drm_device *dev;
> >
> >       if (adev == NULL)
> >               return;
> > @@ -673,6 +673,7 @@ void dmub_hpd_callback(struct amdgpu_device *adev, struct dmub_notification *not
> >
> >       link_index = notify->link_index;
> >       link = adev->dm.dc->links[link_index];
> > +     dev = adev->dm.ddev;
> >
> >       drm_connector_list_iter_begin(dev, &iter);
> >       drm_for_each_connector_iter(connector, &iter) {
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ