[linux] 02/04: [x86] drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl() (CVE-2017-7346)
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Thu Jul 27 20:27:19 UTC 2017
This is an automated email from the git hooks/post-receive script.
carnil pushed a commit to branch jessie-security
in repository linux.
commit 5115e836de77f5637e2b5c7f0336940e3c76b102
Author: Salvatore Bonaccorso <carnil at debian.org>
Date: Thu Jul 27 22:05:18 2017 +0200
[x86] drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl() (CVE-2017-7346)
---
debian/changelog | 2 ++
...limit-the-number-of-mip-levels-in-vmw_gb_.patch | 33 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 36 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 6c5c6c1..e0c29f9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ linux (3.16.43-2+deb8u3) UNRELEASED; urgency=medium
* regulator: core: Fix regualtor_ena_gpio_free not to access pin after
freeing (CVE-2014-9940)
+ * [x86] drm/vmwgfx: limit the number of mip levels in
+ vmw_gb_surface_define_ioctl() (CVE-2017-7346)
-- Salvatore Bonaccorso <carnil at debian.org> Thu, 27 Jul 2017 22:02:24 +0200
diff --git a/debian/patches/bugfix/x86/drm-vmwgfx-limit-the-number-of-mip-levels-in-vmw_gb_.patch b/debian/patches/bugfix/x86/drm-vmwgfx-limit-the-number-of-mip-levels-in-vmw_gb_.patch
new file mode 100644
index 0000000..eed84ba
--- /dev/null
+++ b/debian/patches/bugfix/x86/drm-vmwgfx-limit-the-number-of-mip-levels-in-vmw_gb_.patch
@@ -0,0 +1,33 @@
+From: Vladis Dronov <vdronov at redhat.com>
+Date: Fri, 2 Jun 2017 07:42:09 +0200
+Subject: drm/vmwgfx: limit the number of mip levels in
+ vmw_gb_surface_define_ioctl()
+Origin: https://git.kernel.org/linus/ee9c4e681ec4f58e42a83cb0c22a0289ade1aacf
+Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2017-7346
+
+The 'req->mip_levels' parameter in vmw_gb_surface_define_ioctl() is
+a user-controlled 'uint32_t' value which is used as a loop count limit.
+This can lead to a kernel lockup and DoS. Add check for 'req->mip_levels'.
+
+References:
+https://bugzilla.redhat.com/show_bug.cgi?id=1437431
+
+Cc: <stable at vger.kernel.org>
+Signed-off-by: Vladis Dronov <vdronov at redhat.com>
+Reviewed-by: Sinclair Yeh <syeh at vmware.com>
+---
+ drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
+@@ -1251,6 +1251,9 @@ int vmw_gb_surface_define_ioctl(struct d
+ const struct svga3d_surface_desc *desc;
+ uint32_t backup_handle;
+
++ if (req->mip_levels > DRM_VMW_MAX_MIP_LEVELS)
++ return -EINVAL;
++
+ if (unlikely(vmw_user_surface_size == 0))
+ vmw_user_surface_size = ttm_round_pot(sizeof(*user_srf)) +
+ 128;
diff --git a/debian/patches/series b/debian/patches/series
index f9fbd96..f3df05f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -713,6 +713,7 @@ bugfix/all/ipv6-fix-out-of-bound-writes-in-__ip6_append_data.patch
bugfix/all/mm-larger-stack-guard-gap-between-vmas.patch
bugfix/all/mm-fix-new-crash-in-unmapped_area_topdown.patch
bugfix/all/regulator-core-Fix-regualtor_ena_gpio_free-not-to-ac.patch
+bugfix/x86/drm-vmwgfx-limit-the-number-of-mip-levels-in-vmw_gb_.patch
# Fix ABI changes
debian/of-fix-abi-changes.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list