[PATCH 09/17] lib/list_sort: fix function type mismatches

Kees Cook keescook at chromium.org
Fri Mar 12 02:45:27 GMT 2021


On Thu, Mar 11, 2021 at 04:49:11PM -0800, Sami Tolvanen wrote:
> Casting the comparison function to a different type trips indirect
> call Control-Flow Integrity (CFI) checking. Remove the additional
> consts from cmp_func, and the now unneeded casts.
> 
> Fixes: 043b3f7b6388 ("lib/list_sort: simplify and remove MAX_LIST_LENGTH_BITS")
> Signed-off-by: Sami Tolvanen <samitolvanen at google.com>

Reviewed-by: Kees Cook <keescook at chromium.org>

-- 
Kees Cook



More information about the linux-arm-kernel mailing list