Re: [PATCH qemu] x86: don't let decompressed kernel image clobber setup_data
From: Borislav Petkov
Date: Thu Dec 29 2022 - 07:48:15 EST
On Wed, Dec 28, 2022 at 11:31:34PM -0800, H. Peter Anvin wrote:
> As far as a crash... that sounds like a big and a pretty serious one at that.
>
> Could you let me know what kernel you are using and how *exactly* you are booting it?
Right, with CONFIG_X86_VERBOSE_BOOTUP=y in a guest here, it says:
early console in extract_kernel
input_data: 0x000000000be073a8
input_len: 0x00000000008cfc43
output: 0x0000000001000000
output_len: 0x000000000b600a98
kernel_total_size: 0x000000000ac26000
needed_size: 0x000000000b800000
trampoline_32bit: 0x000000000009d000
so that's a ~9M kernel which gets decompressed at 0x1000000 and the
output len is, what, ~180M which looks like plenty to me...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette