aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
diff options
context:
space:
mode:
authorLv Yunlong <[email protected]>2021-04-26 06:11:29 -0700
committerTakashi Iwai <[email protected]>2021-04-26 16:23:41 +0200
commit1c98f574403dbcf2eb832d5535a10d967333ef2d (patch)
tree554d0fa0bd9914a852e5289120a93c8f49307720 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
parent9bbb94e57df135ef61bef075d9c99b8d9e89e246 (diff)
ALSA: emu8000: Fix a use after free in snd_emu8000_create_mixer
Our code analyzer reported a uaf. In snd_emu8000_create_mixer, the callee snd_ctl_add(..,emu->controls[i]) calls snd_ctl_add_replace(.., kcontrol,..). Inside snd_ctl_add_replace(), if error happens, kcontrol will be freed by snd_ctl_free_one(kcontrol). Then emu->controls[i] points to a freed memory, and the execution comes to __error branch of snd_emu8000_create_mixer. The freed emu->controls[i] is used in snd_ctl_remove(card, emu->controls[i]). My patch set emu->controls[i] to NULL if snd_ctl_add() failed to avoid the uaf. Signed-off-by: Lv Yunlong <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
0 files changed, 0 insertions, 0 deletions