* [SECURITY,2.4,IPV6]: Fix infinite loop in udp_v6_get_port().
@ 2005-10-27 6:36 Horms
0 siblings, 0 replies; only message in thread
From: Horms @ 2005-10-27 6:36 UTC (permalink / raw)
To: Marcelo Tosatti, Linux Kernel
[IPV6]: Fix infinite loop in udp_v6_get_port()
This is CVE-2005-2973, and
87bf9c97b4b3af8dec7b2b79cdfe7bfc0a0a03b2 in Linus' 2.6 Git Tree.
It seems to be relevant to 2.4
[IPV6]: Fix infinite loop in udp_v6_get_port()
Original sign-off
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mine, indicating that I think it is relevant to 2.4
Signed-off-by: Horms <horms@verge.net.au>
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 471180b..4395aa4 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -89,7 +89,7 @@ static int udp_v6_get_port(struct sock *
next:;
}
result = best;
- for(;; result += UDP_HTABLE_SIZE) {
+ for(i = 0; i < (1 << 16) / UDP_HTABLE_SIZE; i++, result += UDP_HTABLE_SIZE) {
if (result > sysctl_local_port_range[1])
result = sysctl_local_port_range[0]
+ ((result - sysctl_local_port_range[0]) &
@@ -97,6 +97,8 @@ static int udp_v6_get_port(struct sock *
if (!udp_lport_inuse(result))
break;
}
+ if (i >= (1 << 16) / UDP_HTABLE_SIZE)
+ goto fail;
gotit:
udp_port_rover = snum = result;
} else {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-10-27 6:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-27 6:36 [SECURITY,2.4,IPV6]: Fix infinite loop in udp_v6_get_port() Horms
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®