Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4818472pxb; Thu, 14 Oct 2021 12:35:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbqP3nra/4fMeDXmCwL0sQLb1cXJTH/XpSwfSbAQp/j2AsCIgU0piXkB61SKM1LEqzJtvZ X-Received: by 2002:a63:3483:: with SMTP id b125mr5802494pga.79.1634240101188; Thu, 14 Oct 2021 12:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634240101; cv=none; d=google.com; s=arc-20160816; b=BB8JFTsjxEEUu2w9wbpcVdbZqubE5VvW8dZRDODrpmEAUG9P6FvWjMzDwKxdKIWEoZ srAIIFe3sUD5A9BpgD52DltoYLWnE+h5BZvyyA4wIelNe7w3cd23vIsCSyU2GOKJpod0 bGurkH79zp+gCMw2t0LJpULSBfuAjtH/TjMDX31TicjAc8iUVve6ZqVkcDSQsM9a36h1 KU7go/f2Ccar0Au8nyr5OVQiFRPBZO1AvnkZiqXj6VvogbKgulM3B6klVmHL7XNpe7Hw eZDDDeUJEAq8TfFEcTo1WIbEfFq21b/8k1ZieFHWh5I7QX4zDvmn1tbIwXEK+3Mhk8+l VYtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8gnrOKO2iqa+L/2Sca80Yto7eTGKNUKeLGTH8ejOFFE=; b=b5iWf2MAMVAKw77Amtw/ioBaT6196kJWMmpKoGvsoca+Knv0x6ddgDC9vfRdX2Ae0G 6OyJVpAZC5sjV51/AjQAZKoCYvX/56+F1JC8as1FzWPUUodFoLnAw2wAS1HZOMcn4Hyl hWEKB17Aq5xs9aq3OeGv8B0Gy4ty3GjqrnY8O1M3bbQVMCQRbUpigeR628UO2m3pL1YB r41TLe1KAkpTebRxnVlweUy30OaJ0/y5ACwWjlll+kG79iQ/bOXJnyhi9g1jxYKmaGNf sybX1kl7BQpl3plYPeQzDLWS5Hh/08CVNZaBUCXfeX5Bm1YIMImDRigThoLGr/x9ZXu3 xKJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Pl7qHdt7; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u187si4571926pfc.174.2021.10.14.12.34.45; Thu, 14 Oct 2021 12:35:01 -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=@linuxfoundation.org header.s=korg header.b=Pl7qHdt7; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232954AbhJNPFI (ORCPT + 99 others); Thu, 14 Oct 2021 11:05:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:44512 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232556AbhJNPDe (ORCPT ); Thu, 14 Oct 2021 11:03:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D20606121F; Thu, 14 Oct 2021 15:00:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634223619; bh=/ggK83Mt//2/kCPdLnCsSx0Vac0wyAk+F1AEtyVh3yM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pl7qHdt7t5i8xYgp41XrCWUQ09ySHxzRCknVeQcyX6EV32k8khPHliDDw6jSBaHLJ uMJUOmhAuYwDNi5jTcgb8bw1+eawjyRkFU/7yFQQlm3a0MBqKeS6d6Z1yyZIPuQOfq CofdO/pgvJrcVbfvPPXAVVhnsbr6ob4CYteKDyGk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jeremy Sowden , Florian Westphal , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 5.10 05/22] netfilter: ip6_tables: zero-initialize fragment offset Date: Thu, 14 Oct 2021 16:54:11 +0200 Message-Id: <20211014145208.156776903@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211014145207.979449962@linuxfoundation.org> References: <20211014145207.979449962@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jeremy Sowden [ Upstream commit 310e2d43c3ad429c1fba4b175806cf1f55ed73a6 ] ip6tables only sets the `IP6T_F_PROTO` flag on a rule if a protocol is specified (`-p tcp`, for example). However, if the flag is not set, `ip6_packet_match` doesn't call `ipv6_find_hdr` for the skb, in which case the fragment offset is left uninitialized and a garbage value is passed to each matcher. Signed-off-by: Jeremy Sowden Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- net/ipv6/netfilter/ip6_tables.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index eb2b5404806c..d36168baf677 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c @@ -273,6 +273,7 @@ ip6t_do_table(struct sk_buff *skb, * things we don't know, ie. tcp syn flag or ports). If the * rule is also a fragment-specific rule, non-fragments won't * match it. */ + acpar.fragoff = 0; acpar.hotdrop = false; acpar.state = state; -- 2.33.0