From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH net-next] rtnetlink: validate attributes in do_setlink() Date: Tue, 5 Jun 2018 09:42:54 -0700 Message-ID: <66acac36-a304-b743-8c6e-ef9cc87366d3@gmail.com> References: <20180605162519.230428-1-edumazet@google.com> <20180605.124103.1922429680259846762.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com, dvyukov@google.com To: David Miller , edumazet@google.com Return-path: Received: from mail-pl0-f66.google.com ([209.85.160.66]:38066 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751748AbeFEQm4 (ORCPT ); Tue, 5 Jun 2018 12:42:56 -0400 Received: by mail-pl0-f66.google.com with SMTP id b14-v6so1859302pls.5 for ; Tue, 05 Jun 2018 09:42:55 -0700 (PDT) In-Reply-To: <20180605.124103.1922429680259846762.davem@davemloft.net> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 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 :)