lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 12 Oct 2007 10:56:38 +0200
From:	Andreas Henriksson <andreas@...al.se>
To:	shemminger@...ux-foundation.org
Cc:	netdev@...r.kernel.org, Alexander Wirt <formorer@...ian.org>,
	Andreas Henriksson <andreas@...al.se>
Subject: [PATCH 03/12] Prevent renaming interfaces to empty string.

From: Alexander Wirt <formorer@...ian.org>


Signed-off-by: Andreas Henriksson <andreas@...al.se>
---
 ip/iplink.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/ip/iplink.c b/ip/iplink.c
index 4060845..da1f64e 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -670,6 +670,10 @@ static int do_set(int argc, char **argv)
 	}
 
 	if (newname && strcmp(dev, newname)) {
+		if (strlen(newname) == 0) {
+		    printf("\"\" is not valid device identifier\n");
+		    return -1;
+		}
 		if (do_changename(dev, newname) < 0)
 			return -1;
 		dev = newname;
-- 
1.5.3.4

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ