[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201111145720.0c743104@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Wed, 11 Nov 2020 14:57:20 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Xie He <xie.he.0141@...il.com>
Cc: Martin Schiller <ms@....tdt.de>, andrew.hendry@...il.com,
davem@...emloft.net, edumazet@...gle.com, xiyuyang19@...an.edu.cn,
linux-x25@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH v2] net/x25: Fix null-ptr-deref in x25_connect
On Wed, 11 Nov 2020 03:59:47 -0800 Xie He wrote:
> > @@ -825,7 +825,7 @@ static int x25_connect(struct socket *sock, struct sockaddr *uaddr,
> > sock->state = SS_CONNECTED;
> > rc = 0;
> > out_put_neigh:
> > - if (rc) {
> > + if (rc && x25->neighbour) {
> > read_lock_bh(&x25_list_lock);
> > x25_neigh_put(x25->neighbour);
> > x25->neighbour = NULL;
>
> Reviewed-by: Xie He <xie.he.0141@...il.com>
Applied, thanks!
Powered by blists - more mailing lists