Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp838980rdb; Tue, 19 Sep 2023 11:38:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGAAtBosW4deL3cxkrlMfp+XsOb8iXybkqVRHm6UzMwmtuy0T8+rLdbDik3w7ytPn/ebFQz X-Received: by 2002:a05:6a00:15cf:b0:690:c701:e0ed with SMTP id o15-20020a056a0015cf00b00690c701e0edmr667085pfu.0.1695148691113; Tue, 19 Sep 2023 11:38:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695148691; cv=none; d=google.com; s=arc-20160816; b=L6VRIuRDET2gKQbUBCZIIKzcZ4uUVFV4tNgGY0P2vaqOpFrbQhMJVOqjuXtt6Ppo97 pUpjMoCX6UVft8OLTTar9tbeQp06bNC8HE60ZTAL18oaUG77kwwE9Rhz6H5IHQvpClKL kP/tWkT6mqltShOkeq/VnaeZDfnwPMYYtHM+tNuZ/pUzdXPGhf7PVAb4z8OEarXQqFok prfDA7nyCBIB0bxcqT7331a2EMhPtqM991lQFaiBw2RDV1BK1+MHuVrMshvJISUExAn4 NjvCE/15gv4TsqUNGdLcCVkCuFs4xFFggw6eHjA0w9gXw5/3imj0BBuI3Yh3mARW0Sxg ocqQ== 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=qEUcYe4duuyaCr9nPUm7sN40v1E9bQayPxVbgs/YHKw=; fh=vdy8fLmkzgLosg2v5sVYMftPpjJTf1v+KansN80xFQ8=; b=PeKUn6ftu0yNtfJ+GtH6bUEvLqfgoCpT06tpQNomXCm1CsyaX6pz8074Qenyd0pT6u VKIAG7M2daSL9A0+NhUSySCmBJ9nukD5V9bI0jdxlGdvIzPEx9rGBF+TDA74P9rwFKfD xXTusR5ZWD1tWW/pvZSDtCA1h8VyLXB37AsjjHphCH5I9Qou+9LP16NZr7b8sviZLr0P Zb9aPTtqNEmykcwQu8wwSmjJtiPgQdqHynsoBgvIDdphODhFN2J5aDDodA1ijQkDIBTR 8EpYlYywXPa7SiswN9j94B0dy5BSUbhV+t+zVSI2pxtK+fJMfqsIeAt+ws7OqBQKJEeE QCiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@avm.de header.s=mail header.b=dalE7vUS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id bt13-20020a056a00438d00b0068fb95e5401si10088366pfb.65.2023.09.19.11.38.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 11:38:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@avm.de header.s=mail header.b=dalE7vUS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id ABD6B81E3E2B; Tue, 19 Sep 2023 05:17:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232089AbjISMRx (ORCPT + 99 others); Tue, 19 Sep 2023 08:17:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232041AbjISMR1 (ORCPT ); Tue, 19 Sep 2023 08:17:27 -0400 Received: from mail.avm.de (mail.avm.de [212.42.244.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92219CF6; Tue, 19 Sep 2023 05:16:36 -0700 (PDT) Received: from mail-auth.avm.de (unknown [IPv6:2001:bf0:244:244::71]) by mail.avm.de (Postfix) with ESMTPS; Tue, 19 Sep 2023 14:16:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=avm.de; s=mail; t=1695125794; bh=sl503WT+JbQzr0PX1UeglL1eOYNs5r/CaovdgyxCXb4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=dalE7vUS2VX9zd1t4D/R0Ev6r+Qj3jaMeyq2U/S0vGhAcSwd8lAdEt+8Gsm8Bp1eu KjSrFFjvZfOxqwmz1kzhvfn5TlFb9oQ2/+mnB0zt6fsHVx4OByenolTjoujucDRjij kjLG1pmuBIkhBjUKQIYEd9zS628mNR06kCcTqPGA= Received: from localhost (unknown [172.17.88.63]) by mail-auth.avm.de (Postfix) with ESMTPSA id 3BE4682000; Tue, 19 Sep 2023 14:16:34 +0200 (CEST) From: Johannes Nixdorf Date: Tue, 19 Sep 2023 10:12:49 +0200 Subject: [PATCH net-next v4 2/6] 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: <20230919-fdb_limit-v4-2-39f0293807b8@avm.de> References: <20230919-fdb_limit-v4-0-39f0293807b8@avm.de> In-Reply-To: <20230919-fdb_limit-v4-0-39f0293807b8@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=1695111167; l=817; i=jnixdorf-oss@avm.de; s=20230906; h=from:subject:message-id; bh=sl503WT+JbQzr0PX1UeglL1eOYNs5r/CaovdgyxCXb4=; b=CD0YGMfLKNVRvbluKMbocG6VTuD+aNifNX7GZPqGAWKInzmZ79SN4khFtt/aAmBp5rzcWc6SI t8kYXAaNjNsC6tAp3c4MFY+KprTITZa+RCDqYiduf79UlI0H0wXutJ/ X-Developer-Key: i=jnixdorf-oss@avm.de; a=ed25519; pk=KMraV4q7ANHRrwjf9EVhvU346JsqGGNSbPKeNILOQfo= X-purgate-ID: 149429::1695125794-59E11D5A-7AB7DE48/0/0 X-purgate-type: clean X-purgate-size: 819 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=0.2 required=5.0 tests=DATE_IN_PAST_03_06, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Tue, 19 Sep 2023 05:17:59 -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 10f0d33d8ccf..505683ef9a26 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_MCAST_QUERIER_STATE + 1 }, [IFLA_BR_FORWARD_DELAY] = { .type = NLA_U32 }, [IFLA_BR_HELLO_TIME] = { .type = NLA_U32 }, [IFLA_BR_MAX_AGE] = { .type = NLA_U32 }, -- 2.42.0