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 <mthode@mthode.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Matthew Thode 2015-02-17 18:31:57 -06:00 committed by Greg Kroah-Hartman
parent cae79d75dd
commit cde81ed79f
1 changed files with 1 additions and 1 deletions

View File

@ -927,7 +927,7 @@ bool dev_valid_name(const char *name)
return false;
while (*name) {
if (*name == '/' || isspace(*name))
if (*name == '/' || *name == ':' || isspace(*name))
return false;
name++;
}