Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1669330 > unrolled thread

[PATCH 3.18 07/32] ipv6: Inhibit IPv4-mapped src address on the wire.

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-06-19 17:40 +0200
Last post2017-06-19 17:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.18 07/32] ipv6: Inhibit IPv4-mapped src address on the wire. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 17:40 +0200

#1669330 — [PATCH 3.18 07/32] ipv6: Inhibit IPv4-mapped src address on the wire.

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-19 17:40 +0200
Subject[PATCH 3.18 07/32] ipv6: Inhibit IPv4-mapped src address on the wire.
Message-ID<tU6Wy-4tx-113@gated-at.bofh.it>
3.18-stable review patch.  If anyone has any objections, please let me know.

------------------

From: "Jonathan T. Leighton" <jtleight@udel.edu>


[ Upstream commit ec5e3b0a1d41fbda0cc33a45bc9e54e91d9d12c7 ]

This patch adds a check for the problematic case of an IPv4-mapped IPv6
source address and a destination address that is neither an IPv4-mapped
IPv6 address nor in6addr_any, and returns an appropriate error. The
check in done before returning from looking up the route.

Signed-off-by: Jonathan T. Leighton <jtleight@udel.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ipv6/ip6_output.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -960,6 +960,9 @@ static int ip6_dst_lookup_tail(struct so
 		}
 	}
 #endif
+	if (ipv6_addr_v4mapped(&fl6->saddr) &&
+	    !(ipv6_addr_v4mapped(&fl6->daddr) || ipv6_addr_any(&fl6->daddr)))
+		return -EAFNOSUPPORT;
 
 	return 0;
 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web