All of lore.kernel.org
 help / color / mirror / Atom feed
From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
To: netdev@vger.kernel.org, davem@davemloft.net, hannes@stressinduktion.org
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Subject: Re: [PATCH] ipv6: add anti-spoofing checks for 6to4 and 6rd
Date: Sat, 19 Jan 2013 10:35:49 +0900	[thread overview]
Message-ID: <50F9F875.30302@linux-ipv6.org> (raw)
In-Reply-To: <20130118200416.GB4795@order.stressinduktion.org>

(2013年01月19日 05:04), Hannes Frederic Sowa wrote:
> This patch adds anti-spoofing checks in sit.c as specified in RFC3964
> section 5.2 for 6to4 and RFC5969 section 12 for 6rd. I left out the
> checks which could easily be implemented with netfilter.
> 
> Specifically this patch adds following logic (based loosely on the
> pseudocode in RFC3964 section 5.2):
> 
> if prefix (inner_src_v6) == rd6_prefix (2002::/16 is the default)
>         and outer_src_v4 != embedded_ipv4 (inner_src_v6)
>                 drop
> if prefix (inner_dst_v6) == rd6_prefix (or 2002::/16 is the default)
>         and outer_dst_v4 != embedded_ipv4 (inner_dst_v6)
>                 drop
> accept
> 
> To accomplish the specified security checks proposed by above RFCs,
> it is still necessary to employ uRPF filters with netfilter. These new
> checks only kick in if the employed addresses are within the 2002::/16 or
> another range specified by the 6rd-prefix (which defaults to 2002::/16).

It seems this breaks 6rd receiving rules:

BR:
	if (outer src ip4 != embedded src ip4)
		drop();
CE:
	if (outer src ip4 != embedded src ip4 ||
	    inner dest ip6 != configured ip6 prefix)
		drop();

No?

--yoshfuji

  reply	other threads:[~2013-01-19  1:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-18 20:04 [PATCH] ipv6: add anti-spoofing checks for 6to4 and 6rd Hannes Frederic Sowa
2013-01-19  1:35 ` YOSHIFUJI Hideaki [this message]
2013-01-20  3:37   ` Hannes Frederic Sowa
2013-01-22  8:20   ` Hannes Frederic Sowa
  -- strict thread matches above, loose matches on Subject: below --
2013-01-17  3:32 Hannes Frederic Sowa
2013-01-17 13:27 ` Hannes Frederic Sowa
2013-01-17 15:44 ` YOSHIFUJI Hideaki
2013-01-17 16:17   ` Hannes Frederic Sowa
2013-01-17 20:07   ` Hannes Frederic Sowa
2013-01-18 19:32     ` 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=50F9F875.30302@linux-ipv6.org \
    --to=yoshfuji@linux-ipv6.org \
    --cc=davem@davemloft.net \
    --cc=hannes@stressinduktion.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.