Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5243011pxj; Wed, 9 Jun 2021 12:36:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPnWPoSqM+/PJ/8y64eRg1qGNhcEeHvaRfXD964XNRXU9tCxLCwpRZZTKKUHvRmDcChAP+ X-Received: by 2002:a17:906:7e4d:: with SMTP id z13mr1360620ejr.50.1623267401218; Wed, 09 Jun 2021 12:36:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623267401; cv=none; d=google.com; s=arc-20160816; b=cydAsXfs+6W8uOaa0VPcRuRNJQEkUzWB3/KinBTk2b2sSUadK601/jVeCIrm9f2Uo9 bu0gMwCGbVosI3JzyCQG8OaOWGELCKACDbPR2aVO2v7Il4u2Z2upx5TtC7xwuBa1eQ0j K88Avt8lb8i55bIadDIoIsjoRdIz/OtkTTYnqQNBU1sp5RoSvaiJmpQTT0QEEBr1q6GX oyJW9VPie6aPBRUyU4Ij0oKrb88FkIoMS2VverOmPfMoy6l/JbTIKNfyk8g9Cn4uGQJX /hEFh5G+stuzGbvBaylB2Z2M3NzA216H82Wn8NPoc7jXbL5tdAhWodMPvFwcftMJR92l JJDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Kjv1TaFT7DNmGuXZjVQZjCsKiMPUR5oy9C3+hGQQcUU=; b=GMCC5w4EjN29dZKcFOgY+02B89pV0e+/r4MHYfBr5AoTpfBsVWP/VWnkZxv0s++TDG K23A6N4joa2RD/1bFB1CcW4C5hwT16CVTNGXbjV24qf16F5XtQsicJPKjfjZe2QjyoLJ halxY5AO0s0otb0sgRqZJzzgadxRE3oVX7uLcGnawLXng7uQkGZV86vfYJtVPGbZP9ff 1ED3hOTF3ui5xqM+p0lNZgZ3FMv3rI0dTm+KcVaEOgtgupNWcdqHujtN4E7JEvxuKVWM 8VBBgCUkp+aXk0Uy7IJNEZowbjJUwoOYyqnfc5iCVhxRU6TJPgEMbqgpIrFIJ685nNZB 14zw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c6si511029ejc.409.2021.06.09.12.36.16; Wed, 09 Jun 2021 12:36:41 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229536AbhFITfz (ORCPT + 99 others); Wed, 9 Jun 2021 15:35:55 -0400 Received: from mail.netfilter.org ([217.70.188.207]:60022 "EHLO mail.netfilter.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbhFITfy (ORCPT ); Wed, 9 Jun 2021 15:35:54 -0400 Received: from netfilter.org (unknown [90.77.255.23]) by mail.netfilter.org (Postfix) with ESMTPSA id 6D72C6422C; Wed, 9 Jun 2021 21:32:45 +0200 (CEST) Date: Wed, 9 Jun 2021 21:33:53 +0200 From: Pablo Neira Ayuso To: Colin King Cc: Jozsef Kadlecsik , Florian Westphal , "David S . Miller" , Jakub Kicinski , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] etfilter: fix array index out-of-bounds error Message-ID: <20210609193353.GA4610@salvia> References: <20210608153408.160652-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210608153408.160652-1-colin.king@canonical.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 08, 2021 at 04:34:08PM +0100, Colin King wrote: > From: Colin Ian King > > Currently the array net->nf.hooks_ipv6 is accessed by index hook > before hook is sanity checked. Fix this by moving the sanity check > to before the array access. Applied, thanks.