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 18:26:59 +0000 (14:26 -0400)
commit839e59a34394905fef73093e8605f50a9eb6d802
treeab10facf990a0a4b6ddeaadec72da03db576e559
parent58f8c7fa886115f4449539694a52f354b540fbbe
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>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c