* [RFC][PATCH 1/3] IPv6:Check the outgoing hop limit value
@ 2008-06-10 7:50 Shan Wei
2008-06-10 8:11 ` YOSHIFUJI Hideaki / 吉藤英明
0 siblings, 1 reply; 2+ messages in thread
From: Shan Wei @ 2008-06-10 7:50 UTC (permalink / raw)
To: YOSHIFUJI Hideaki / 吉藤英明; +Cc: davem, netdev
When specifing the outgoing hop limit as ancillary data for sendmsg(),
the kernel doesn't check the integer hop limit value as specified in
[RFC-3542] section 6.3.
Signed-off-by: Shan Wei<shanwei@cn.fujitsu.com>
---
net/ipv6/datagram.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index b9c2de8..0f0f94a 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -705,6 +705,11 @@ int datagram_send_ctl(struct net *net,
}
*hlimit = *(int *)CMSG_DATA(cmsg);
+ if (*hlimit < -1 || *hlimit > 0xff) {
+ err = -EINVAL;
+ goto exit_f;
+ }
+
break;
case IPV6_TCLASS:
--
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC][PATCH 1/3] IPv6:Check the outgoing hop limit value
2008-06-10 7:50 [RFC][PATCH 1/3] IPv6:Check the outgoing hop limit value Shan Wei
@ 2008-06-10 8:11 ` YOSHIFUJI Hideaki / 吉藤英明
0 siblings, 0 replies; 2+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2008-06-10 8:11 UTC (permalink / raw)
To: shanwei; +Cc: davem, netdev
In article <484E325F.4010102@cn.fujitsu.com> (at Tue, 10 Jun 2008 15:50:55 +0800), Shan Wei <shanwei@cn.fujitsu.com> says:
> When specifing the outgoing hop limit as ancillary data for sendmsg(),
> the kernel doesn't check the integer hop limit value as specified in
> [RFC-3542] section 6.3.
I'm going apply this in my queue. Thanks.
--yoshfuji
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-10 8:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-10 7:50 [RFC][PATCH 1/3] IPv6:Check the outgoing hop limit value Shan Wei
2008-06-10 8:11 ` YOSHIFUJI Hideaki / 吉藤英明
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).