[SRU Z/Y/X] drm/virtio: don't leak bo on drm_gem_object_init failure

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[SRU Z/Y/X] drm/virtio: don't leak bo on drm_gem_object_init failure

Stefan Bader-2
From: Gerd Hoffmann <[hidden email]>

Reported-by: 李强 <[hidden email]>
Signed-off-by: Gerd Hoffmann <[hidden email]>
Link: http://patchwork.freedesktop.org/patch/msgid/20170406155941.458-1-kraxel@...

CVE-2017-10810

(cherry picked from commit 385aee965b4e4c36551c362a334378d2985b722a)
Signed-off-by: Stefan Bader <[hidden email]>
---

Fix pending in upstream 4.4.y queue. Can be cherry-picked into Z/Y/X.
Before v4.2 the virtio gpu driver did not exist. So T is not affected.
I updated the tracker with the correct breaks SHA1.

-Stefan


 drivers/gpu/drm/virtio/virtgpu_object.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c
index 1483dae..6f66b73 100644
--- a/drivers/gpu/drm/virtio/virtgpu_object.c
+++ b/drivers/gpu/drm/virtio/virtgpu_object.c
@@ -81,8 +81,10 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
  return -ENOMEM;
  size = roundup(size, PAGE_SIZE);
  ret = drm_gem_object_init(vgdev->ddev, &bo->gem_base, size);
- if (ret != 0)
+ if (ret != 0) {
+ kfree(bo);
  return ret;
+ }
  bo->dumb = false;
  virtio_gpu_init_ttm_placement(bo, pinned);
 
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [SRU Z/Y/X: CVE-2017-10810] drm/virtio: don't leak bo on drm_gem_object_init failure

Stefan Bader-2
On 12.07.2017 12:35, Stefan Bader wrote:
> From: Gerd Hoffmann <[hidden email]>
>
> Reported-by: 李强 <[hidden email]>
> Signed-off-by: Gerd Hoffmann <[hidden email]>
> Link: http://patchwork.freedesktop.org/patch/msgid/20170406155941.458-1-kraxel@...
>
> CVE-2017-10810

Should have added that to the subject initially, sorry.

-Stefan

>
> (cherry picked from commit 385aee965b4e4c36551c362a334378d2985b722a)
> Signed-off-by: Stefan Bader <[hidden email]>
> ---
>
> Fix pending in upstream 4.4.y queue. Can be cherry-picked into Z/Y/X.
> Before v4.2 the virtio gpu driver did not exist. So T is not affected.
> I updated the tracker with the correct breaks SHA1.
>
> -Stefan

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ACK / APPLIED[artful]: [SRU Z/Y/X] drm/virtio: don't leak bo on drm_gem_object_init failure

Seth Forshee
In reply to this post by Stefan Bader-2
On Wed, Jul 12, 2017 at 12:35:52PM +0200, Stefan Bader wrote:

> From: Gerd Hoffmann <[hidden email]>
>
> Reported-by: 李强 <[hidden email]>
> Signed-off-by: Gerd Hoffmann <[hidden email]>
> Link: http://patchwork.freedesktop.org/patch/msgid/20170406155941.458-1-kraxel@...
>
> CVE-2017-10810
>
> (cherry picked from commit 385aee965b4e4c36551c362a334378d2985b722a)
> Signed-off-by: Stefan Bader <[hidden email]>

Acked-by: Seth Forshee <[hidden email]>

Applied to artful/master-next, thanks.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ACK: [SRU Z/Y/X] drm/virtio: don't leak bo on drm_gem_object_init failure

Kleber Souza
In reply to this post by Stefan Bader-2
On 07/12/17 12:35, Stefan Bader wrote:

> From: Gerd Hoffmann <[hidden email]>
>
> Reported-by: 李强 <[hidden email]>
> Signed-off-by: Gerd Hoffmann <[hidden email]>
> Link: http://patchwork.freedesktop.org/patch/msgid/20170406155941.458-1-kraxel@...
>
> CVE-2017-10810
>
> (cherry picked from commit 385aee965b4e4c36551c362a334378d2985b722a)
> Signed-off-by: Stefan Bader <[hidden email]>
> ---
>
> Fix pending in upstream 4.4.y queue. Can be cherry-picked into Z/Y/X.
> Before v4.2 the virtio gpu driver did not exist. So T is not affected.
> I updated the tracker with the correct breaks SHA1.
>
> -Stefan
>
>
>  drivers/gpu/drm/virtio/virtgpu_object.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c
> index 1483dae..6f66b73 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_object.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_object.c
> @@ -81,8 +81,10 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
>   return -ENOMEM;
>   size = roundup(size, PAGE_SIZE);
>   ret = drm_gem_object_init(vgdev->ddev, &bo->gem_base, size);
> - if (ret != 0)
> + if (ret != 0) {
> + kfree(bo);
>   return ret;
> + }
>   bo->dumb = false;
>   virtio_gpu_init_ttm_placement(bo, pinned);
>  
>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

APPLIED: [SRU Z/Y/X] drm/virtio: don't leak bo on drm_gem_object_init failure

Thadeu Lima de Souza Cascardo-3
In reply to this post by Stefan Bader-2
Applied to xenial, yakkety and zesty master-next branches.

Thanks.
Cascardo.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Loading...