linux/drivers/isdn
Miaoqian Lin e96d08ddbc mISDN: Fix memory leak in dsp_hwec_enable()
[ Upstream commit 0704a3da7c ]

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 c6a502c229
("mISDN: Fix memory leak in dsp_pipeline_build()").

Fixes: 9a43816182 ("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>
History 2025-09-09 18:50:18 +02:00
..
capi isdn: cpai: check ctr->cnr to avoid array index out of bound 2021-10-08 16:52:58 -07:00
hardware mISDN: Fix a use after free in hfcmulti_tx() 2024-08-19 05:45:25 +02:00
mISDN mISDN: Fix memory leak in dsp_hwec_enable() 2025-09-09 18:50:18 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile isdn: capi: dead code removal 2019-12-11 09:12:38 +01:00