netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] ipv6: stop sending PTB packets for MTU < 1280
@ 2015-01-15 21:34 Hagen Paul Pfeifer
  2015-01-19 13:55 ` Hannes Frederic Sowa
  2015-01-19 19:51 ` David Miller
  0 siblings, 2 replies; 9+ messages in thread
From: Hagen Paul Pfeifer @ 2015-01-15 21:34 UTC (permalink / raw)
  To: netdev; +Cc: Hannes Frederic Sowa, Hagen Paul Pfeifer, stable, Fernando Gont

Reduce the attack vector and stop generating IPv6 Fragment Header for
paths with an MTU smaller than the minimum required IPv6 MTU
size (1280 byte) - called atomic fragments.

See IETF I-D "Deprecating the Generation of IPv6 Atomic Fragments" [1]
for more information and how this "feature" can be misused.

[1] https://tools.ietf.org/html/draft-ietf-6man-deprecate-atomfrag-generation-00

Cc: stable@vger.kernel.org
Signed-off-by: Fernando Gont <fgont@si6networks.com>
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/ipv6/route.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 34dcbb5..d4603fb 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1160,12 +1160,9 @@ static void ip6_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
 		struct net *net = dev_net(dst->dev);
 
 		rt6->rt6i_flags |= RTF_MODIFIED;
-		if (mtu < IPV6_MIN_MTU) {
-			u32 features = dst_metric(dst, RTAX_FEATURES);
+		if (mtu < IPV6_MIN_MTU)
 			mtu = IPV6_MIN_MTU;
-			features |= RTAX_FEATURE_ALLFRAG;
-			dst_metric_set(dst, RTAX_FEATURES, features);
-		}
+
 		dst_metric_set(dst, RTAX_MTU, mtu);
 		rt6_update_expires(rt6, net->ipv6.sysctl.ip6_rt_mtu_expires);
 	}
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-01-20  4:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-15 21:34 [PATCH net] ipv6: stop sending PTB packets for MTU < 1280 Hagen Paul Pfeifer
2015-01-19 13:55 ` Hannes Frederic Sowa
2015-01-19 14:00   ` Hagen Paul Pfeifer
2015-01-19 19:50     ` David Miller
2015-01-19 20:05       ` Hannes Frederic Sowa
2015-01-19 22:05         ` Hagen Paul Pfeifer
2015-01-20  4:02           ` Loganaden Velvindron
2015-01-20  4:52             ` Fernando Gont
2015-01-19 19:51 ` David Miller

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).