From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next 11/20] rtnetlink: Update inet6_dump_ifinfo for strict data checking Date: Fri, 5 Oct 2018 13:26:31 -0600 Message-ID: <905b43c9-5bf0-1a64-4fda-bfee9dfe99d8@gmail.com> References: <20181004213355.14899-1-dsahern@kernel.org> <20181004213355.14899-12-dsahern@kernel.org> <20181005175448.jqjefd3fpve3y5ty@brauner.io> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, davem@davemloft.net, jbenc@redhat.com, stephen@networkplumber.org To: Christian Brauner , David Ahern Return-path: Received: from mail-pl1-f194.google.com ([209.85.214.194]:41674 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728260AbeJFC0l (ORCPT ); Fri, 5 Oct 2018 22:26:41 -0400 Received: by mail-pl1-f194.google.com with SMTP id q17-v6so7271357plr.8 for ; Fri, 05 Oct 2018 12:26:33 -0700 (PDT) In-Reply-To: <20181005175448.jqjefd3fpve3y5ty@brauner.io> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 10/5/18 11:54 AM, Christian Brauner wrote: >> +static int inet6_valid_dump_ifinfo(const struct nlmsghdr *nlh, >> + struct netlink_ext_ack *extack) >> +{ >> + struct ifinfomsg *ifm; >> + >> + if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*ifm))) { >> + NL_SET_ERR_MSG(extack, "Invalid header"); >> + return -EINVAL; >> + } >> + >> + if (nlh->nlmsg_len > nlmsg_msg_size(sizeof(*ifm))) { > > Shouldn't ipv6 specific dump requests at least support IFA_TARGET_NETNSID? It does not today. The AF_UNSPEC GETLINK dumps it but the AF_INET6 does not. Some one can add it later if desired.