Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2509429rdg; Mon, 16 Oct 2023 06:46:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkZ1OLB23stMrCQTh3DkNYEq31U6YUekLHttXdmy1UmbFWDaApGECOJqxggnsDcAP35DLu X-Received: by 2002:a05:6a20:42a2:b0:15a:290:d83d with SMTP id o34-20020a056a2042a200b0015a0290d83dmr35262073pzj.41.1697463999854; Mon, 16 Oct 2023 06:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697463999; cv=none; d=google.com; s=arc-20160816; b=uMeg4il/dBERHd+4V+IAjmZeo6h6oFNbfUvaRtrZIa9QnZcsiONt/BtqHWbR8mvTe4 0wyqVwwwNc7Hbtq/XIq16ytG/Nxb/6qfqMCs4faqUWo7Zt50+KbVGGrBDpD2h9/0/Bnd 447tNOnRQZF23blCAo2iNAAidQLyiLmHsHEyDeJEUSvo9I65JnpCdjpOmlz5Nw1K6fAE IblXin6KKGyi7Wo+4GbvEmgUbs0UMMfe3U2y7ihRDp7wGvPnAr7Po3cKKqTv7BSjrz2H 8YG5ipsqBuswPJhj/0l7343O/ftOJpID53/2DeALbAnRucQf47jXeAbSRr9rCpKlSuUC P4hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=ykgWBnKsTDJGo7WAdcMyYowqRLND5C2MqShBejET4iY=; fh=vdy8fLmkzgLosg2v5sVYMftPpjJTf1v+KansN80xFQ8=; b=KjEON3VBKNoR41gddSXz8PzurdsbCMchSab9LbTV80TbVoSGu/hi1s51R3WszQpXlG PFzUHidVvyYcrNp7ZHW2I4YGZ7l9p1cMURrgEB6/zRlg2Ea+ObmJFTzjnqZa5YOM+74j mJwErjq0liZNxYg+PcnpYDM1rCh5VEcrK06D0dQNRwnPzefx+iqY5lM3yGeXjY6nXa6R n1Ey/LMyFbh+igTk6NZfeBQgTD1fXSPJ+zh2J48sphoyyYrED0x48WAAz5N8TISepNAK 7Ip0ijqSeia+W1KNEbqMQ3AC+X6uOk1Vsu4N6Z6Rh5K93wbMi0Un4pme01So6P9YxhHt EAlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@avm.de header.s=mail header.b=aeSwQC4k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=avm.de Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id bv71-20020a632e4a000000b00569fd44093fsi10164175pgb.230.2023.10.16.06.46.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 06:46:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@avm.de header.s=mail header.b=aeSwQC4k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=avm.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3707E807C854; Mon, 16 Oct 2023 06:46:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234042AbjJPNpr (ORCPT + 99 others); Mon, 16 Oct 2023 09:45:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233869AbjJPNpj (ORCPT ); Mon, 16 Oct 2023 09:45:39 -0400 Received: from mail.avm.de (mail.avm.de [212.42.244.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E924E6; Mon, 16 Oct 2023 06:45:34 -0700 (PDT) Received: from mail-auth.avm.de (dovecot-mx-01.avm.de [212.42.244.71]) by mail.avm.de (Postfix) with ESMTPS; Mon, 16 Oct 2023 15:45:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=avm.de; s=mail; t=1697463932; bh=WMHTWn0lzdZOJlUHydcATxCX7rNJUapqeqgSH/9Czxc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=aeSwQC4kNzxsKoVOEG24z2ghHtJ3HcnBKZrokW+L7E3garrMeBmAaHW0ixzYTQ/lE pV0J6WcMnwfol76rJY1C47I1AdKiJOBDA5FwOVLkj8pATgyGG5373IwTw2FSrCdL6j kmweacdVj+P41M/V6VXK6NtRVkkopnmuD3Jrk99o= Received: from localhost (unknown [172.17.88.63]) by mail-auth.avm.de (Postfix) with ESMTPSA id AF9DD80463; Mon, 16 Oct 2023 15:45:32 +0200 (CEST) From: Johannes Nixdorf Date: Mon, 16 Oct 2023 15:27:23 +0200 Subject: [PATCH net-next v5 4/5] net: bridge: Set strict_start_type for br_policy MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231016-fdb_limit-v5-4-32cddff87758@avm.de> References: <20231016-fdb_limit-v5-0-32cddff87758@avm.de> In-Reply-To: <20231016-fdb_limit-v5-0-32cddff87758@avm.de> To: "David S. Miller" , Andrew Lunn , David Ahern , Eric Dumazet , Florian Fainelli , Ido Schimmel , Jakub Kicinski , Nikolay Aleksandrov , Oleksij Rempel , Paolo Abeni , Roopa Prabhu , Shuah Khan , Vladimir Oltean Cc: bridge@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Johannes Nixdorf X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1697462840; l=807; i=jnixdorf-oss@avm.de; s=20230906; h=from:subject:message-id; bh=WMHTWn0lzdZOJlUHydcATxCX7rNJUapqeqgSH/9Czxc=; b=T9u4sURSiCaNXZzQHRNZ49OmpzQLzcXSoa6jHXmSuSN0/chz3AUafsFqnGeMtjqfpjU1IKBto kNwPnMrNUWBAz5qDbdRWI/24/WcYh5FRu+O3YKuAn/J2A5e2+QRFySb X-Developer-Key: i=jnixdorf-oss@avm.de; a=ed25519; pk=KMraV4q7ANHRrwjf9EVhvU346JsqGGNSbPKeNILOQfo= X-purgate-ID: 149429::1697463932-6162842D-5BCF9E75/0/0 X-purgate-type: clean X-purgate-size: 809 X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 16 Oct 2023 06:46:00 -0700 (PDT) Set any new attributes added to br_policy to be parsed strictly, to prevent userspace from passing garbage. Signed-off-by: Johannes Nixdorf --- net/bridge/br_netlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index 0c3cf6e6dea2..5ad4abfcb7ba 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c @@ -1229,6 +1229,8 @@ static size_t br_port_get_slave_size(const struct net_device *brdev, } static const struct nla_policy br_policy[IFLA_BR_MAX + 1] = { + [IFLA_BR_UNSPEC] = { .strict_start_type = + IFLA_BR_FDB_N_LEARNED }, [IFLA_BR_FORWARD_DELAY] = { .type = NLA_U32 }, [IFLA_BR_HELLO_TIME] = { .type = NLA_U32 }, [IFLA_BR_MAX_AGE] = { .type = NLA_U32 }, -- 2.42.0