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  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:   Tue, 15 Nov 2016 22:01:08 -0500 (EST)
From:   David Miller <>
Subject: Re: [PATCH] net: ioctl SIOCSIFADDR minor cleanup

From: yuan linyu <>
Date: Tue, 15 Nov 2016 20:44:59 +0800

> @@ -1063,10 +1063,7 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)
>  			if (!ifa)
>  				break;
>  			INIT_HLIST_NODE(&ifa->hash);
> -			if (colon)
> -				memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);
> -			else
> -				memcpy(ifa->ifa_label, dev->name, IFNAMSIZ);
> +			memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);

This is an incorrect and untested change.

If there is a colon character in ifr.ifr_name, earlier in this function
we will:

1) First replace that colon with a NULL character.

2) Perform __dev_get_by_name() on the result.

3) Put the ":" colon character back into ifr.ifr_name

So the two strings ifr.ifr_name and dev->name can in fact be different
here.  Therefore the code has to be left as it is.

Powered by blists - more mailing lists