Skip to contentSkip to conversation

Patch "ipv6: Inhibit IPv4-mapped src address on the wire." has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jun 15, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

ipv6: Inhibit IPv4-mapped src address on the wire.

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
ipv6-inhibit-ipv4-mapped-src-address-on-the-wire.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Jun 15 09:31:48 CEST 2017

From: "Jonathan T. Leighton" <[email protected]>
Date: Tue, 23 May 2017 21:53:34 -0400
Subject: ipv6: Inhibit IPv4-mapped src address on the wire.

From: "Jonathan T. Leighton" <[email protected]>

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

---
 net/ipv6/ip6_output.c |    3 +++
 1 file changed, 3 insertions(+)
net/ipv6/ip6_output.c +3 -0
@@ -1019,6 +1019,9 @@ static int ip6_dst_lookup_tail(struct ne
 		}
 	}
 #endif
+	if (ipv6_addr_v4mapped(&fl6->saddr) &&
+	    !(ipv6_addr_v4mapped(&fl6->daddr) || ipv6_addr_any(&fl6->daddr)))
+		return -EAFNOSUPPORT;
 
 	return 0;
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/ipv6-inhibit-ipv4-mapped-src-address-on-the-wire.patch queue-4.9/ipv6-handle-ipv4-mapped-src-to-in6addr_any-dst.patch