]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mISDN: Fix memory leak in dsp_hwec_enable()
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 28 Aug 2025 08:14:57 +0000 (16:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Sep 2025 16:56:22 +0000 (18:56 +0200)
commit1dda64fb3f5e9958e186ae09d035c19a6d439fbe
tree82b5e5a20d2467b5d8b33a1a127bd8854e18f2c7
parent9a4abe262df96aed463271d75f40b9076d82d7b0
mISDN: Fix memory leak in dsp_hwec_enable()

[ Upstream commit 0704a3da7ce50f972e898bbda88d2692a22922d9 ]

dsp_hwec_enable() allocates dup pointer by kstrdup(arg),
but then it updates dup variable by strsep(&dup, ",").
As a result when it calls kfree(dup), the dup variable may be
a modified pointer that no longer points to the original allocated
memory, causing a memory leak.

The issue is the same pattern as fixed in commit c6a502c22999
("mISDN: Fix memory leak in dsp_pipeline_build()").

Fixes: 9a4381618262 ("mISDN: Remove VLAs")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250828081457.36061-1-linmq006@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/isdn/mISDN/dsp_hwec.c