tegra: dc: hdcp: Fix buffer overflow in driver
authorPranami Bhattacharya <pranamib@nvidia.com>
Thu, 22 Dec 2016 22:52:58 +0000 (14:52 -0800)
committerManish Tuteja <mtuteja@nvidia.com>
Thu, 6 Apr 2017 20:29:25 +0000 (13:29 -0700)
commite28663ae51a18e2d54c6de0b1fe637879b7a49a7
tree7ba6f36eca9bd49a32dd6fb7b73da170be470449
parentd0926e65083b003c77cd1c537049633c0c78b0c5
tegra: dc: hdcp: Fix buffer overflow in driver

- We are allocating a buffer of 16 bytes
- While assigning values to the buffer, we run past 16 bytes
- This leads to buffer overflow and can cause exploits
- We have now increased the packet size to 32 bytes
- This will avoid any overflow

Bug 1856227

Change-Id: Ic3cf1054efbbe06a0d7579dee236071cced9f592
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/1275811
(cherry picked from commit b2f451bbc25fc64ac31fd33d2ead9ba011dd52a3)
Reviewed-on: http://git-master/r/1455421
Reviewed-by: Pranami Bhattacharya <pranamib@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Pranami Bhattacharya <pranamib@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
drivers/video/tegra/dc/hdmihdcp.c