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] [thread-next>] [day] [month] [year] [list]
Message-ID: <c94ce223-56d5-e31a-2a2c-59defb988b28@qubes-os.org>
Date:   Thu, 20 Feb 2020 18:19:24 +0100
From:   Frédéric Pierret 
        <frederic.pierret@...es-os.org>
To:     bskeggs@...hat.com, airlied@...ux.ie, daniel@...ll.ch,
        dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nv50_disp_chan_mthd: ensure mthd is not NULL

Hi,
Is anything missing here? How can I get this merged?

Best regards,
Frédéric Pierret

On 2020-02-08 20:43, Frédéric Pierret wrote:
> Pointer to structure array is assumed not NULL by default. It has
> the consequence to raise a kernel panic when it's not the case.
> 
> Basically, running at least a RTX2080TI on Xen makes a bad mmio error
> which causes having 'mthd' pointer to be NULL in 'channv50.c'. From the
> code, it's assumed to be not NULL by accessing directly 'mthd->data[0]'
> which is the reason of the kernel panic. Simply check if the pointer
> is not NULL before continuing.
> 
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206299
> Cc: stable@...r.kernel.org
> Signed-off-by: Frédéric Pierret (fepitre) <frederic.pierret@...es-os.org>
> ---
>  drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c
> index bcf32d92ee5a..50e3539f33d2 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c
> @@ -74,6 +74,8 @@ nv50_disp_chan_mthd(struct nv50_disp_chan *chan, int debug)
>  
>  	if (debug > subdev->debug)
>  		return;
> +	if (!mthd)
> +		return;
>  
>  	for (i = 0; (list = mthd->data[i].mthd) != NULL; i++) {
>  		u32 base = chan->head * mthd->addr;
> 



Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ