OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2781503
)
ip_tunnel: Fix off-by-one error in forming dev name.
author
Pravin B Shelar
<pshelar@nicira.com>
Thu, 28 Mar 2013 08:21:46 +0000
(08:21 +0000)
committer
David S. Miller
<davem@davemloft.net>
Fri, 29 Mar 2013 19:24:28 +0000
(15:24 -0400)
As Ben pointed out following patch fixes bug in checking device
name length limits while forming tunnel device name.
CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_tunnel.c
patch
|
blob
|
history
diff --git
a/net/ipv4/ip_tunnel.c
b/net/ipv4/ip_tunnel.c
index
9d96b68
..
e4147ec
100644
(file)
--- a/
net/ipv4/ip_tunnel.c
+++ b/
net/ipv4/ip_tunnel.c
@@
-284,7
+284,7
@@
static struct net_device *__ip_tunnel_create(struct net *net,
if (parms->name[0])
strlcpy(name, parms->name, IFNAMSIZ);
else {
- if (strlen(ops->kind)
+ 3 >= IFNAMSIZ
) {
+ if (strlen(ops->kind)
> (IFNAMSIZ - 3)
) {
err = -E2BIG;
goto failed;
}