OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36e3dea
)
ipv6: Check the hop limit setting in ancillary data.
author
Shan Wei
<shanwei@cn.fujitsu.com>
Tue, 10 Jun 2008 07:50:55 +0000
(15:50 +0800)
committer
YOSHIFUJI Hideaki
<yoshfuji@linux-ipv6.org>
Thu, 12 Jun 2008 00:19:08 +0000
(09:19 +0900)
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>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
net/ipv6/datagram.c
patch
|
blob
|
history
diff --git
a/net/ipv6/datagram.c
b/net/ipv6/datagram.c
index
b9c2de8
..
0f0f94a
100644
(file)
--- 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: