From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Subject: Re: [PATCH 16/16] virtio_net: fix use after free on allocation failure Date: Mon, 6 Oct 2014 16:17:28 +0200 Message-ID: <20141006161728.5a329eea.cornelia.huck@de.ibm.com> References: <1412525038-15871-1-git-send-email-mst@redhat.com> <1412525038-15871-17-git-send-email-mst@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org To: "Michael S. Tsirkin" Return-path: In-Reply-To: <1412525038-15871-17-git-send-email-mst@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org List-Id: netdev.vger.kernel.org On Sun, 5 Oct 2014 19:07:38 +0300 "Michael S. Tsirkin" wrote: > In the extremely unlikely event that driver initialization fails after > RX buffers are added, virtio net frees RX buffers while VQs are > still active, potentially causing device to use a freed buffer. > > To fix, reset device first - same as we do on device removal. > > Signed-off-by: Michael S. Tsirkin > --- > drivers/net/virtio_net.c | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Cornelia Huck