BACKPORT: drm: crtc: integer overflow in drm_property_create_blob()
authorShreshtha SAHU <ssahu@nvidia.com>
Wed, 30 Nov 2016 18:38:01 +0000 (23:38 +0530)
committerWinnie Hsu <whsu@nvidia.com>
Fri, 5 May 2017 21:57:52 +0000 (14:57 -0700)
commit6a07aed9992e4e9f2008728209b83a38b5ae60c8
treeb8902b1ec419374da45818f93be8cc630ab2d75f
parent988a3d056cd599a4f3e18d3b589303efd33fb13a
BACKPORT: drm: crtc: integer overflow in drm_property_create_blob()

The size here comes from the user via the ioctl, it is a number between
1-u32max so the addition here could overflow on 32 bit systems.

This patch fixes a security vulnerability reported here:
https://code.google.com/p/android/issues/detail?id=228947

Change-Id: I17ed8c6e30826074cfc6dd833deb423be9bd89c5
Fixes: f453ba046074 ('DRM: add mode setting support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Cc: stable@kernel.org # v4.2
Signed-off-by: Dave Airlie <airlied@gmail.com>

Bug 1846814

Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Change-Id: I308e65797972a0a0650bd96bd130dfd2fbe9c993
Reviewed-on: http://git-master/r/1262503
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
drivers/gpu/drm/drm_crtc.c