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: <CAKLwHdVZSRtnCe_=pTw0kUaTEvCRKqypcq-u2f50o=xRQCrASA@mail.gmail.com>
Date: Fri, 26 Apr 2024 11:20:47 +0300
From: Martin Krastev <martin.krastev@...adcom.com>
To: Zack Rusin <zack.rusin@...adcom.com>
Cc: dri-devel@...ts.freedesktop.org, 
	Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>, ian.forbes@...adcom.com, 
	maaz.mombasawala@...adcom.com, zdi-disclosures@...ndmicro.com, 
	David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>, linux-kernel@...r.kernel.org, 
	stable@...r.kernel.org
Subject: Re: [PATCH] drm/vmwgfx: Fix invalid reads in fence signaled events

LGTM!

Reviewed-by: Martin Krastev <martin.krastev@...adcom.com>

Regards,
Martin

On Thu, Apr 25, 2024 at 10:27 PM Zack Rusin <zack.rusin@...adcom.com> wrote:
>
> Correctly set the length of the drm_event to the size of the structure
> that's actually used.
>
> The length of the drm_event was set to the parent structure instead of
> to the drm_vmw_event_fence which is supposed to be read. drm_read
> uses the length parameter to copy the event to the user space thus
> resuling in oob reads.
>
> Signed-off-by: Zack Rusin <zack.rusin@...adcom.com>
> Fixes: 8b7de6aa8468 ("vmwgfx: Rework fence event action")
> Reported-by: zdi-disclosures@...ndmicro.com # ZDI-CAN-23566
> Cc: David Airlie <airlied@...il.com>
> CC: Daniel Vetter <daniel@...ll.ch>
> Cc: Zack Rusin <zack.rusin@...adcom.com>
> Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>
> Cc: dri-devel@...ts.freedesktop.org
> Cc: linux-kernel@...r.kernel.org
> Cc: <stable@...r.kernel.org> # v3.4+
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> index 2a0cda324703..5efc6a766f64 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> @@ -991,7 +991,7 @@ static int vmw_event_fence_action_create(struct drm_file *file_priv,
>         }
>
>         event->event.base.type = DRM_VMW_EVENT_FENCE_SIGNALED;
> -       event->event.base.length = sizeof(*event);
> +       event->event.base.length = sizeof(event->event);
>         event->event.user_data = user_data;
>
>         ret = drm_event_reserve_init(dev, file_priv, &event->base, &event->event.base);
> --
> 2.40.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ