0001-vhost-user-gpu-fix-memory-disclosure-in-virgl_cmd_ge.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. CVE: CVE-2021-3545
  2. Upstream-Status: Backport
  3. Signed-off-by: Ross Burton <ross.burton@arm.com>
  4. From 121841b25d72d13f8cad554363138c360f1250ea Mon Sep 17 00:00:00 2001
  5. From: Li Qiang <liq3ea@163.com>
  6. Date: Sat, 15 May 2021 20:03:56 -0700
  7. Subject: [PATCH 1/7] vhost-user-gpu: fix memory disclosure in
  8. virgl_cmd_get_capset_info (CVE-2021-3545)
  9. MIME-Version: 1.0
  10. Content-Type: text/plain; charset=UTF-8
  11. Content-Transfer-Encoding: 8bit
  12. Otherwise some of the 'resp' will be leaked to guest.
  13. Fixes: CVE-2021-3545
  14. Reported-by: Li Qiang <liq3ea@163.com>
  15. virtio-gpu fix: 42a8dadc74 ("virtio-gpu: fix information leak
  16. in getting capset info dispatch")
  17. Signed-off-by: Li Qiang <liq3ea@163.com>
  18. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
  19. Message-Id: <20210516030403.107723-2-liq3ea@163.com>
  20. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  21. ---
  22. contrib/vhost-user-gpu/virgl.c | 1 +
  23. 1 file changed, 1 insertion(+)
  24. diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c
  25. index 9e6660c7ab..6a332d601f 100644
  26. --- a/contrib/vhost-user-gpu/virgl.c
  27. +++ b/contrib/vhost-user-gpu/virgl.c
  28. @@ -128,6 +128,7 @@ virgl_cmd_get_capset_info(VuGpu *g,
  29. VUGPU_FILL_CMD(info);
  30. + memset(&resp, 0, sizeof(resp));
  31. if (info.capset_index == 0) {
  32. resp.capset_id = VIRTIO_GPU_CAPSET_VIRGL;
  33. virgl_renderer_get_cap_set(resp.capset_id,
  34. --
  35. 2.25.1