[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f12c6f14-66c4-6afb-e768-fa7abcfd1bbc@embeddedor.com>
Date: Thu, 17 Aug 2023 10:05:52 -0600
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Alejandro Colomar <alx@...nel.org>,
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()
> - 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/
Powered by blists - more mailing lists