[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df8fdd4a-490f-6b2a-03b6-0333e3302dce@kernel.org>
Date: Thu, 17 Aug 2023 20:37:43 +0200
From: Alejandro Colomar <alx@...nel.org>
To: "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Kees Cook <keescook@...omium.org>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
linux-hardening@...r.kernel.org
Subject: Re: struct_size() using sizeof() vs offsetof()
Hi Gustavo,
On 2023-08-17 18:05, Gustavo A. R. Silva wrote:
>
>> - tp_c = kzalloc(sizeof(*tp_c), GFP_KERNEL);
>> + tp_c = kzalloc(struct_size(tp_c, hlist->ht, 1), GFP_KERNEL);
>
> I just sent a fix[1].
>
> Thanks for reporting this! :)
:-)
> --
> Gustavo
>
> [1] https://lore.kernel.org/linux-hardening/ZN5DvRyq6JNz20l1@work/
Please CC me in that thread. I want to know when the patch is installed, to
prepare my own against that tree.
Cheers,
Alex
--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
Download attachment "OpenPGP_signature" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists