From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] rtnetlink: validate attributes in do_setlink() Date: Tue, 05 Jun 2018 12:45:05 -0400 (EDT) Message-ID: <20180605.124505.1306184687202459345.davem@davemloft.net> References: <20180605162519.230428-1-edumazet@google.com> <20180605.124103.1922429680259846762.davem@davemloft.net> <66acac36-a304-b743-8c6e-ef9cc87366d3@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: edumazet@google.com, netdev@vger.kernel.org, dvyukov@google.com To: eric.dumazet@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:38898 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751950AbeFEQpH (ORCPT ); Tue, 5 Jun 2018 12:45:07 -0400 In-Reply-To: <66acac36-a304-b743-8c6e-ef9cc87366d3@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet Date: Tue, 5 Jun 2018 09:42:54 -0700 > On 06/05/2018 09:41 AM, David Miller wrote: >> From: Eric Dumazet >> Date: Tue, 5 Jun 2018 09:25:19 -0700 >> >>> It seems that rtnl_group_changelink() can call do_setlink >>> while a prior call to validate_linkmsg(dev = NULL, ...) could >>> not validate IFLA_ADDRESS / IFLA_BROADCAST >>> >>> Make sure do_setlink() calls validate_linkmsg() instead >>> of letting its callers having this responsibility. >> >> But now rtnl_newlink() will validate_linkmsg() twice.... >> > > Yes, is it a problem ? That is hardly fast path :) Not a problem, just making sure you were aware.