[PATCH] powerpc: check previous kernel's ima-kexec-buffer against memory bounds

2022-05-18 Thread Vaibhav Jain
Presently ima_get_kexec_buffer() doesn't check if the previous kernel's ima-kexec-buffer lies outside the addressable memory range. This can result in a kernel panic if the new kernel is booted with 'mem=X' arg and the ima-kexec-buffer was allocated beyond that range by the previous kernel. The pan

Re: [PATCH] powerpc: check previous kernel's ima-kexec-buffer against memory bounds

2022-05-18 Thread Lakshmi Ramasubramanian
Hi Vaibhav, On 5/18/2022 1:05 PM, Vaibhav Jain wrote: Presently ima_get_kexec_buffer() doesn't check if the previous kernel's ima-kexec-buffer lies outside the addressable memory range. This can result in a kernel panic if the new kernel is booted with 'mem=X' arg and the ima-kexec-buffer was al

Re: [PATCH] powerpc: check previous kernel's ima-kexec-buffer against memory bounds

2022-05-20 Thread Michael Ellerman
Vaibhav Jain writes: > > [PATCH] powerpc: check previous kernel's ima-kexec-buffer against memory > bounds This isn't a powerpc patch, the subject should start with "of:". > Presently ima_get_kexec_buffer() doesn't check if the previous kernel's >

Re: [PATCH] powerpc: check previous kernel's ima-kexec-buffer against memory bounds

2022-05-20 Thread Rob Herring
On Thu, May 19, 2022 at 01:35:47AM +0530, Vaibhav Jain wrote: > Presently ima_get_kexec_buffer() doesn't check if the previous kernel's > ima-kexec-buffer lies outside the addressable memory range. This can result > in a kernel panic if the new kernel is booted with 'mem=X' arg and the > ima-kexec-

Re: [PATCH] powerpc: check previous kernel's ima-kexec-buffer against memory bounds

2022-05-22 Thread Vaibhav Jain
Rob Herring writes: > On Thu, May 19, 2022 at 01:35:47AM +0530, Vaibhav Jain wrote: >> Presently ima_get_kexec_buffer() doesn't check if the previous kernel's >> ima-kexec-buffer lies outside the addressable memory range. This can result >> in a kernel panic if the new kernel is booted with 'mem=

Re: [PATCH] powerpc: check previous kernel's ima-kexec-buffer against memory bounds

2022-05-22 Thread Michael Ellerman
Vaibhav Jain writes: > Rob Herring writes: >> On Thu, May 19, 2022 at 01:35:47AM +0530, Vaibhav Jain wrote: >>> Presently ima_get_kexec_buffer() doesn't check if the previous kernel's >>> ima-kexec-buffer lies outside the addressable memory range. This can result >>> in a kernel panic if the new

Re: [PATCH] powerpc: check previous kernel's ima-kexec-buffer against memory bounds

2022-05-23 Thread Vaibhav Jain
Michael Ellerman writes: > > Rob's point is that commit fee3ff99bc67 only moved existing code, the > bug already existed. > > The function was introduced in: > > 467d27824920 ("powerpc: ima: get the kexec buffer passed by the previous > kernel") > > So that's where the Fixes tag should poin