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:Alexey Khoroshilov <khoroshilov@ispras.ru> Fixes: 960366cf ("Add mISDN DSP") Signed-off-by:
David 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:
Pu Lehui <pulehui@huawei.com>
Loading
Please sign in to comment