Received: from eggs.gnu.org ([2001:4830:134:3::10]:53125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmlg2-00014J-OK for qemu-devel@nongnu.org; Wed, 21 Sep 2016 13:51:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmlfw-0003D1-RX for qemu-devel@nongnu.org; Wed, 21 Sep 2016 13:51:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmlfw-0003Cw-Lt for qemu-devel@nongnu.org; Wed, 21 Sep 2016 13:51:16 -0400 Date: Wed, 21 Sep 2016 23:21:06 +0530 (IST) From: P J P In-Reply-To: <82247f9a-3f0a-271d-48ef-7c9b8b0808b0@redhat.com> Message-ID: References: <1474465525-31581-1-git-send-email-ppandit@redhat.com> <82247f9a-3f0a-271d-48ef-7c9b8b0808b0@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [Qemu-devel] [PATCH for v2.6.0] net: imx: check buffer descriptor length List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Qemu Developers , Jason Wang , Li Qiang +-- On Wed, 21 Sep 2016, Paolo Bonzini wrote --+ | > diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c | > index e60e338..31870b0 100644 | > --- a/hw/net/imx_fec.c | > +++ b/hw/net/imx_fec.c | > @@ -276,7 +276,7 @@ static void imx_fec_do_tx(IMXFECState *s) | > imx_fec_read_bd(&bd, addr); | > FEC_PRINTF("tx_bd %x flags %04x len %d data %08x\n", | > addr, bd.flags, bd.length, bd.data); | > - if ((bd.flags & FEC_BD_R) == 0) { | > + if (!bd.length || (bd.flags & FEC_BD_R) == 0) { | > /* Run out of descriptors to transmit. */ | > break; | > } | > | | Same here---and same bug as the previous patch too: Yep, same issue as the other patch. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F