[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201127110649.62563a6c@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com>
Date: Fri, 27 Nov 2020 11:06:49 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Matthieu Baerts <matthieu.baerts@...sares.net>
Cc: Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
mptcp@...ts.01.org
Subject: Re: [PATCH net] mptcp: fix NULL ptr dereference on bad MPJ
On Thu, 26 Nov 2020 16:23:08 +0100 Matthieu Baerts wrote:
> On 26/11/2020 15:17, Paolo Abeni wrote:
> > If an msk listener receives an MPJ carrying an invalid token, it
> > will zero the request socket msk entry. That should later
> > cause fallback and subflow reset - as per RFC - at
> > subflow_syn_recv_sock() time due to failing hmac validation.
> >
> > Since commit 4cf8b7e48a09 ("subflow: introduce and use
> > mptcp_can_accept_new_subflow()"), we unconditionally dereference
> > - in mptcp_can_accept_new_subflow - the subflow request msk
> > before performing hmac validation. In the above scenario we
> > hit a NULL ptr dereference.
> >
> > Address the issue doing the hmac validation earlier.
> >
> > Fixes: 4cf8b7e48a09 ("subflow: introduce and use mptcp_can_accept_new_subflow()")
> > Tested-by: Davide Caratti <dcaratti@...hat.com>
> > Signed-off-by: Paolo Abeni <pabeni@...hat.com>
>
> Good catch! Thank you for the patch!
>
> Reviewed-by: Matthieu Baerts <matthieu.baerts@...sares.net>
Applied, thanks!
Powered by blists - more mailing lists