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]
Message-Id: <1192211154.4733.67.camel@localhost.localdomain>
Date:	Fri, 12 Oct 2007 19:45:54 +0200
From:	Andreas Henriksson <andreas@...al.se>
To:	Stephen Hemminger <shemminger@...ux-foundation.org>
Cc:	netdev@...r.kernel.org, Alexander Wirt <formorer@...ian.org>
Subject: Re: [PATCH 03/12] Prevent renaming interfaces to empty string.


On fre, 2007-10-12 at 10:07 -0700, Stephen Hemminger wrote:

> >  	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;
> 
> The kernel should already be preventing this?

Looks like something prevents the interface to end up with no name, but
there's no error message...

./ip/ip is the "vanilla" and /sbin/ip is debians version.

$ sudo ./ip/ip link set skif name ""
$ echo $?
0
$ sudo /sbin/ip link set skif name ""
"" is not valid device identifier
$ echo $?
255

Reporting the error is probably the preferred behaviour (and return code
set to error is most likely helpful for scripts).


-- 
Regards,
Andreas Henriksson

-
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