Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1851780pxk; Tue, 1 Sep 2020 09:14:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSLcjPHPDSdk8Bwt5zqZ+DnzWzYUqINQ/D15TtBiqWdeniljtYDq+pr/EmZRghV6owrDAg X-Received: by 2002:a17:906:9941:: with SMTP id zm1mr2120054ejb.288.1598976871973; Tue, 01 Sep 2020 09:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598976871; cv=none; d=google.com; s=arc-20160816; b=o/k2RA7/BnkG8HDgYjgPS4Z4Q8W1nYbw+vrcXHstiTUT0uqH3Wr8L65VwC41YLJOL0 p45oIEY/mOLgKDhbnr5WG8OJ5NuPPoCnouRC048qUOrnDq6itL9FchxDwhwTrQy+1Owb 8ZPGTwsVcWisK538DX9i2NJwFxtHZlR1fAltKrWEj7XGbHsHvYsSzYnDIB0uJJgZOtjD JqDkYWPNZ3EJESZT6PvtOx9I3VPbBbUSdp/hHFosqlsVTpri7qWPse4ZjoaixyAaTiQb tH6U04SMnSV/v0ui/xBOW0pIO8H5Fzz2hoNFnqDXEWasLYSloKJiVsdC1N6326P4QJFE la3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=DIn7HAWHoF3tRx54iIB87mX64s4oghSTJT4MIBhWgqU=; b=bMyt/WKV++t9CD6kwhCkuIqL8hNCuP4mjh1j7rm6QAzFgckEGnzOvlsx4Fv1gZ5kib K6ZDTZEmtryO4O+5BQY68+kb6W+5oOm60eU/VlO3K1vtq4Se+0jB75g61NWL9bvo4QCn WZVy98EJHVygZe/DoESOFAcQQ9W1Ohm28/UzDCbpkob9l61ulPNxMD9pcwZmw4jGGZuf +NtfswMjCwnxe52pHQ0lmztmxviHZljwaabVeDIwZnRGfEUmtk+EJG31sj2fckSb91yT tpGcEZBzK/gbH7S+sa6ZslPydyGxE/G7oiYfyBr1Iy6lD0NC+CHZ54t30m3CgXMJi9KD 4PTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jOqn0iuY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id br19si833472ejb.151.2020.09.01.09.14.07; Tue, 01 Sep 2020 09:14:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jOqn0iuY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731854AbgIAQNc (ORCPT + 99 others); Tue, 1 Sep 2020 12:13:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:42944 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728355AbgIAPgO (ORCPT ); Tue, 1 Sep 2020 11:36:14 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1B18F214D8; Tue, 1 Sep 2020 15:36:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598974573; bh=l1KxbslgXDTTFr//cJ3Gfyy1Gco4KliBv+y/wKQgfew=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jOqn0iuYFzorU/TALy7/NaFHLNxaHjeM66V447+gk7sU/ArUiRPcNR4hJncWIDc/m quMoc8AKiGuz2a6YKeomOhQ16P2X2ysHvILxTv0wbp2GJ9R/plHqscBfD0YKrNk2pE +QMg6JaAsC0W2bXhUgAWFcUA1Pc6uWfwvEuSB/CA= Date: Tue, 1 Sep 2020 16:36:08 +0100 From: Will Deacon To: Pablo Neira Ayuso Cc: William Mcvicker , security@kernel.org, Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com, stable@vger.kernel.org Subject: Re: [PATCH v2 1/1] netfilter: nat: add a range check for l3/l4 protonum Message-ID: <20200901153607.GC4292@willie-the-truck> References: <20200727175720.4022402-1-willmcvicker@google.com> <20200727175720.4022402-2-willmcvicker@google.com> <20200729214607.GA30831@salvia> <20200731002611.GA1035680@google.com> <20200731175115.GA16982@salvia> <20200731181633.GA1209076@google.com> <20200803183156.GA3084830@google.com> <20200804113711.GA20988@salvia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200804113711.GA20988@salvia> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Will, Pablo, On Tue, Aug 04, 2020 at 01:37:11PM +0200, Pablo Neira Ayuso wrote: > This patch is much smaller and if you confirm this is address the > issue, then this is awesome. Did that ever get confirmed? AFAICT, nothing ended up landing in the stable trees for this. Cheers, Will > On Mon, Aug 03, 2020 at 06:31:56PM +0000, William Mcvicker wrote: > [...] > > diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c > > index 31fa94064a62..56d310f8b29a 100644 > > --- a/net/netfilter/nf_conntrack_netlink.c > > +++ b/net/netfilter/nf_conntrack_netlink.c > > @@ -1129,6 +1129,8 @@ ctnetlink_parse_tuple(const struct nlattr * const cda[], > > if (!tb[CTA_TUPLE_IP]) > > return -EINVAL; > > > > + if (l3num >= NFPROTO_NUMPROTO) > > + return -EINVAL; > > l3num can only be either NFPROTO_IPV4 or NFPROTO_IPV6. > > Other than that, bail out with EOPNOTSUPP. > > Thank you.