Re: [PATCH] uapi: propagate __struct_group() attributes to the container union

From: Kees Cook
Date: Mon Nov 27 2023 - 19:22:16 EST


On Fri, Nov 24, 2023 at 06:37:14PM +0100, Johannes Berg wrote:
> On Mon, 2023-11-20 at 14:05 +0300, Dmitry Antipov wrote:
> > Recently the kernel test robot has reported an ARM-specific BUILD_BUG_ON()
> > in an old and unmaintained wil6210 wireless driver.
> >
>
> Heh. I guess it wasn't unmaintained enough for someone to touch it and
> add struct_group() to it...

It needed it since it was using memcpy across fields. But it's been a
while since that change happened, so finding this bug now is pretty
impressive. :)

>
> > include/uapi/linux/stddef.h | 2 +-
> >
>
> No idea what tree this should go through, but I guess wireless isn't
> appropriate.

I'll take it; thanks for the find Dmitry!

--
Kees Cook