tegra-cryptodev:check valid SHA message length
authorKonduri Praveen <kondurip@nvidia.com>
Thu, 27 Apr 2017 09:10:36 +0000 (14:10 +0530)
committerWinnie Hsu <whsu@nvidia.com>
Tue, 2 May 2017 18:00:31 +0000 (11:00 -0700)
commitb16c5fd826c790df730665dcb0835ce9631ac5e1
tree22699b2a1f1d722e4917db38c9b2ca6c954d9cc5
parentf93b0de608beb4d492bb45d7c264f1cf45940dc8
tegra-cryptodev:check valid SHA message length

SHA message length is provided from user space
through IOCTL call. If this length is not valid,
then it can lead to panic due to buffer overflow.

Fix by checking message length for SHA before
copying from user space

Bug 1883640

Change-Id: Idc5c6074784290b4622b1c23e5feb43849100cb5
Signed-off-by: Konduri Praveen <kondurip@nvidia.com>
Reviewed-on: http://git-master/r/1471180
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
drivers/misc/tegra-cryptodev.c