drm/amdgpu: Fix even more out of bound writes from debugfs
authorPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
Wed, 27 Oct 2021 14:27:30 +0000 (16:27 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Oct 2021 02:02:28 +0000 (22:02 -0400)
commit3f4e54bd312d3dafb59daf2b97ffa08abebe60f5
tree44080b77f2f4aff13746b1c093266d504b11936c
parentdefbbcd99fa68cb7feed453662048baa87e9a441
drm/amdgpu: Fix even more out of bound writes from debugfs

CVE-2021-42327 was fixed by:

commit f23750b5b3d98653b31d4469592935ef6364ad67
Author: Thelford Williams <tdwilliamsiv@gmail.com>
Date:   Wed Oct 13 16:04:13 2021 -0400

    drm/amdgpu: fix out of bounds write

but amdgpu_dm_debugfs.c contains more of the same issue so fix the
remaining ones.

v2:
* Add missing fix in dp_max_bpc_write (Harry Wentland)

Fixes: 918698d5c2b5 ("drm/amd/display: Return the number of bytes parsed than allocated")
Signed-off-by: Patrik Jakobsson <pjakobsson@suse.de>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c