Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2206781pxb; Fri, 25 Mar 2022 13:03:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7hqmOPmfznh/N8ipPeq6I11al1QqaIYUu0/foXsslBJxatgEzt41/b+g65QE5NEODNnHi X-Received: by 2002:a17:902:db0c:b0:154:1b36:6a6b with SMTP id m12-20020a170902db0c00b001541b366a6bmr13337788plx.7.1648238584636; Fri, 25 Mar 2022 13:03:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648238584; cv=none; d=google.com; s=arc-20160816; b=Adkgs5fSjpOoMPsVdNAIe2tKrmTK5rfrBOi/9IoiOjddWbarl0xXNy3x+6wKVWF2Ka ILnezbav7UMLSTL7QlN9ht90T8yj7ePqhHEAbrmneYEYXPO/Eb2M2KdxbIfKtBoaL/Si KIhu0pzMXRgzC30VVMr4rmfnM0tF+HgCE1oP4xuTu3nNfsM+y/QY6CKax+aBVX/vV651 W8aLBDvOpFpehvRIkWqrTCnURbjriLtYv2cleGPCsrYeZiJPLLhT+If9+T5pJvvJnNex vlmaSkalEv4W24txrGP7loCHqvdjoTRYLubFGYb7rReVfgzNEEyqXk2ZtxNtEhAjwhNg bloQ== 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=+5UZtAQrYabYRkE4lfyfDh5zlR6XPKUeTe4v03rJv1M=; b=KD/ABj8sNyWeRVMiITHSAKqdtF+wQBnmYt+Cpf4KsIkf9Yia9SzfSqnmm6it2sRGgD avmT448/oH9c5P4sI/Au1Z3q6Oh0u1c3ClzgNtFQqY4nYnbUQwxhkNm6SPdxgKQO7XVX TPU3GsVzw6UXRxl8CLKP7MdS2keUG5f+dbkrin2rqwVENV0zzqrBmRdcAa8DmbToJu5+ ti0oy9GvE7D/KgPoYZZM3Lytxlp9MMw7iZVm8/hPpON9ylCnBlkM9+saK9ary6Dx4GgU 41fGD0m8iRYpqY074GZ+f+uaCF9mEY2d3NItL4w1MAajKxUSIMFOxv/Tczys0oBPag0H pEIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="btyqAdj/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o12-20020a056a00214c00b004fa3a8dffd0si3548563pfk.135.2022.03.25.13.03.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 13:03:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="btyqAdj/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AB4CC3A5159; Fri, 25 Mar 2022 11:53:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359496AbiCYPI2 (ORCPT + 99 others); Fri, 25 Mar 2022 11:08:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359497AbiCYPHJ (ORCPT ); Fri, 25 Mar 2022 11:07:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E62DD95F3; Fri, 25 Mar 2022 08:05:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 41919B828FB; Fri, 25 Mar 2022 15:05:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BBECC340E9; Fri, 25 Mar 2022 15:05:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1648220728; bh=TqXe9YFq23t1/gzrasVd1FhOgppT1K15PivWNvtui84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=btyqAdj/mvr/d7vcov3wjm5yCt8fv3QSl10lVMWG0BRChHDqU4P3dEIpfoRDiM8b4 eE/e/X66kP4DtBHLB2da+nF8UBDc717i79fVTBuUnrsK18yghWjXilbLPCjZa62mRa naGxGhNN0IPTuXqQC2JoE61l5dd5OMelnPqC+aXI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pablo Neira Ayuso Subject: [PATCH 4.9 09/14] netfilter: nf_tables: initialize registers in nft_do_chain() Date: Fri, 25 Mar 2022 16:04:37 +0100 Message-Id: <20220325150415.972515117@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325150415.694544076@linuxfoundation.org> References: <20220325150415.694544076@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pablo Neira Ayuso commit 4c905f6740a365464e91467aa50916555b28213d upstream. Initialize registers to avoid stack leak into userspace. Fixes: 96518518cc41 ("netfilter: add nftables") Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- net/netfilter/nf_tables_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/netfilter/nf_tables_core.c +++ b/net/netfilter/nf_tables_core.c @@ -127,7 +127,7 @@ nft_do_chain(struct nft_pktinfo *pkt, vo const struct net *net = pkt->net; const struct nft_rule *rule; const struct nft_expr *expr, *last; - struct nft_regs regs; + struct nft_regs regs = {}; unsigned int stackptr = 0; struct nft_jumpstack jumpstack[NFT_JUMP_STACK_SIZE]; struct nft_stats *stats;