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: <alpine.LFD.2.11.1606140856010.2467@ja.home.ssi.bg>
Date:	Tue, 14 Jun 2016 09:02:14 +0300 (EEST)
From:	Julian Anastasov <ja@....bg>
To:	Hannes Frederic Sowa <hannes@...essinduktion.org>
cc:	netdev@...r.kernel.org, dsa@...ulusnetworks.com
Subject: Re: [PATCH RFC 1/3] ipv4: make flow functions more grepable by
 removing flowi4_init_output


	Hello,

On Mon, 13 Jun 2016, Hannes Frederic Sowa wrote:

> -	flowi4_init_output(fl4, oif, sk->sk_mark, tos, RT_SCOPE_UNIVERSE,
> -			   protocol, flow_flags, dst, src, dport, sport);
> +	fl4->flowi4_oif = oif;
> +	fl4->flowi4_iif = LOOPBACK_IFINDEX;
> +	fl4->flowi4_mark = sk->sk_mark;
> +	fl4->flowi4_tos = tos;
> +	fl4->flowi4_scope = RT_SCOPE_UNIVERSE;
> +	fl4->flowi4_proto = protocol;
> +	fl4->flowi4_flags = flow_flags;
> +	fl4->flowi4_secid = 0;
> +	fl4->flowi4_tun_key.tun_id = 0;
> +	fl4->daddr = dst;
> +	fl4->saddr = src;
> +	fl4->fl4_dport = dport;
> +	fl4->fl4_sport = sport;

	The way you initialize the fields adds new risks
when new field is added, it is difficult to track all such
places. If they are missed, the lookup will use random
value for the new field. I'm not sure what will compile,
may be something likes this?:

	*fl4 = (struct flowi4) {
		.flowi4_oif = oif,
		...
	};

Regards

--
Julian Anastasov <ja@....bg>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ