[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180623.102435.440104910657366197.davem@davemloft.net>
Date: Sat, 23 Jun 2018 10:24:35 +0900 (KST)
From: David Miller <davem@...emloft.net>
To: jasowang@...hat.com
Cc: mst@...hat.com, kvm@...r.kernel.org,
virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, dan.carpenter@...cle.com
Subject: Re: [PATCH net] vhost_net: validate sock before trying to put its
fd
From: Jason Wang <jasowang@...hat.com>
Date: Thu, 21 Jun 2018 13:11:31 +0800
> Sock will be NULL if we pass -1 to vhost_net_set_backend(), but when
> we meet errors during ubuf allocation, the code does not check for
> NULL before calling sockfd_put(), this will lead NULL
> dereferencing. Fixing by checking sock pointer before.
>
> Fixes: bab632d69ee4 ("vhost: vhost TX zero-copy support")
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Jason Wang <jasowang@...hat.com>
Applied and queued up for -stable, thanks Jason.
Powered by blists - more mailing lists