]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: reject creation of netdev names with colons
authorMatthew Thode <mthode@mthode.org>
Wed, 18 Feb 2015 00:31:57 +0000 (18:31 -0600)
committerLuis Henriques <luis.henriques@canonical.com>
Thu, 12 Mar 2015 16:27:35 +0000 (16:27 +0000)
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 <mthode@mthode.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
net/core/dev.c

index efcc7f4b4fc77bfa4436cc13d032f3a90eebbb63..58bf1016a5215fc42f3356a1304cf5c4f6b5e3a2 100644 (file)
@@ -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++;
        }