[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250828191843.GH31759@horms.kernel.org>
Date: Thu, 28 Aug 2025 20:18:43 +0100
From: Simon Horman <horms@...nel.org>
To: Miaoqian Lin <linmq006@...il.com>
Cc: Karsten Keil <isdn@...ux-pingi.de>, Laura Abbott <labbott@...hat.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mISDN: Fix memory leak in dsp_hwec_enable()
On Thu, Aug 28, 2025 at 04:14:57PM +0800, Miaoqian Lin wrote:
> 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()").
Thanks for noting this, it was quite helpful to me.
>
> Fixes: 9a4381618262 ("mISDN: Remove VLAs")
> Signed-off-by: Miaoqian Lin <linmq006@...il.com>
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists