netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sabrina Dubroca <sd@queasysnail.net>
To: Marcelo Ricardo Leitner <mleitner@redhat.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v2 net] ipv6: addrconf: validate new MTU before applying it
Date: Tue, 24 Feb 2015 00:10:02 +0100	[thread overview]
Message-ID: <20150223231002.GA32636@kria> (raw)
In-Reply-To: <463ebd12cf29ddcf17275bdde9fb629444a5fa5b.1424698335.git.mleitner@redhat.com>

2015-02-23, 11:17:13 -0300, Marcelo Ricardo Leitner wrote:
> Currently we don't check if the new MTU is valid or not and this allows
> one to configure a smaller than minimum allowed by RFCs or even bigger
> than interface own MTU, which is a problem as it may lead to packet
> drops.
> 
> If you have a daemon like NetworkManager running, this may be exploited
> by remote attackers by forging RA packets with an invalid MTU, possibly
> leading to a DoS. (NetworkManager currently only validates for values
> too small, but not for too big ones.)
> 
> The fix is just to make sure the new value is valid. That is, between
> IPV6_MIN_MTU and interface's MTU.
> 
> Note that similar check is already performed at
> ndisc_router_discovery(), for when kernel itself parses the RA.
> 
> Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
> ---
> 
> Notes:
>     Sabrina, please feel free to add your Signed-off-by if you want.
>     
>     v1->v2, applied Sabrina's notes:
>        use proc_dointvec_minmax instead
>        protect against all and default cases, which don't have idev
>     
>     all and default are simply not used, so we are good to simply ignore the
>     max values for them. The default value actually comes from interface MTU
>     during creation.
> 
>  net/ipv6/addrconf.c | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>


Thanks Marcelo.

-- 
Sabrina

  reply	other threads:[~2015-02-23 23:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 14:17 [PATCH v2 net] ipv6: addrconf: validate new MTU before applying it Marcelo Ricardo Leitner
2015-02-23 23:10 ` Sabrina Dubroca [this message]
2015-02-23 23:16 ` 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=20150223231002.GA32636@kria \
    --to=sd@queasysnail.net \
    --cc=mleitner@redhat.com \
    --cc=netdev@vger.kernel.org \
    /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).