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]
Message-ID: <b350fd1e60cc0fa24a81be512e35f9b6a2358f94.camel@redhat.com>
Date:   Mon, 07 Aug 2023 16:32:53 -0400
From:   Lyude Paul <lyude@...hat.com>
To:     Karol Herbst <kherbst@...hat.com>, linux-kernel@...r.kernel.org
Cc:     Ben Skeggs <bskeggs@...hat.com>, dri-devel@...ts.freedesktop.org,
        nouveau@...ts.freedesktop.org, Olaf Skibbe <news@...vcenko.com>
Subject: Re: [PATCH] drm/nouveau/disp: Revert a NULL check inside
 nouveau_connector_get_modes

Ugh, thanks for catching this!

Reviewed-by: Lyude Paul <lyude@...hat.com>

On Sat, 2023-08-05 at 12:18 +0200, Karol Herbst wrote:
> The original commit adding that check tried to protect the kenrel against
> a potential invalid NULL pointer access.
> 
> However we call nouveau_connector_detect_depth once without a native_mode
> set on purpose for non LVDS connectors and this broke DP support in a few
> cases.
> 
> Cc: Olaf Skibbe <news@...vcenko.com>
> Cc: Lyude Paul <lyude@...hat.com>
> Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/238
> Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/245
> Fixes: 20a2ce87fbaf8 ("drm/nouveau/dp: check for NULL nv_connector->native_mode")
> Signed-off-by: Karol Herbst <kherbst@...hat.com>
> ---
>  drivers/gpu/drm/nouveau/nouveau_connector.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
> index f75c6f09dd2af..a2e0033e8a260 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_connector.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
> @@ -967,7 +967,7 @@ nouveau_connector_get_modes(struct drm_connector *connector)
>  	/* Determine display colour depth for everything except LVDS now,
>  	 * DP requires this before mode_valid() is called.
>  	 */
> -	if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS && nv_connector->native_mode)
> +	if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS)
>  		nouveau_connector_detect_depth(connector);
>  
>  	/* Find the native mode if this is a digital panel, if we didn't

-- 
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ