public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipv6: sit: ensure prefixlen <= 128 before calling ipv6_addr_prefix
@ 2013-09-29  3:15 Hannes Frederic Sowa
  2013-09-29  3:53 ` Hannes Frederic Sowa
  0 siblings, 1 reply; 2+ messages in thread
From: Hannes Frederic Sowa @ 2013-09-29  3:15 UTC (permalink / raw)
  To: netdev

Found with coverity: CID 139492

Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
 net/ipv6/sit.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 7ee5cb9..4011178 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -1004,6 +1004,9 @@ static int ipip6_tunnel_update_6rd(struct ip_tunnel *t,
 	    ip6rd->prefixlen + (32 - ip6rd->relay_prefixlen) > 64)
 		return -EINVAL;
 
+	if (ip6rd->prefixlen > 128)
+		return -EINVAL;
+
 	ipv6_addr_prefix(&prefix, &ip6rd->prefix, ip6rd->prefixlen);
 	if (!ipv6_addr_equal(&prefix, &ip6rd->prefix))
 		return -EINVAL;
-- 
1.8.3.1

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

* Re: [PATCH] ipv6: sit: ensure prefixlen <= 128 before calling ipv6_addr_prefix
  2013-09-29  3:15 [PATCH] ipv6: sit: ensure prefixlen <= 128 before calling ipv6_addr_prefix Hannes Frederic Sowa
@ 2013-09-29  3:53 ` Hannes Frederic Sowa
  0 siblings, 0 replies; 2+ messages in thread
From: Hannes Frederic Sowa @ 2013-09-29  3:53 UTC (permalink / raw)
  To: netdev

On Sun, Sep 29, 2013 at 05:15:35AM +0200, Hannes Frederic Sowa wrote:
> Found with coverity: CID 139492
> 
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>

Disregard, I was fooled by the report. This is not necessary.

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

end of thread, other threads:[~2013-09-29  3:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-29  3:15 [PATCH] ipv6: sit: ensure prefixlen <= 128 before calling ipv6_addr_prefix Hannes Frederic Sowa
2013-09-29  3:53 ` Hannes Frederic Sowa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox