From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next 20/20] net/bridge: Update br_mdb_dump for strict data checking Date: Fri, 5 Oct 2018 09:49:42 -0600 Message-ID: References: <20181004213355.14899-1-dsahern@kernel.org> <20181004213355.14899-21-dsahern@kernel.org> <20181005.003445.1297966279801053451.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, christian@brauner.io, jbenc@redhat.com, stephen@networkplumber.org To: David Miller , dsahern@kernel.org Return-path: Received: from mail-pg1-f196.google.com ([209.85.215.196]:41511 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727572AbeJEWtB (ORCPT ); Fri, 5 Oct 2018 18:49:01 -0400 Received: by mail-pg1-f196.google.com with SMTP id 23-v6so4908546pgc.8 for ; Fri, 05 Oct 2018 08:49:44 -0700 (PDT) In-Reply-To: <20181005.003445.1297966279801053451.davem@davemloft.net> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 10/5/18 1:34 AM, David Miller wrote: > From: David Ahern > Date: Thu, 4 Oct 2018 14:33:55 -0700 > >> @@ -162,6 +162,28 @@ static int br_mdb_fill_info(struct sk_buff *skb, struct netlink_callback *cb, >> return err; >> } >> >> +static int br_mdb_valid_dump_req(const struct nlmsghdr *nlh, >> + struct netlink_ext_ack *extack) >> +{ >> + struct br_port_msg *bpm; >> + >> + if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*bpm))) { >> + NL_SET_ERR_MSG(extack, "Invalid header"); >> + return -EINVAL; >> + } >> + if (bpm->ifindex) { > > 'bpm' is never initialized. > Thanks. I had not updated the bridge command for strict checking. Doing so and bridge mdb show generates a trace. Will fix.