Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2159726pxb; Fri, 25 Mar 2022 12:09:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynLgwSSATSq89tCC9t4dM1Xe+2qEXDwr30axuSzXJxD8TnxBksKDxD2EuNvgPaIpt7yZV0 X-Received: by 2002:a63:484:0:b0:383:dd15:fe6a with SMTP id 126-20020a630484000000b00383dd15fe6amr785218pge.353.1648235350013; Fri, 25 Mar 2022 12:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648235350; cv=none; d=google.com; s=arc-20160816; b=yWj7vkA+pq06ELDWVLKjKLcJFuVaGXKKdGg4nCAON28iJYf1vW6qm6wbqq4DJYVUmI Y4WdOIXotYItGHGmLtyLbmYiGB2QNW34A1tip/vDjFbzVVMn7Zfd4tFz8LtAEVnatIVP mF+JKq4XtR4frPQGOPTdQ3MmdZgOHJWbipczC/8qVnPRqsj0QSrTJVPIk1MSpuQ2Xukx pe2/9yAh/TnDXE5Oo1/JK78jk2i7Ezf+uHEWc1TmoyaDVbt2nFkt0WlfjJeiX5CxWv+C 5yeap63IKtH+CYffFHER2A27ufr7qFC9mKUpxCKlna0Evx1TleaCjDLudjRjbWpK/NGp Bz8g== 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=hbFPmXeA4pIwc9KSRK52ax+QA1saYP5KB3BLCchNBDw=; b=M5dmPcNio+A4P9KLDL3xxb4ec3Fuz0CH0OD5zv93I61zwdP0ujqiq1JYtNIs2Ti/aP 1fUkbyvit6O1q/ExLsDWbVypC01+HKLFvQ+DMrXM0iXdgJOmxkK1gbDB7170hfcBHGia tRgsgggMmjw+76gcqLAr7iowW0fjlRUx2nAbztYsSiL8PkhDtPvOBLYjpWXzSGsPRrpl PzmuXolWskxsUj0Fj/YYFwON/LSY0qkaKHUqGN6fbva2AZGI0/6bEE4lVr2+hM+ru3n5 /R2kL+iQ5XJBv9remnLen5nYYo+jSrl0YYtE5klgbtH6RxaQclRduDZeajaOF9j0c9pL X1UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vRvZCuPP; 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 p14-20020a056a000b4e00b004fa3a8dfff9si4166673pfo.176.2022.03.25.12.09.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:09:10 -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=vRvZCuPP; 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 out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1EEBD232114; Fri, 25 Mar 2022 11:21:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359601AbiCYPIs (ORCPT + 99 others); Fri, 25 Mar 2022 11:08:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359608AbiCYPH2 (ORCPT ); Fri, 25 Mar 2022 11:07:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0310DA08E; Fri, 25 Mar 2022 08:05: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 dfw.source.kernel.org (Postfix) with ESMTPS id 4B0CF61BF7; Fri, 25 Mar 2022 15:05:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A4CFC340EE; Fri, 25 Mar 2022 15:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1648220742; bh=Ma/8tTyYHRbZXunujThW1LGLHLX30DJaaghwjpgcMHk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vRvZCuPPuA3ai1uVoep1s9vNo804hDnAuUJDMwOw/Eua9ueYyQ4qVgkt1Yd+M5pSQ +cPmGGSq5I7nUTP00xIEERYlzgTqJ+bNX0lWUFHEbtro64pB3DgQYyOp5uziSwRyaj FSzZ+w4K85wnuLAnjkM2pDg9mi9Y18/Nxva3VN6w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pablo Neira Ayuso Subject: [PATCH 4.14 12/17] netfilter: nf_tables: initialize registers in nft_do_chain() Date: Fri, 25 Mar 2022 16:04:46 +0100 Message-Id: <20220325150417.120190348@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325150416.756136126@linuxfoundation.org> References: <20220325150416.756136126@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 @@ -150,7 +150,7 @@ nft_do_chain(struct nft_pktinfo *pkt, vo const struct net *net = nft_net(pkt); 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]; int rulenum;