Commit e444dd76 authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by Zheng Zengkai
Browse files

mISDN: Fix memory leak in dsp_pipeline_build()

stable inclusion
from stable-v5.10.106
commit a3d5fcc6cf2ecbba5a269631092570aa285a24cb
bugzilla: https://gitee.com/openeuler/kernel/issues/I573US

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a3d5fcc6cf2ecbba5a269631092570aa285a24cb



--------------------------------

[ Upstream commit c6a502c2 ]

dsp_pipeline_build() allocates dup pointer by kstrdup(cfg),
but then it updates dup variable by strsep(&dup, "|").
As a result when it calls kfree(dup), the dup variable contains NULL.

Found by Linux Driver Verification project (linuxtesting.org) with SVACE.

Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Fixes: 960366cf ("Add mISDN DSP")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent f70366ce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment