From owner-freebsd-net@FreeBSD.ORG Mon Dec 22 16:59:15 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81E579F0 for ; Mon, 22 Dec 2014 16:59:15 +0000 (UTC) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13A53645C4 for ; Mon, 22 Dec 2014 16:59:15 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id x12so7091580wgg.38 for ; Mon, 22 Dec 2014 08:59:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=vIzKh2acZDTRTGKgu/lh6jqUdY/zRYIY1jhe3w2JHkY=; b=NEDFHGzjv8RCWRS+uTN14LH9Jzuui96ig+QQd1rLnTlntnRxfHHrXYQDI6xv+kidP1 NeWr2xkd2brWErXvYTalzepC00nXW2QCUj5gBSrxDXZ1vKPF9XSBmcIoE07Q8gd86lyO 7ie1g7Q5xu0VzlBASX7HMxsOTyTwN6WkQZF0VfloPw3ALOVaGMVWVYypaiCYqBDFmonx nPyvoDtPPG7jD94kPznCcUvRqwRugTZH60SKY7yBBSHs7FSrq2n2l2FCb8TFZVdJq02i UzqWjdyAKY6gXrS24+/IDbaOZcp7fGGrmCpbCAjafjYvfvT8PMUW3ahdfz0YyWwSyJe+ YFGA== MIME-Version: 1.0 X-Received: by 10.194.179.166 with SMTP id dh6mr44011240wjc.87.1419267553434; Mon, 22 Dec 2014 08:59:13 -0800 (PST) Sender: jinmei.tatuya@gmail.com Received: by 10.194.44.66 with HTTP; Mon, 22 Dec 2014 08:59:13 -0800 (PST) In-Reply-To: <5495FAE5.8090707@bakulin.de> References: <5495FAE5.8090707@bakulin.de> Date: Mon, 22 Dec 2014 08:59:13 -0800 X-Google-Sender-Auth: cvlIRySWvxoaDSGQQY9lLS2S-Ks Message-ID: Subject: Re: IPv6 fragments handling From: =?UTF-8?B?56We5piO6YGU5ZOJ?= To: Ilya Bakulin Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD Net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 16:59:15 -0000 At Sat, 20 Dec 2014 23:40:37 +0100, Ilya Bakulin wrote: > But what we do is just silently discarding the overlapping segment, see [2]. > When using PF with fragment reassembly, the behavior changes to what RFC > says > and the packet is completely dropped. > > There is no security issue with current behavior, because the already > received > part is never overwritten, but following RFC a bit closer would be nice. > > Maybe we should fix the stack to drop such packets? That would be a nice cleanup (the current implementation you cited seems to be written way before RFC5722, so it's not surprising it doesn't follow the latest recommendation). > > [1] https://tools.ietf.org/html/rfc5722#section-4 > [2] https://github.com/freebsd/freebsd/blob/master/sys/netinet6/frag6.c#L443 -- JINMEI, Tatuya