]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Avoid HDCP over-read and corruption
authorKees Cook <keescook@chromium.org>
Fri, 28 May 2021 17:53:54 +0000 (10:53 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Jun 2021 02:55:39 +0000 (22:55 -0400)
commit7c647091eeb25ba93f2a6d68dd5a33dc8899f50f
treee21ecc88d916bb8412b10124d249bf5c48717581
parentc6b4af83e6fa75db8f1465931e020c31c05a661b
drm/amd/display: Avoid HDCP over-read and corruption

Instead of reading the desired 5 bytes of the actual target field,
the code was reading 8. This could result in a corrupted value if the
trailing 3 bytes were non-zero, so instead use an appropriately sized
and zero-initialized bounce buffer, and read only 5 bytes before casting
to u64.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c