Re: [PATCH] netfilter: ebtables: replace zero-length array members
From: Kees Cook
Date: Thu Aug 10 2023 - 16:18:53 EST
On Wed, Aug 09, 2023 at 03:51:36PM +0800, GONG, Ruiqi wrote:
> From: "GONG, Ruiqi" <gongruiqi1@xxxxxxxxxx>
>
> As suggested by Kees[1], replace the old-style 0-element array members
> of multiple structs in ebtables.h with modern C99 flexible array.
>
> [1]: https://lore.kernel.org/all/5E8E0F9C-EE3F-4B0D-B827-DC47397E2A4A@xxxxxxxxxx/
>
> Link: https://github.com/KSPP/linux/issues/21
> Signed-off-by: GONG, Ruiqi <gongruiqi1@xxxxxxxxxx>
In theory, this should be fine. It is possible there are userspace tools
that are doing (already) buggy things that will now turn into build
failures. If the userspace ebtable tools still build happily with these
UAPI changes, I imagine that would be a sufficient test.
Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>
--
Kees Cook