Re: [PATCH RFC 1/20] selinux: check for multiplication overflow in put_entry()

From: Paul Moore
Date: Tue Jul 18 2023 - 18:01:24 EST


On Jul 6, 2023 Gong Ruiqi <gongruiqi1@xxxxxxxxxx> wrote:
>
> The function is always inlined and most of the time both relevant
> arguments are compile time constants, allowing compilers to elide the
> check. Also the function is part of outputting the policy, which is not
> performance critical.
>
> Also convert the type of the third parameter into a size_t, since it
> should always be a non-negative number of elements.
>
> Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx>
> ---
> security/selinux/ss/policydb.h | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)

Merged into selinux/next, thanks.

--
paul-moore.com