From patchwork Tue Jun 16 02:13:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xidong Wang X-Patchwork-Id: 1309935 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=163.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=Z5b+s9+K; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49mBZB68Dbz9sRN for ; Tue, 16 Jun 2020 12:13:20 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 834D589403; Tue, 16 Jun 2020 02:13:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n6LBEp-ITsni; Tue, 16 Jun 2020 02:13:17 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 5D5E887E74; Tue, 16 Jun 2020 02:13:17 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 364E4C0890; Tue, 16 Jun 2020 02:13:17 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1B3BEC016E for ; Tue, 16 Jun 2020 02:13:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0267D88871 for ; Tue, 16 Jun 2020 02:13:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8p5mdQNkLJrJ for ; Tue, 16 Jun 2020 02:13:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-m971.mail.163.com (mail-m971.mail.163.com [123.126.97.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B14088885E for ; Tue, 16 Jun 2020 02:13:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=s4XBV yv9DADyKucbpsy8uo0V7CPIYGBYSyMQ4h1ImtI=; b=Z5b+s9+K+TNo75YbRnwN/ 19Lq+RWejaVHbnUHrm3uUpLV4tvv2O5s9dy7uQhFmEUGij3BTS5ZWfDgnYNGYX7c gde/ZWcM2bXwmc0XQb+GESuL81Ypl8NaL/RHJDhUTS0c8Qu8z3/8ekFY1jzs/+Gd B/RBybhqWoxap3V/LiXR9U= Received: from ubuntu.localdomain (unknown [42.238.20.186]) by smtp1 (Coremail) with SMTP id GdxpCgAHbSuvKuheUlW4DA--.473S3; Tue, 16 Jun 2020 10:13:06 +0800 (CST) From: Xidong Wang To: Xidong Wang , Pravin B Shelar , "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org, dev@openvswitch.org, linux-kernel@vger.kernel.org Date: Mon, 15 Jun 2020 19:13:01 -0700 Message-Id: <1592273581-31338-1-git-send-email-wangxidong_97@163.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CM-TRANSID: GdxpCgAHbSuvKuheUlW4DA--.473S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7XFyxtr45Zr1DJw48Zr45GFg_yoWfJFX_KF Z5Jw1kur15AFs5Kw4jqF4xAr1kJ34xZFZ3Xr17Zay7Gw10qwn3WF18Wa97uFy8uF1YvFW7 Z3sIvwsrCa4akjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUULiStUUUUU== X-Originating-IP: [42.238.20.186] X-CM-SenderInfo: pzdqw5xlgr0wrbzxqiywtou0bp/1tbizQJF81c7KrzyxQAAs0 Subject: [ovs-dev] [PATCH 1/1] openvswitch: fix infoleak in conntrack X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: xidongwang The stack object “zone_limit” has 3 members. In function ovs_ct_limit_get_default_limit(), the member "count" is not initialized and sent out via “nla_put_nohdr”. Signed-off-by: xidongwang Acked-by: Pravin B Shelar --- net/openvswitch/conntrack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index 4340f25..1b7820a 100644 --- a/net/openvswitch/conntrack.c +++ b/net/openvswitch/conntrack.c @@ -2020,6 +2020,7 @@ static int ovs_ct_limit_get_default_limit(struct ovs_ct_limit_info *info, { struct ovs_zone_limit zone_limit; int err; + memset(&zone_limit, 0, sizeof(zone_limit)); zone_limit.zone_id = OVS_ZONE_LIMIT_DEFAULT_ZONE; zone_limit.limit = info->default_limit;