]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 May 2021 09:52:33 +0000 (11:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 May 2021 09:52:33 +0000 (11:52 +0200)
added patches:
drm-radeon-fix-copy-of-uninitialized-variable-back-to-userspace.patch

queue-4.19/drm-radeon-fix-copy-of-uninitialized-variable-back-to-userspace.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/drm-radeon-fix-copy-of-uninitialized-variable-back-to-userspace.patch b/queue-4.19/drm-radeon-fix-copy-of-uninitialized-variable-back-to-userspace.patch
new file mode 100644 (file)
index 0000000..f129667
--- /dev/null
@@ -0,0 +1,39 @@
+From 8dbc2ccac5a65c5b57e3070e36a3dc97c7970d96 Mon Sep 17 00:00:00 2001
+From: Colin Ian King <colin.king@canonical.com>
+Date: Wed, 3 Mar 2021 00:27:59 +0000
+Subject: drm/radeon: fix copy of uninitialized variable back to userspace
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Colin Ian King <colin.king@canonical.com>
+
+commit 8dbc2ccac5a65c5b57e3070e36a3dc97c7970d96 upstream.
+
+Currently the ioctl command RADEON_INFO_SI_BACKEND_ENABLED_MASK can
+copy back uninitialised data in value_tmp that pointer *value points
+to. This can occur when rdev->family is less than CHIP_BONAIRE and
+less than CHIP_TAHITI.  Fix this by adding in a missing -EINVAL
+so that no invalid value is copied back to userspace.
+
+Addresses-Coverity: ("Uninitialized scalar variable)
+Cc: stable@vger.kernel.org # 3.13+
+Fixes: 439a1cfffe2c ("drm/radeon: expose render backend mask to the userspace")
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/radeon/radeon_kms.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/radeon/radeon_kms.c
++++ b/drivers/gpu/drm/radeon/radeon_kms.c
+@@ -501,6 +501,7 @@ static int radeon_info_ioctl(struct drm_
+                       *value = rdev->config.si.backend_enable_mask;
+               } else {
+                       DRM_DEBUG_KMS("BACKEND_ENABLED_MASK is si+ only!\n");
++                      return -EINVAL;
+               }
+               break;
+       case RADEON_INFO_MAX_SCLK:
index 5f4f7ca03c631ab6929f2ed51f8e2fcffeced101..26be88b312fcca3ba6f3ec8f47a57c4268763807 100644 (file)
@@ -146,3 +146,4 @@ md-fix-missing-unused-status-line-of-proc-mdstat.patch
 mips-reinstate-platform-__div64_32-handler.patch
 ipw2x00-potential-buffer-overflow-in-libipw_wx_set_encodeext.patch
 cfg80211-scan-drop-entry-from-hidden_list-on-overflow.patch
+drm-radeon-fix-copy-of-uninitialized-variable-back-to-userspace.patch