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: <874jix63dl.fsf@intel.com>
Date:   Wed, 11 Oct 2023 10:10:30 +0300
From:   Jani Nikula <jani.nikula@...ux.intel.com>
To:     Ma Ke <make_ruc2021@....com>, maarten.lankhorst@...ux.intel.com,
        mripard@...nel.org, tzimmermann@...e.de, airlied@...il.com,
        daniel@...ll.ch
Cc:     linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        Ma Ke <make_ruc2021@....com>
Subject: Re: [PATCH] drm/edid: fix a possible null pointer dereference

On Wed, 11 Oct 2023, Ma Ke <make_ruc2021@....com> wrote:
> In drm_mode_std(), the return value of drm_gtf_mode(),
> drm_gtf_mode() and drm_cvt_mode() is assigned to mode,
> which will lead to a NULL pointer dereference on failure
> of drm_gtf_mode(), drm_gtf_mode() and drm_cvt_mode().
> Add a check to avoid null point dereference.
>
> Signed-off-by: Ma Ke <make_ruc2021@....com>
> ---
>  drivers/gpu/drm/drm_edid.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 340da8257b51..e2c154c2b896 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -3381,6 +3381,8 @@ static struct drm_display_mode *drm_mode_std(struct drm_connector *connector,
>  				    false);
>  		break;
>  	}
> +	if (!mode)
> +		return NULL;

This doesn't change anything.

BR,
Jani.


>  	return mode;
>  }

-- 
Jani Nikula, Intel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ