Skip to content
Commit eb2aa542 authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by Pu Lehui
Browse files

mISDN: Fix memory leak in dsp_pipeline_build()

mainline inclusion
from mainline-v5.17-rc8
commit c6a502c2
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IADGSF
CVE: CVE-2022-48863

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c6a502c22999



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

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>
Conflicts:
	drivers/isdn/mISDN/dsp_pipeline.c
[The conflicts were due to not merge some unnecessary commit]
Signed-off-by: default avatarPu Lehui <pulehui@huawei.com>
parent 9bfba252
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment