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:	Sat, 16 Aug 2014 15:48:06 -0700
From:	Cong Wang <cwang@...pensource.com>
To:	Gerhard Stenzel <gstenzel@...ux.vnet.ibm.com>
Cc:	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net] vxlan: fix incorrect initializer in union vxlan_addr

On Fri, Aug 15, 2014 at 2:03 AM, Gerhard Stenzel
<gstenzel@...ux.vnet.ibm.com> wrote:
>
> The first initializer in the following
>
>                 union vxlan_addr ipa = {
>                         .sin.sin_addr.s_addr = tip,
>                         .sa.sa_family = AF_INET,
>                 };
>
> is optimised away by the compiler, due to the second initializer,
> therefore initialising .sin.sin_addr.s_addr always to 0.
> This results in netlink messages indicating a L3 miss never contain the
> missed IP address. This was observed with GCC 4.8 and 4.9. I do not know
> about previous versions.
> The problem affects user space programs relying on an IP address being
> sent as part of a netlink message indicating a L3 miss.
>
> Changing
>                         .sa.sa_family = AF_INET,
> to
>                         .sin.sin_family = AF_INET,
> fixes the problem.

So GCC can't figure out we are initializing different parts of this
union through
different members... Or maybe we should not use initializer at all.

Anyway,

Acked-by: Cong Wang <cwang@...pensource.com>
--
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