Re: [PATCH v2] kconfig: fix use-after-free when a variable refers to itself
From: Nicolas Schier
Date: Thu Nov 05 2026 - 02:32:36 EST
On Thu, 08 Oct 2026 11:45:04 -0500, Leizhen Zhang wrote:
> For a simply expanded variable, variable_add() frees the old value of an
> existing variable (or allocates a new variable with an uninitialized
> value) before expanding the right-hand side. If the right-hand side
> refers to the variable itself, which is a common idiom in Makefiles,
> e.g.
>
> X := 1
> X := $(X) 2
>
> [...]
Applied to kbuild/linux.git (kbuild-next-unstable), thanks!
[1/1] kconfig: fix use-after-free when a variable refers to itself
https://git.kernel.org/kbuild/c/3910d22d
Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped,
reverted or modified (e.g. trailers).
Patches applied to the kbuild-next-unstable branch are accepted pending
wider testing in linux-next and any post-commit review; they will
generally be moved to the kbuild-next branch in about a week if no
issues are found.
Best regards,
--
Nicolas