Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2195238pxb; Fri, 25 Mar 2022 12:49:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyESkCREmn5P5OSgwbxTyYO2nphOdUGNzw4y7hX+mNOoJS9bUFKvqS+KYQtKF/oxBtmd4bF X-Received: by 2002:a17:902:e5c8:b0:154:7d7d:20ab with SMTP id u8-20020a170902e5c800b001547d7d20abmr13191875plf.29.1648237741502; Fri, 25 Mar 2022 12:49:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648237741; cv=none; d=google.com; s=arc-20160816; b=B7k1dsfCyzQc1nkR445QvBDV8JEcplobz8SqTX2e3Gug10zZPWuCDIoK+qAlwVOSDB MKvKi6tUSunrOaCbhtYSL69uoT3o4ssxwevugaAbNt47GQDyttLhCEmtngGfQLBkbcpb kg0/I2W/GtiosuDw7L5OTc0rQaDAvXYId3NFT2+/9yOYjUaPjBub8ueUz45lIR3bZwcA iXUtDYZvIk1CGwJQox4YzZ86C0S1YWFIuS2LJUjeOGg+cHxSAkB9eNJetuoSEEf5k9U+ xPWSYtxwKEVHRplZoOhlSRgF9KQpkA4SKqFeHWHhgFPv8bzEDx5AQUog65LDPfDYykp5 bnbQ== 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=yYisZXQjBL9C116BBykqZyDzMwike6MMyTDM0g81rMg=; b=WLh2s0oAymo6nqGePX8S4HIUTexF2i4w/PUAZ1VvhCsFCYrvUlkmUD0zQoPZFkdbu2 bS/mCaNtaP8wCjiSfQl4hhlPW9UFhx8j57qV+f4mnp8DTEj2ODUe9a5ZOrXH+Fam/1wQ bye4/Ig61oo+WGumF04ekYEy4jdMhRQespiBFZ25GQRlxD0D2bhnAnlUB61/sJqP+7GZ 71TwDjuQIbolNR2v4mZlzoy9psopxUe9HzFV9kwPvgbzG/1wcKOZzh50MTvCYhZPZ1nR o4F/3DlmBOAMIJliDK/DMrqPcpzDggeDDUnHO0GuvyAhE4nclGU1sJtzbQ5+hwgewLc0 aVpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rGqWsmB3; 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 w195-20020a6282cc000000b004fa3a8dffccsi4079511pfd.131.2022.03.25.12.49.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:49:01 -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=rGqWsmB3; 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 DA4D82C2F74; Fri, 25 Mar 2022 11:39:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376713AbiCYP30 (ORCPT + 99 others); Fri, 25 Mar 2022 11:29:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377540AbiCYPYQ (ORCPT ); Fri, 25 Mar 2022 11:24:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 851A1654AC; Fri, 25 Mar 2022 08:18:12 -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 19452B828FF; Fri, 25 Mar 2022 15:18:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81F89C340E9; Fri, 25 Mar 2022 15:18:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1648221489; bh=YOKp3do8vELpQwkoJRceq2v3z9rJ/hm84CFhL8nDedI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rGqWsmB3qtw0eEkhN32Ey40inxMtAxOB2J3dXColTxZ0wk8UzNhBTnHSGMThyqLBw o2EbWdgx7cbyVFPtWQAwZQoSdHq8ld1r9Bty4HioEkxvWUiQW1HmCNo/0tvz22jlei 1p1yi7vtYpK9PsCfyuEmACviNPORxT3WF7i5iulo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pablo Neira Ayuso Subject: [PATCH 5.16 22/37] netfilter: nf_tables: initialize registers in nft_do_chain() Date: Fri, 25 Mar 2022 16:14:32 +0100 Message-Id: <20220325150420.679540216@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325150420.046488912@linuxfoundation.org> References: <20220325150420.046488912@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 @@ -162,7 +162,7 @@ nft_do_chain(struct nft_pktinfo *pkt, vo struct nft_rule *const *rules; 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]; bool genbit = READ_ONCE(net->nft.gencursor);