Received: from eggs.gnu.org ([2001:4830:134:3::10]:37138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG15m-0008Rp-Q5 for qemu-devel@nongnu.org; Mon, 04 Jan 2016 04:06:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aG15h-0005Us-RP for qemu-devel@nongnu.org; Mon, 04 Jan 2016 04:06:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG15h-0005Um-M7 for qemu-devel@nongnu.org; Mon, 04 Jan 2016 04:06:13 -0500 Date: Mon, 4 Jan 2016 14:36:00 +0530 (IST) From: P J P In-Reply-To: <568A2354.9010003@redhat.com> Message-ID: References: <1451561727-21105-1-git-send-email-ppandit@redhat.com> <568A2354.9010003@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [Qemu-devel] [PATCH v3] net: ne2000: fix bounds check in ioport operations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: QEMU Developers , Ling Liu +-- On Mon, 4 Jan 2016, Jason Wang wrote --+ | > + if (addr < 32 | > + || (addr >= NE2000_PMEM_START | > + && addr + sizeof(uint32_t) - 1 < NE2000_MEM_SIZE)) { | > return ldl_le_p(s->mem + addr); | > } else { | > return 0xffffffff; | | Applied to my -net with minor tweaks: | | Change "addr + sizeof(uint32_t) - 1 < NE2000_MEM_SIZE" to "addr + | sizeof(uint32_t) <= NE2000_MEM_SIZE". Okay, thank you. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F