From: Matthew Thode Date: Wed, 18 Feb 2015 00:31:57 +0000 (-0600) Subject: net: reject creation of netdev names with colons X-Git-Tag: v3.16.35~2626 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4618793e1c4f8734ccb5feb299142eabba1a8c89;p=thirdparty%2Fkernel%2Fstable.git net: reject creation of netdev names with colons commit a4176a9391868bfa87705bcd2e3b49e9b9dd2996 upstream. colons are used as a separator in netdev device lookup in dev_ioctl.c Specific functions are SIOCGIFTXQLEN SIOCETHTOOL SIOCSIFNAME Signed-off-by: Matthew Thode Signed-off-by: David S. Miller Signed-off-by: Luis Henriques --- diff --git a/net/core/dev.c b/net/core/dev.c index efcc7f4b4fc77..58bf1016a5215 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -940,7 +940,7 @@ bool dev_valid_name(const char *name) return false; while (*name) { - if (*name == '/' || isspace(*name)) + if (*name == '/' || *name == ':' || isspace(*name)) return false; name++; }