From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH v2 net-next] ipv6: Implement limits on Hop-by-Hop and Destination options Date: Fri, 03 Nov 2017 10:11:08 +0900 (KST) Message-ID: <20171103.101108.660889899668900453.davem@davemloft.net> References: <20171030211600.6491-1-tom@quantonium.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, rohit@quantonium.net To: tom@quantonium.net Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:60412 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932657AbdKCBLL (ORCPT ); Thu, 2 Nov 2017 21:11:11 -0400 In-Reply-To: <20171030211600.6491-1-tom@quantonium.net> Sender: netdev-owner@vger.kernel.org List-ID: From: Tom Herbert Date: Mon, 30 Oct 2017 14:16:00 -0700 > RFC 8200 (IPv6) defines Hop-by-Hop options and Destination options > extension headers. Both of these carry a list of TLVs which is > only limited by the maximum length of the extension header (2048 > bytes). By the spec a host must process all the TLVs in these > options, however these could be used as a fairly obvious > denial of service attack. I think this could in fact be > a significant DOS vector on the Internet, one mitigating > factor might be that many FWs drop all packets with EH (and > obviously this is only IPv6) so an Internet wide attack might not > be so effective (yet!). ... > This patch adds configurable limits to Destination and Hop-by-Hop > options. There are three limits that may be set: > - Limit the number of options in a Hop-by-Hop or Destination options > extension header. > - Limit the byte length of a Hop-by-Hop or Destination options > extension header. > - Disallow unrecognized options in a Hop-by-Hop or Destination > options extension header. > > The limits are set in corresponding sysctls: > > ipv6.sysctl.max_dst_opts_cnt > ipv6.sysctl.max_hbh_opts_cnt > ipv6.sysctl.max_dst_opts_len > ipv6.sysctl.max_hbh_opts_len ... > Signed-off-by: Tom Herbert Applied to net-next, let's see how this goes. Thanks.