Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3035615rdg; Tue, 17 Oct 2023 02:33:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHeRpCIOI382B1c6Ki9EFyCl1LdGbJJEx8XvPzwQtS1fP3jazTBt235CLJwCk42QG8PQ7jL X-Received: by 2002:a05:6a20:748c:b0:172:6771:d766 with SMTP id p12-20020a056a20748c00b001726771d766mr1672982pzd.51.1697535237517; Tue, 17 Oct 2023 02:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697535237; cv=none; d=google.com; s=arc-20160816; b=C+d4hA8EhQP5PI+jc6HbGO0wOtUdjvGJFyEXPFDEgTB+maOa2eWCwHLhofhKj1H5d9 fGCTmsgH+x5YEpBb0ygEnNSssVOBNUBzJKgQYXhhl7EP5Nl+kokWtYm6XaV8+OjR3yjQ VWGw8nkSvkNCtacUbXKXQERh5hBSBDmWs1j+F+o+aowjCouNTKTYSRxhloGpYq5izM7l rE1KC9AtRWcFOMwug6jEf6oLams9G4AP+LJIJICLpiOoNUA3wFgsPp3EdHo6WklV52cf zXqYlF+M4PMimCtVMaEThfV5OEq/I81x47tuDnW0fUoQv1sBpr3acV/PV7sJIKdH0yAc +htg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=3kgbT4HUwVO3dRrS+UXwvsR6kcnDepF12o+Z+tvmQWQ=; fh=r8zpVSSoSO6PfqQy7ooLS7GpPkua5AzwTepuYCrhBPo=; b=mJ0mOZoXq6saaSIykY/cZc0P98HETNA/KooamF2Ycb0nC3Ueq2og6zWMkJGdn45PYz ++wyJwQZASymKxPwdI1fdeJYl+IFrlaD775yMYRFdyQVqoOp+3j6XpI3TH1xTYKCnu7n V/WHIi9evbiAV9kSU0xdzr3dCgzjfScF+OJ3/9s3ubttz+Msu406D0I5iVHNIHG6uUOJ cDa8d/cUxky3LfW3H6Co4NaN7A4RkIfMoYZjbp8vpTG6INcNntPddtAh424hfweiCDYf cM/WnnFbLndC8WMtOtbeSrdmnv28r+9BIkvgivnt3AtFjZBvuiU3cTnN+LEPo7S8Xq58 T7Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@blackwall-org.20230601.gappssmtp.com header.s=20230601 header.b=nxYSMDGO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id pj4-20020a17090b4f4400b0027383ac5ebcsi1422793pjb.130.2023.10.17.02.33.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 02:33:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@blackwall-org.20230601.gappssmtp.com header.s=20230601 header.b=nxYSMDGO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 68CD58068976; Tue, 17 Oct 2023 02:33:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234858AbjJQJdn (ORCPT + 99 others); Tue, 17 Oct 2023 05:33:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343546AbjJQJdX (ORCPT ); Tue, 17 Oct 2023 05:33:23 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FAA21701 for ; Tue, 17 Oct 2023 02:32:05 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4064876e8b8so58104405e9.0 for ; Tue, 17 Oct 2023 02:32:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blackwall-org.20230601.gappssmtp.com; s=20230601; t=1697535124; x=1698139924; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=3kgbT4HUwVO3dRrS+UXwvsR6kcnDepF12o+Z+tvmQWQ=; b=nxYSMDGOG9w29F2QiHmTHFiVkSFhxzTaskRmdCtMRrx6+16AQGUg/9P4k2ltm4iCGN lfeFGx5l7OqyrmMDClilNNQ/4//TWTAJFw1JqrMtSmDR1pNvChrAMmgGIuAtMfcYLlnY 3LaTB1d8q5tSmdRdB8y3londsOy8T/nqxOfFOWOxkjJJmOjEmaAOwM6LrzRR5oRfwlRt y4IRUtrGZqjE34l35jhL0Koeo1T+Ugud3B90ZqcCegN2h5MvfrQv936h1TRxq0xLblcS nU5qJBd8s3/MF7oh7EfrqhmvetYJVnRVFgBJWlTCn6yEygHz2RLYeTAqsXWScAaqRZo6 tF1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697535124; x=1698139924; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3kgbT4HUwVO3dRrS+UXwvsR6kcnDepF12o+Z+tvmQWQ=; b=vR5Z4W7GmdKqQMxFqPguvVtm4g8EyE+zzXmXJl/0bLNi83+UCOvFelRQ0Z8DSVMXmL IdUU+0VVhXx4DKgL4MKadgAHX6yOjBFxt73K4k9QWDw6hTum/+a0u8q+SULv4VdtJPrb U5CPLoUm76NdkMlJ72tAEBavDdqDPBGbQv9lQHehIlQMv3EuJe6/3bzVEFzKYZCUAoLF uUwroQ7JnqIdEZEc3q6SP8nqqXafDbSSeIL+CNxKBoWJHfk9Xzq/Eb4jCd7fvJXaMTUT Olu5AxoleIUcUz8R7Fgu2IgDR69Pky1BXP3MQRpsBQQsEuXgN58HwuwupSYxlLoQcYWi f3uw== X-Gm-Message-State: AOJu0YxPe23AwhGR9IVVWLdLHpjkuNrfAg//6fs3nUz/qDLFfTSe4CE5 PWRsldEfhP7zmpF4cHL+URhzuw== X-Received: by 2002:a05:600c:3595:b0:3ff:ca80:eda3 with SMTP id p21-20020a05600c359500b003ffca80eda3mr1240848wmq.10.1697535123998; Tue, 17 Oct 2023 02:32:03 -0700 (PDT) Received: from [192.168.0.106] (haunt.prize.volia.net. [93.72.109.136]) by smtp.gmail.com with ESMTPSA id a6-20020a05600c348600b0040652e8ca13sm9406919wmq.43.2023.10.17.02.32.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Oct 2023 02:32:03 -0700 (PDT) Message-ID: Date: Tue, 17 Oct 2023 12:32:01 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH net-next v5 4/5] net: bridge: Set strict_start_type for br_policy Content-Language: en-US To: Johannes Nixdorf , "David S. Miller" , Andrew Lunn , David Ahern , Eric Dumazet , Florian Fainelli , Ido Schimmel , Jakub Kicinski , 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 References: <20231016-fdb_limit-v5-0-32cddff87758@avm.de> <20231016-fdb_limit-v5-4-32cddff87758@avm.de> From: Nikolay Aleksandrov In-Reply-To: <20231016-fdb_limit-v5-4-32cddff87758@avm.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Tue, 17 Oct 2023 02:33:54 -0700 (PDT) On 10/16/23 16:27, Johannes Nixdorf wrote: > 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 }, > Acked-by: Nikolay Aleksandrov