Received: from eggs.gnu.org ([2001:4830:134:3::10]:33675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aW7BY-0008IM-29 for qemu-devel@nongnu.org; Wed, 17 Feb 2016 13:50:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aW7BU-000820-1o for qemu-devel@nongnu.org; Wed, 17 Feb 2016 13:50:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48665) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aW7BT-00081w-QU for qemu-devel@nongnu.org; Wed, 17 Feb 2016 13:50:43 -0500 Date: Thu, 18 Feb 2016 00:20:36 +0530 (IST) From: P J P In-Reply-To: <878u2jh4uz.fsf@blackfin.pond.sub.org> Message-ID: References: <1455710904-13368-1-git-send-email-ppandit@redhat.com> <878u2jh4uz.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [Qemu-devel] [PATCH] net: check packet payload length List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Jason Wang , Qemu Developers , Liu Ling +-- On Wed, 17 Feb 2016, Markus Armbruster wrote --+ | Is calling this function with a partial IPv4 TCP/UDP packet legitimate? | If partial packet is okay, what about a partial header? Partial? That shouldn't harm I guess. | If not, should we assert plen + hlen <= length? Or == length, even? The proposed patch would handle that, no? Ie return if it's >= length. Couple of places they check to ensure that length is > minimum packet length. | If either is legit, are the callers that can do it prepared for the | checksum not to be computed? IIUC checksum is not always computed, only if it's requested. | Style nitpick: we generally omit obviously superfluous parenthesis. Okay. Should I resend it? Thank you. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F