This is a note to let you know that I've just added the patch titled
net/ipv4: Check for mistakenly passed in non-IPv4 address
to the 2.6.39-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:
net-ipv4-check-for-mistakenly-passed-in-non-ipv4-address.patch
and it can be found in the queue-2.6.39 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From ed1cde6af9502a1955e390875a702f3be2da02de Mon Sep 17 00:00:00 2001
From: Marcus Meissner <[email protected]>
Date: Wed, 1 Jun 2011 21:05:22 -0700
Subject: net/ipv4: Check for mistakenly passed in non-IPv4 address
From: Marcus Meissner <[email protected]>
[ Upstream commit d0733d2e29b652b2e7b1438ececa732e4eed98eb ]
Check against mistakenly passing in IPv6 addresses (which would result
in an INADDR_ANY bind) or similar incompatible sockaddrs.
Signed-off-by: Marcus Meissner <[email protected]>
Cc: Reinhard Max <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
net/ipv4/af_inet.c | 3 +++
1 file changed, 3 insertions(+)
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -464,6 +464,9 @@ int inet_bind(struct socket *sock, struc
if (addr_len < sizeof(struct sockaddr_in))
goto out;
+ if (addr->sin_family != AF_INET)
+ goto out;
+
chk_addr_ret = inet_addr_type(sock_net(sk), addr->sin_addr.s_addr);
/* Not specified by any standard per-se, however it breaks too
Patches currently in stable-queue which might be from [email protected] are
queue-2.6.39/net-ipv4-check-for-mistakenly-passed-in-non-ipv4-address.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable