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.19.2~161 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=465146d28c3173d31229df1cf53a4696360a399d;p=thirdparty%2Fkernel%2Fstable.git net: reject creation of netdev names with colons [ Upstream commit a4176a9391868bfa87705bcd2e3b49e9b9dd2996 ] 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: Greg Kroah-Hartman --- diff --git a/net/core/dev.c b/net/core/dev.c index 7fe82929f5094..4ff46f8054d41 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -945,7 +945,7 @@ bool dev_valid_name(const char *name) return false; while (*name) { - if (*name == '/' || isspace(*name)) + if (*name == '/' || *name == ':' || isspace(*name)) return false; name++; }