[PATCH][next] apparmor: Use struct_size() helper in kzalloc()

Gustavo A. R. Silva gustavoars at kernel.org
Fri Oct 1 23:49:12 UTC 2021


On Fri, Oct 01, 2021 at 04:37:08PM -0700, John Johansen wrote:
> On 9/29/21 3:05 PM, Gustavo A. R. Silva wrote:
> > Make use of the struct_size() helper instead of an open-coded version,
> > in order to avoid any potential type mistakes or integer overflows that,
> > in the worse scenario, could lead to heap overflows.
> >> Link: https://github.com/KSPP/linux/issues/160
> > Signed-off-by: Gustavo A. R. Silva <gustavoars at kernel.org>
> 
> nice
> 
> I will pull this into my tree
> Acked-by: John Johansen <john.johansen at canonical.com>

Thanks, John.

--
Gustavo



More information about the Linux-security-module-archive mailing list