Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2190658pxb; Fri, 25 Mar 2022 12:43:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzweZttUvEtH76KlE/ZeA/yVFO9xJoCOC6xM/SacLwRD5AsyWcTTtrVfQ7L0Zof2oiXuLDP X-Received: by 2002:a63:3f01:0:b0:387:65ab:ce8b with SMTP id m1-20020a633f01000000b0038765abce8bmr885546pga.17.1648237389643; Fri, 25 Mar 2022 12:43:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648237389; cv=none; d=google.com; s=arc-20160816; b=e5o6AlXb9kjH1JnlQeJYPoUG5XgkjFbMOQ/ujiZifRTggfgaN1PZk9X4RnH6Fw1fgJ T12QBZm3zr5pLRmgNWwB+ERvc0UusDL8BGJCJp5GaNfPS8AwTN0n2jQHujx8qqy6LfMn pZAXQ06ntywcsFySVOznaU5qUZoYdpNzvNmRqbc0OD4eWFmwMPVcPL1k5/ocq8MhAOiz a1dumFOZpuP6HXh42UGif4ruAt3nEkLdy0+VncNi1JbB/XGgNZ/qQ+r6C9RH1VItgWDV CNPdy5Gcz1TmMjfzoJQfTXD+gW8ei9Sf3O9UJVNmoxOztDuB1DIFZDiLLvPhYc4D1/Ld eb/A== 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=OG/v8hFcqwNXst0gqrCA3TF1b42q/9zWvARoZKt/mms=; b=Ze+nyWXxgguYWynHhxkINEC+j27M1L9VfPr8iGYJTobSM4bz0MBD/og0YT80DiFaA1 PvWODUJgCzSpCNCWvPmAyRVFVfDkggDO0OkTfaSxSYTAvMAiRdDC54Ih/99yuVsZgbhj asuYMGUQWzhX0vLlatsCSotK2PUEULP84H2VBayqCd6dIA8jkAX+xlEql/4qQY7oDSQA YicatQxhIaxf13p3+oVxBaayvFjCNJbTmwoXWAbyFVloD8lNFT4/D/qgt0P4BswjDa/M nIUNWJC5yEWQhTojg2z33Qhg1YYgAWMO9XupT2awcxYJ7hh0qCrcoHBM40D3tIxEHEsx c9eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="WW0NN/8F"; 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 j1-20020a625501000000b004fa3a8e00b0si3292978pfb.359.2022.03.25.12.43.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:43:09 -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="WW0NN/8F"; 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 E7F062986FD; Fri, 25 Mar 2022 11:33:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359557AbiCYPJx (ORCPT + 99 others); Fri, 25 Mar 2022 11:09:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376270AbiCYPIR (ORCPT ); Fri, 25 Mar 2022 11:08:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC1CFA7741; Fri, 25 Mar 2022 08:06:43 -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 529E7B828F8; Fri, 25 Mar 2022 15:06:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 955D9C340E9; Fri, 25 Mar 2022 15:06:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1648220801; bh=d4Tm298RJ4O4oXlY7hd8g2pFIpL83/OfvMHDCe05O0g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WW0NN/8F9J/8BVnHXs/yieWpQuI6wkV9yudEH9CiBwX3thH2PHU5/RgqZkl3Gkp2n K2sSQYnXE/NDP8qpjH9MLhNc3V949UlR7JHqUv2OBkOUvBdhF3prECPx8ulNQ+GvXO /zlasJRptmMM298xemWVomu6GPyWoUvoS0BJrILU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pablo Neira Ayuso Subject: [PATCH 4.19 14/20] netfilter: nf_tables: initialize registers in nft_do_chain() Date: Fri, 25 Mar 2022 16:04:52 +0100 Message-Id: <20220325150417.423549616@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325150417.010265747@linuxfoundation.org> References: <20220325150417.010265747@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 @@ -144,7 +144,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);