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, 30 Aug 2010 09:31:04 -0700
From:	Jesse Barnes <jbarnes@...tuousgeek.org>
To:	Kees Cook <kees.cook@...onical.com>
Cc:	linux-kernel@...r.kernel.org, Dave Airlie <airlied@...hat.com>,
	Clemens Ladisch <clemens@...isch.de>,
	Mauro Carvalho Chehab <mchehab@...radead.org>,
	Devin Heitmueller <dheitmueller@...nellabs.com>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Hans Verkuil <hverkuil@...all.nl>,
	dri-devel@...ts.freedesktop.org, linux-media@...r.kernel.org
Subject: Re: [PATCH] drm, video: fix use-before-NULL-check

On Fri, 27 Aug 2010 14:07:19 -0700
Kees Cook <kees.cook@...onical.com> wrote:

> Fix potential crashes due to use-before-NULL situations.
> 
> Signed-off-by: Kees Cook <kees.cook@...onical.com>
> ---
>  drivers/gpu/drm/drm_fb_helper.c           |    3 ++-
>  drivers/media/video/em28xx/em28xx-video.c |    3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index de82e20..8dd7e6f 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -94,10 +94,11 @@ static bool drm_fb_helper_connector_parse_command_line(struct drm_fb_helper_conn
>  	int i;
>  	enum drm_connector_force force = DRM_FORCE_UNSPECIFIED;
>  	struct drm_fb_helper_cmdline_mode *cmdline_mode;
> -	struct drm_connector *connector = fb_helper_conn->connector;
> +	struct drm_connector *connector;
>  
>  	if (!fb_helper_conn)
>  		return false;
> +	connector = fb_helper_conn->connector;
>  
>  	cmdline_mode = &fb_helper_conn->cmdline_mode;
>  	if (!mode_option)
> diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
> index 7b9ec6e..95a4b60 100644
> --- a/drivers/media/video/em28xx/em28xx-video.c
> +++ b/drivers/media/video/em28xx/em28xx-video.c
> @@ -277,12 +277,13 @@ static void em28xx_copy_vbi(struct em28xx *dev,
>  {
>  	void *startwrite, *startread;
>  	int  offset;
> -	int bytesperline = dev->vbi_width;
> +	int bytesperline;
>  
>  	if (dev == NULL) {
>  		em28xx_isocdbg("dev is null\n");
>  		return;
>  	}
> +	bytesperline = dev->vbi_width;
>  
>  	if (dma_q == NULL) {
>  		em28xx_isocdbg("dma_q is null\n");

Look fine to me.

Reviewed-by: Jesse Barnes <jbarnes@...tuousgeek.org>


-- 
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ