Commit 1336b886 authored by Patrik Jakobsson's avatar Patrik Jakobsson Committed by Greg Kroah-Hartman
Browse files

drm/amdgpu: Fix even more out of bound writes from debugfs



commit 3f4e54bd upstream.

CVE-2021-42327 was fixed by:

commit f23750b5
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: 918698d5 ("drm/amd/display: Return the number of bytes parsed than allocated")
Signed-off-by: default avatarPatrik Jakobsson <pjakobsson@suse.de>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
[ Cherry-pick the fix and drop the following functions which were introduced
  since 5.13 or later: dp_max_bpc_write() was introduced in commit cca912e0
  ("drm/amd/display: Add max bpc debugfs") dp_dsc_passthrough_set() was
  introduced in commit fcd1e484 ("drm/amd/display: Add debugfs entry for
  dsc passthrough"). ]
Signed-off-by: default avatarXiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: default avatarHe Zhe <zhe.he@windriver.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 42fb88d8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment