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:	Thu, 28 Jan 2016 10:28:38 +0100
From:	Daniel Vetter <daniel@...ll.ch>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	David Airlie <airlied@...ux.ie>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	Thomas Hellstrom <thellstrom@...are.com>,
	Alex Deucher <alexander.deucher@....com>,
	Daniel Stone <daniels@...labora.com>,
	Sinclair Yeh <syeh@...are.com>,
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [patch] drm/vmwgfx: fix a NULL dereference

On Thu, Jan 28, 2016 at 12:06:46PM +0300, Dan Carpenter wrote:
> We dereference "eaction->event" inside the call to drm_send_event_locked()
> so should hold off on setting it to NULL until afterward.
> 
> Fixes: fb740cf2492c ("drm: Create drm_send_event helpers")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

Oh dear that's embarassing. Thanks for the patch, applied.
-Daniel

> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> index e0edf14..37c305b 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> @@ -880,8 +880,8 @@ static void vmw_event_fence_action_seq_passed(struct vmw_fence_action *action)
>  	}
>  
>  	list_del_init(&eaction->fpriv_head);
> -	eaction->event = NULL;
>  	drm_send_event_locked(dev, eaction->event);
> +	eaction->event = NULL;
>  	spin_unlock_irqrestore(&dev->event_lock, irq_flags);
>  }
>  

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ