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:	Tue, 14 Jun 2016 10:59:33 +0200
From:	Hannes Frederic Sowa <hannes@...essinduktion.org>
To:	Julian Anastasov <ja@....bg>
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

On 14.06.2016 08:02, Julian Anastasov wrote:
> 
> 	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,
> 		...
> 	};

Yes, this is probably the better way to go, I adapted my patch accordingly.

Thanks,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ