[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250325053058.412af7c5@kernel.org>
Date: Tue, 25 Mar 2025 05:30:58 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: Matthieu Baerts <matttbe@...nel.org>, Mat Martineau
<martineau@...nel.org>, Geliang Tang <geliang@...nel.org>, "David S.
Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo
Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next] mptcp: pm: Fix undefined behavior in
mptcp_remove_anno_list_by_saddr()
On Tue, 25 Mar 2025 12:33:11 +0100 Thorsten Blum wrote:
> On 25. Mar 2025, at 12:06, Thorsten Blum wrote:
> >
> > Commit e4c28e3d5c090 ("mptcp: pm: move generic PM helpers to pm.c")
> > removed a necessary if-check, leading to undefined behavior because
> > the freed pointer is subsequently returned from the function.
> >
> > Reintroduce the if-check to fix this and add a local return variable to
> > prevent further checkpatch warnings, which originally led to the removal
> > of the if-check.
> >
> > Fixes: e4c28e3d5c090 ("mptcp: pm: move generic PM helpers to pm.c")
> > Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
> > ---
>
> Never mind, technically it's not actually undefined behavior because of
> the implicit bool conversion, but returning a freed pointer still seems
> confusing.
CCing the list back in.
--
pw-bot: cr
Powered by blists - more mailing lists