Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3463019rwo; Mon, 24 Jul 2023 11:21:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlETEQLYKCqde2UD8aLqMTBJ9+sj7yiDcoedArr9e/tJ+zuoWlc+AgW7oyg3RAxLDuA7Fwmc X-Received: by 2002:a05:6a00:1494:b0:681:50fd:2b98 with SMTP id v20-20020a056a00149400b0068150fd2b98mr12833618pfu.31.1690222866071; Mon, 24 Jul 2023 11:21:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690222866; cv=none; d=google.com; s=arc-20160816; b=Ol7bIzNiz+i42By9tDu1Dfu+3GetmvfQokwCPXIDN4x9hSrZ1YXiq0YhSpZekf9mDG xFowigVQmx+BKTTBmT/QJjguCgu/lyOuwQPXRdTlnJesf195OtRXuytr4mw+hlcfnk9t +qp0u8n7IR2fmNb6xxnAqJVS57s7WfnqyHA0F0zSQbendjDytX+qgMHdJe9BedQQnKDE hDLmDG8v3dFlHJmDyLIL5VnZupYJxPip6E1zOIIYcHHZFz9wjm3ZDcm/NMfB1+xiGbIa eKh4icKzfL//OATR4t9+jtLaEiMjQGXNViKevNSTwUi4atOPcqXyAdvBg572zskxzzUd vytA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3XwirjoLnPCgSltx4kx1ehpz0VSB+lrzwShEyZV3teg=; fh=OSJaR4qjpmVc+ml9MiwFPyuC1XAS2GSPE+pRtxlsSU4=; b=B7Y+O87mMXR57OQOvLioHrVHPZCZ7JvRK/WAESX+8zaHfvT/2hidX9+UhjXLkonaw0 xI4IfFEgqlPjHRBrLKKCurl3f3MLYhqImXMsWO/H0pZCxGl4s0fqDvHcoiIImeHy8WY8 1oBhdAUBvh/sLTNCNpeu/h8zcPxyU5SGBJKVDieZrePk5DkEd18Ra+sMuqjDrXS3LtN/ ZkQPVsRQipur7Nzl8f4PHPWTryQ0vorvd0RCXh6NyRoPTNbL/pHQqjQdNyEJDpWzYlBe eDSHDvuYjbxXfxcjh3XVYPwzsx4PmBHTj9ilK2jDvcCjOphpj6b+h1ElOx38WhPYvvX2 ojJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I2br1Fii; 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 p27-20020a056a000a1b00b006825a7e9415si9936039pfh.354.2023.07.24.11.20.53; Mon, 24 Jul 2023 11:21:06 -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=I2br1Fii; 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 S232032AbjGXRyg (ORCPT + 99 others); Mon, 24 Jul 2023 13:54:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230264AbjGXRyR (ORCPT ); Mon, 24 Jul 2023 13:54:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4363D1FCF; Mon, 24 Jul 2023 10:52:22 -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 4C9E961380; Mon, 24 Jul 2023 17:47:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09A60C433B9; Mon, 24 Jul 2023 17:47:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690220831; bh=3XwirjoLnPCgSltx4kx1ehpz0VSB+lrzwShEyZV3teg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I2br1FiiNlts4U71C5B0I0vtSSSexW8W4oOr6LvDMbzWIg8lbSmznEg486ggH/vLb lnXFA+mL12zdS8m1tNRoA5ldSk9dwkD2ZKbAt0nIWECa7aOGof4p0YNHUzuhrY+Qbx XqFG+n5+mVbx6aWhTvHXNQIO45IFPJFbOr98DBOBMZOS+3k6CYIo4WN3n0I67Sz8y3 8evgnInnh0eZ498jP/P5lx6jV1oHDOcwqykKX3QwBUykH+RAcsDPzHcJhYxQdAQlsI 1BFJcjKzgQh3W6mkqAxha5chMiV9xApS7CmmNwLgVul2W5YgkdNtlKnxtOBGqYGwO3 okndwtB40yvnw== Date: Mon, 24 Jul 2023 20:47:07 +0300 From: Leon Romanovsky To: Lin Ma Cc: jgg@ziepe.ca, markzhang@nvidia.com, michaelgur@nvidia.com, ohartoov@nvidia.com, chenzhongjin@huawei.com, yuancan@huawei.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] RDMA/nldev: Add length check for IFLA_BOND_ARP_IP_TARGET parsing Message-ID: <20230724174707.GB11388@unreal> References: <20230723074504.3706691-1-linma@zju.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230723074504.3706691-1-linma@zju.edu.cn> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 On Sun, Jul 23, 2023 at 03:45:04PM +0800, Lin Ma wrote: > The nla_for_each_nested parsing in function > nldev_stat_set_counter_dynamic_doit() does not check the length of the > attribute. This can lead to an out-of-attribute read and allow a > malformed nlattr (e.g., length 0) to be viewed as a 4 byte integer. 1. Subject of this patch doesn't really match the change. 2. See my comment on your i40e patch. https://lore.kernel.org/netdev/20230724174435.GA11388@unreal/ Thanks