From: John Fastabend <john.fastabend@gmail.com>
To: Thomas Graf <tgraf@suug.ch>
Cc: Jiri Pirko <jiri@resnulli.us>,
davem@davemloft.net, stephen@networkplumber.org,
netdev@vger.kernel.org
Subject: Re: [PATCH 0/5 net] bridge: Fix missing Netlink message validations
Date: Sat, 29 Nov 2014 09:51:42 -0800 [thread overview]
Message-ID: <547A07AE.7060305@gmail.com> (raw)
In-Reply-To: <20141126231436.GF32174@casper.infradead.org>
On 11/26/2014 03:14 PM, Thomas Graf wrote:
> On 11/26/14 at 09:25am, John Fastabend wrote:
>>> --- a/net/ipv4/devinet.c
>>> +++ b/net/ipv4/devinet.c
>>> @@ -1687,8 +1687,11 @@ static int inet_set_link_af(struct net_device *dev, const struct nlattr *nla)
>>> BUG();
>>>
>>> if (tb[IFLA_INET_CONF]) {
>>> - nla_for_each_nested(a, tb[IFLA_INET_CONF], rem)
>>> + nla_for_each_nested(a, tb[IFLA_INET_CONF], rem) {
>>> + if (nla_len(a) < sizeof(u32))
>>> + return -EINVAL;
>>> ipv4_devconf_set(in_dev, nla_type(a), nla_get_u32(a));
>>> + }
>
> Looked into this and found a validation function
> inet_validate_link_af(). It's split to keep the updates atomic.
>
Ah great thanks.
--
John Fastabend Intel Corporation
next prev parent reply other threads:[~2014-11-29 17:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-26 12:42 [PATCH 0/5 net] bridge: Fix missing Netlink message validations Thomas Graf
2014-11-26 12:42 ` [PATCH 1/5] bridge: Validate IFLA_BRIDGE_FLAGS attribute length Thomas Graf
2014-11-26 12:42 ` [PATCH 2/5] net: Validate IFLA_BRIDGE_MODE " Thomas Graf
2014-11-26 13:29 ` Jeff Kirsher
2014-11-26 16:42 ` John Fastabend
2014-11-26 12:42 ` [PATCH 3/5] net: Check for presence of IFLA_AF_SPEC Thomas Graf
2014-11-26 13:30 ` Jeff Kirsher
2014-11-26 12:42 ` [PATCH 4/5] bridge: Add missing policy entry for IFLA_BRPORT_FAST_LEAVE Thomas Graf
2014-11-26 12:42 ` [PATCH 5/5] bridge: Sanitize IFLA_EXT_MASK for AF_BRIDGE:RTM_GETLINK Thomas Graf
2014-11-26 16:58 ` [PATCH 0/5 net] bridge: Fix missing Netlink message validations John Fastabend
2014-11-26 17:06 ` Thomas Graf
2014-11-26 17:25 ` John Fastabend
2014-11-26 23:14 ` Thomas Graf
2014-11-29 17:51 ` John Fastabend [this message]
2014-11-26 20:29 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=547A07AE.7060305@gmail.com \
--to=john.fastabend@gmail.com \
--cc=davem@davemloft.net \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=tgraf@suug.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).