lkml.org 
[lkml]   [2022]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH bpf-next v3 1/2] bpf: limit bpf_core_types_are_compat() recursion
On Thu, Feb 3, 2022 at 4:55 PM Matteo Croce <mcroce@linux.microsoft.com> wrote:
> +
> + for (i = 0; i < local_vlen; i++, local_p++, targ_p++) {
> + if (level <= 1)
> + return -EINVAL;

<= 1 is not correct, since it makes
MAX_TYPES_ARE_COMPAT_DEPTH 2
misleading.
With <= 1 the recursion depth is just 1.
So I've changed to to <=0 to make the actual depth of 2.

\
 
 \ /
  Last update: 2022-02-04 20:33    [W:0.065 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site