Re: [PATCH] livepatch: Fix NULL pointer dereference in klp_find_func()
Miroslav Benes <[email protected]> Thu, 25 Jun 2026 15:24:49 +0200 (CEST)
| Newsgroups | org.kernel.vger.live-patching |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 23 Jun 2026, Yafang Shao wrote: > 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 a sanity check at the beginning of klp_enable_patch() to reject > patches with NULL old_name before they reach this code path. The changelog could also mention the introduction of klp_check_patch(). Acked-by: Miroslav Benes <[email protected]> M