Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5910420rwl; Thu, 29 Dec 2022 05:01:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXvDiIVwVJYleuAKhsB5/yu5W/QY0A4GtwBy89yl6UoewvldhmUtR9mEsF6hIIVgGssW9+rj X-Received: by 2002:a17:906:284d:b0:7ad:b865:d3b7 with SMTP id s13-20020a170906284d00b007adb865d3b7mr24443185ejc.21.1672318894372; Thu, 29 Dec 2022 05:01:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672318894; cv=none; d=google.com; s=arc-20160816; b=K2nLX3RC9CoBYC7O+qJPstaYXgaz1FJM2IIShFV+hFzpOi2FR2AoTMvdLwb89U7GWn HmC/4FVyNXheoi6JTf2JP2dki7tAK34Cig5JC+LEh5G0KBRe5FVO0p1FNtAhi0VjCMWQ 8Gph3m8BngL5m9A2DT6viM2AI+lTJRQgDhKiY40RwTDrVbn6dwZldgnvAbhUzNtxeT1c ZifcnuRZF8np3jB1xvIhHjppS40RIYLEIzTYoxGtCpSd4sUpFUJuP7JcCASxSx+V7ciZ PZfLEcVMWSzYHp5vSMdvEcjHYXjux+1mJAUqcyrwhiORV1oke9yG22uLZBsoq4LcFmzV NRzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1KcR7E77mv9elx5G9X9IlsW0Rh4iCO+tG818qQo64N4=; b=pP+GFqI8YQLsG3NgC03+ve1A5FnDp7KHRFZUTnYwzR+yKuzrzO0bHFSw0ZcfD7MYOZ EpND7w01MHfUA528PrcYgy/y6INbjZIxQWT5/BQhWYoVY1o+JCqBjERUoy9UzZUPgUiP 6E+Ue7p4+w/F0HONBztLh7a51j/okV6/wUqoqAAvj529oigsQ2uIP8Ws1fkZlnqen7cK xn7+ly/meWvsft/CcNlZXe5KxTCHmlsOOH0ghkO29K1V9Jv5g91dDD8DAGne36nzX3wQ MLsyvRC8/o3RuI7+XGm+Kaciw+Ijj48cnneux0b7fYRUds2eM+dIu6vnN/BS8NQAsiu6 bc5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=CXjIIeug; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go39-20020a1709070da700b0077cfdda438csi18017917ejc.35.2022.12.29.05.01.19; Thu, 29 Dec 2022 05:01:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=CXjIIeug; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233205AbiL2MsJ (ORCPT + 62 others); Thu, 29 Dec 2022 07:48:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233404AbiL2Mrz (ORCPT ); Thu, 29 Dec 2022 07:47:55 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BDF363E9 for ; Thu, 29 Dec 2022 04:47:54 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 2396E1EC01CE; Thu, 29 Dec 2022 13:47:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1672318073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=1KcR7E77mv9elx5G9X9IlsW0Rh4iCO+tG818qQo64N4=; b=CXjIIeugIvcObmtb7Y1VmnUNOHDXpJU3ucwjMO1ozxW9lHCawJh7MurU1zO23IZx13C8rl t28rQjH2rqLXjinYGlHeFAyAlnl32bEKMf8id/Vv/FcMml3qru7Xkv397ijHGtsGftOLd0 oHU55jRihKJJFoKwMmQ7wQOvWd2qkqA= Date: Thu, 29 Dec 2022 13:47:49 +0100 From: Borislav Petkov To: "H. Peter Anvin" Cc: "Jason A. Donenfeld" , pbonzini@redhat.com, ebiggers@kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, ardb@kernel.org, kraxel@redhat.com, philmd@linaro.org Subject: Re: [PATCH qemu] x86: don't let decompressed kernel image clobber setup_data Message-ID: References: <20221228143831.396245-1-Jason@zx2c4.com> <6cab26b5-06ae-468d-ac79-ecdecb86ef07@linaro.org> <9188EEE9-2759-4389-B39E-0FEBBA3FA57D@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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