[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ec3c1b29004d1be28563b20765d6a06ccdf18db5.camel@linux.ibm.com>
Date: Mon, 01 Dec 2025 16:43:34 -0500
From: Mimi Zohar <zohar@...ux.ibm.com>
To: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>,
henry.willard@...cle.com, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar
<mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen
<dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin"
<hpa@...or.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Mike Rapoport
(Microsoft)" <rppt@...nel.org>,
Jiri Bohac <jbohac@...e.cz>,
Sourabh Jain
<sourabhjain@...ux.ibm.com>,
Guo Weikang <guoweikang.kernel@...il.com>,
Ard Biesheuvel <ardb@...nel.org>,
Joel Granados
<joel.granados@...nel.org>,
Alexander Graf <graf@...zon.com>,
Sohil Mehta
<sohil.mehta@...el.com>,
Jonathan McDowell <noodles@...com>, linux-kernel@...r.kernel.org
Cc: yifei.l.liu@...cle.com, stable@...r.kernel.org,
Paul Webb
<paul.x.webb@...cle.com>
Subject: Re: [PATCH] x86/kexec: Add a sanity check on previous kernel's ima
kexec buffer
On Mon, 2025-12-01 at 15:03 +0530, Harshit Mogalapalli wrote:
> Hi all,
>
> On 13/11/25 01:00, Harshit Mogalapalli wrote:
> > When the second-stage kernel is booted via kexec with a limiting command
> > line such as "mem=<size>", the physical range that contains the carried
> > over IMA measurement list may fall outside the truncated RAM leading to
> > a kernel panic.
> >
> > BUG: unable to handle page fault for address: ffff97793ff47000
> > RIP: ima_restore_measurement_list+0xdc/0x45a
> > #PF: error_code(0x0000) – not-present page
> >
> > Other architectures already validate the range with page_is_ram(), as
> > done in commit: cbf9c4b9617b ("of: check previous kernel's
> > ima-kexec-buffer against memory bounds") do a similar check on x86.
It should be obvious that without carrying the measurement list across kexec,
that attestation will fail. Please mentioned it here in the patch description.
> >
> > Cc: stable@...r.kernel.org
> > Fixes: b69a2afd5afc ("x86/kexec: Carry forward IMA measurement log on kexec")
> > Reported-by: Paul Webb <paul.x.webb@...cle.com>
> > Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
Tested-by: Mimi Zohar <zohar@...ux.ibm.com>
>
Powered by blists - more mailing lists