[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202504090925.2FB4D65@keescook>
Date: Wed, 9 Apr 2025 09:25:29 -0700
From: Kees Cook <kees@...nel.org>
To: Eric Woudstra <ericwouds@...il.com>
Cc: Michal Ostrowski <mostrows@...thlink.net>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Pablo Neira Ayuso <pablo@...filter.org>,
Jozsef Kadlecsik <kadlec@...filter.org>,
Simon Horman <horms@...nel.org>,
Nikolay Aleksandrov <razor@...ckwall.org>, netdev@...r.kernel.org,
netfilter-devel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH v11 nf-next 1/2] net: pppoe: avoid zero-length arrays in
struct pppoe_hdr
On Tue, Apr 08, 2025 at 04:24:24PM +0200, Eric Woudstra wrote:
> Jakub Kicinski suggested following patch:
>
> W=1 C=1 GCC build gives us:
>
> net/bridge/netfilter/nf_conntrack_bridge.c: note: in included file (through
> ../include/linux/if_pppox.h, ../include/uapi/linux/netfilter_bridge.h,
> ../include/linux/netfilter_bridge.h): include/uapi/linux/if_pppox.h:
> 153:29: warning: array of flexible structures
>
> It doesn't like that hdr has a zero-length array which overlaps proto.
> The kernel code doesn't currently need those arrays.
>
> PPPoE connection is functional after applying this patch.
>
> Reviewed-by: Nikolay Aleksandrov <razor@...ckwall.org>
> Signed-off-by: Eric Woudstra <ericwouds@...il.com>
Reviewed-by: Kees Cook <kees@...nel.org>
--
Kees Cook
Powered by blists - more mailing lists