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] [day] [month] [year] [list]
Message-ID: <cb27ef1b-d316-42ed-8781-69bef7dc76b8@nvidia.com>
Date: Sun, 12 Jan 2025 08:37:43 +0200
From: Gal Pressman <gal@...dia.com>
To: Kees Cook <kees@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski
 <kuba@...nel.org>, netdev@...r.kernel.org, Eric Dumazet
 <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
 David Ahern <dsahern@...nel.org>, Simon Horman <horms@...nel.org>,
 linux-hardening@...r.kernel.org, Cosmin Ratiu <cratiu@...dia.com>
Subject: Re: [PATCH net-next] net: Silence false field-spanning write warning
 in ip_tunnel_info_opts_set() memcpy

On 09/01/2025 18:52, Kees Cook wrote:
> On Thu, Jan 09, 2025 at 11:00:24AM +0200, Gal Pressman wrote:
>> On 08/01/2025 1:28, Kees Cook wrote:
>>>> This resolves the following warning:
>>>>  memcpy: detected field-spanning write (size 8) of single field "_Generic(info, const struct ip_tunnel_info * : ((const void *)((info) + 1)), struct ip_tunnel_info * : ((void *)((info) + 1)) )" at include/net/ip_tunnels.h:662 (size 0)
>>>
>>> Then you can drop this macro and just use: info->options
>>>
>>> Looks like you'd need to do it for all the types in struct metadata_dst, but at least you could stop hiding it from the compiler. :)
>>
>> Can you please explain the "do it for all the types in struct
>> metadata_dst" part?
>> AFAICT, struct ip_tunnel_info is the only one that's extendable, I don't
>> think others need to be modified.
> 
> Ah, sorry. If that's the case, then just ip_tunnel_info is fine. (Is all
> of the metadata_dst trailing byte allocation logic just for
> ip_tunnel_info?)

Yes, thanks again!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ