linux_dsm_epyc7002/drivers/gpu/drm/amd
Paweł Gronowski 38e0c89a19 drm/amdgpu: Fix NULL dereference in dpm sysfs handlers
NULL dereference occurs when string that is not ended with space or
newline is written to some dpm sysfs interface (for example pp_dpm_sclk).
This happens because strsep replaces the tmp with NULL if the delimiter
is not present in string, which is then dereferenced by tmp[0].

Reproduction example:
sudo sh -c 'echo -n 1 > /sys/class/drm/card0/device/pp_dpm_sclk'

Signed-off-by: Paweł Gronowski <me@woland.xyz>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2020-07-21 16:00:01 -04:00
..
acp drm: amd/acp: fix broken menu structure 2020-03-13 11:52:35 -04:00
amdgpu drm/amdgpu: Fix NULL dereference in dpm sysfs handlers 2020-07-21 16:00:01 -04:00
amdkfd drm/amd: fix potential memleak in err branch 2020-06-24 18:03:16 -04:00
display drm/amd/display: handle failed allocation during stream construction 2020-07-14 15:14:15 -04:00
include drm/amdgpu: add apu flags (v2) 2020-05-22 13:41:53 -04:00
powerplay drm/amd/powerplay: fix a crash when overclocking Vega M 2020-07-21 15:59:32 -04:00