Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp571841rwb; Thu, 27 Jul 2023 18:07:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlFtoN9fKlnKT4iChcg6MJOsg5O5VctOCS2v4qIrBmyKWAFAtIFdab1oOoP1iLthjUBUR1kP X-Received: by 2002:a17:907:d15:b0:995:3c9e:a629 with SMTP id gn21-20020a1709070d1500b009953c9ea629mr4354112ejc.31.1690506453466; Thu, 27 Jul 2023 18:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690506453; cv=none; d=google.com; s=arc-20160816; b=0QsQf07fjwVOlDZ2ztEuwWrpTirqi6Afnz0uiMVNGDRdssxuIcOtJMbHnfZ3k+y35E LaWT5caPkxO7Wh+F/NSa7EYFhjETssgMXJqeJsSwmq07z7ETmo2dumnxuGcBoxd0vBQN oSfDZ67wQqYYwQslgtio7G+Al24Nlnd9/NSo7lYAB823zo/V80RWO2XshWBqC6WnRvGc lAruyeyv3FO7R700a8ssSMGVhfyQOULnzdBQLCg30gpzaHEWD3h8WfnecbiybeY75O99 +ZEq07u/roWeYiXhQzhwS/5FofBhWUMc6OpDgdJmLhNY0TOakt2/VanhBNykhjPbJkiN 0u/w== 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:date:message-id :from:subject:content-transfer-encoding:mime-version:dkim-signature; bh=8BxjO/oncaQFyyLw5Nzr+4Y1KSJDYmx4ifxnnRDVLDo=; fh=hLWUC9Sw/1JUIoR0wCNXFzhm+1Yr9dSw22VT3XDrom4=; b=ivJaLgl3mrcVdwBtanN8cdpl0X2AgoBMyBfmJXl+BiCCRDm0puUAZKZEywxe3i/thR jUVZASTvlDwkLsGl4to/7nAphB3RDIvu20Aguu395UqF0ayBqPzMYSxv0OXFc0GaV9Cy DX4r2d2sLDA1f5NgmlFnz+4e9rsEWmgIfR83VsQBanU97dMTs3mFg1V7VvwUAD+vnH3p HIBmq4YRDzbyJaeP86A2Cl5jRo+2GPkRT4cwoarhZpCQl/EEBL9lHJli40a35gOzxTqr QtPxIroahowm2Zkugh/vOgTUdLjVGMTdkLits8Tymj8veMnsjiW8RFuPp/LtWiKe0SSY S68w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tOtpyQU2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i13-20020aa7c70d000000b0051dd50eb02bsi1773181edq.5.2023.07.27.18.06.56; Thu, 27 Jul 2023 18:07:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tOtpyQU2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230497AbjG1AUY (ORCPT + 99 others); Thu, 27 Jul 2023 20:20:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjG1AUW (ORCPT ); Thu, 27 Jul 2023 20:20:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 845CCBF for ; Thu, 27 Jul 2023 17:20:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1F8F561F91 for ; Fri, 28 Jul 2023 00:20:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 83997C433C8; Fri, 28 Jul 2023 00:20:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690503620; bh=Bhb6/QjHl3pEpohK1LtERgTU5IfD+lbygJdn6oIMc+o=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=tOtpyQU288Xh5mpfKrnOyaUEIM0SCbOcQgW4qpHyNFyidsaeItk6OE29vI9yGbWmX 96QRld2stXddj3L5G7yiAxilsfinDEBGKhMTJBzY89o90ohl/BL4zqaNzrupch5eaO 4ROsvtuN4msPPRL4GPbH6h+zuvFq5zD70ORmWfAb3mAWDddy4E7hT+R/3SMg7AQlFk runwkL8o5YZjOBkyk0viLbs4sL48x4ampgqcFcIn84dzomXCA67pK3L0pBWVMSRk9Y CDzEHZN+4yYIZyc27GFvmh79k7N8nskDAuyh1IhpFgKYWjddxaGLU/Vfk2pOYQK0ZU 4KsLmtEhSlJ/w== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id 6BF70C41672; Fri, 28 Jul 2023 00:20:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH net v3] rtnetlink: let rtnl_bridge_setlink checks IFLA_BRIDGE_MODE length From: patchwork-bot+netdevbpf@kernel.org Message-Id: <169050362043.24970.11385005356994975493.git-patchwork-notify@kernel.org> Date: Fri, 28 Jul 2023 00:20:20 +0000 References: <20230726075314.1059224-1-linma@zju.edu.cn> In-Reply-To: <20230726075314.1059224-1-linma@zju.edu.cn> To: Lin Ma Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, razor@blackwall.org, idosch@nvidia.com, lucien.xin@gmail.com, liuhangbin@gmail.com, edwin.peer@broadcom.com, jiri@resnulli.us, md.fahad.iqbal.polash@intel.com, anirudh.venkataramanan@intel.com, jeffrey.t.kirsher@intel.com, neerav.parikh@intel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski : On Wed, 26 Jul 2023 15:53:14 +0800 you wrote: > There are totally 9 ndo_bridge_setlink handlers in the current kernel, > which are 1) bnxt_bridge_setlink, 2) be_ndo_bridge_setlink 3) > i40e_ndo_bridge_setlink 4) ice_bridge_setlink 5) > ixgbe_ndo_bridge_setlink 6) mlx5e_bridge_setlink 7) > nfp_net_bridge_setlink 8) qeth_l2_bridge_setlink 9) br_setlink. > > By investigating the code, we find that 1-7 parse and use nlattr > IFLA_BRIDGE_MODE but 3 and 4 forget to do the nla_len check. This can > lead to an out-of-attribute read and allow a malformed nlattr (e.g., > length 0) to be viewed as a 2 byte integer. > > [...] Here is the summary with links: - [net,v3] rtnetlink: let rtnl_bridge_setlink checks IFLA_BRIDGE_MODE length https://git.kernel.org/netdev/net/c/d73ef2d69c0d You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html