[PATCH v2 1/3] kexec_file: update IMA after machine post-load
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Nov 12 05:04:35 PST 2026
> ima_kexec_post_load() replaces the global IMA mapping with a mapping for
> the new image. If machine_kexec_post_load() fails, the new image is
> freed but that mapping remains. The installed image no longer receives
> the execute-time IMA update, and the notifier can write the
> measurement list into freed pages.
>
> Call the machine hook first. Return its error before updating IMA so IMA
> changes the mapping only for an image which will be installed.
>
> Fixes: 9f0ec4b16f2b ("ima: kexec: move IMA log copy from kexec load to execute")
> Cc: stable at vger.kernel.org
> Signed-off-by: Jérémy Jean <Jeremy.Jean at oss.cyber.gouv.fr>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261112125246.2715174-2-Jeremy.Jean@oss.cyber.gouv.fr?part=1
More information about the kexec
mailing list