tegra-cryptodev:check valid SHA message length
authorKonduri Praveen <kondurip@nvidia.com>
Wed, 3 May 2017 05:11:36 +0000 (10:11 +0530)
committerWinnie Hsu <whsu@nvidia.com>
Fri, 12 May 2017 21:47:31 +0000 (14:47 -0700)
commit17c9c8988609009037ea042895e069649f5cd9af
tree7f553dfca6e09f76c659ef8d149ba184bd1c01bb
parent2fbdf0a05ced728ea9c8b26f18eb9e2676fc9726
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: I08e7a6037251822b7e8a3e1b7f00f71dc0495aba
Signed-off-by: Konduri Praveen <kondurip@nvidia.com>
Reviewed-on: http://git-master/r/1474442
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
drivers/misc/tegra-cryptodev.h