Files
Yafang Shao 1a38fd13c3 livepatch: Fix NULL pointer dereference in klp_find_func()
A NULL old_name in a newly loaded livepatch's function entry causes a
NULL pointer dereference in strcmp():

  klp_init_patch()
    klp_add_nops()
      klp_find_func()
        strcmp(old_func->old_name, func->old_name)

Add klp_check_patch() at the beginning of klp_enable_patch() to reject
patches with NULL old_name before they reach this code path.

Reported-by: sashiko-bot <[email protected]>
Closes: https://lore.kernel.org/live-patching/[email protected]/
Suggested-by: Petr Mladek <[email protected]>
Suggested-by: Miroslav Benes <[email protected]>
Signed-off-by: Yafang Shao <[email protected]>
Acked-by: Miroslav Benes <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Tested-by: Petr Mladek <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Petr Mladek <[email protected]>
2026-07-07 12:54:37 +02:00
..
…
2025-10-14 14:50:18 -07:00
…
…
…
…