Message ID | 20221128202741.4945-6-philmd@linaro.org |
---|---|
State | Accepted |
Commit | 86fdb0582c653a9824183679403a85f588260d62 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp3244823pvb; Mon, 28 Nov 2022 12:29:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf6xlXYXOB3+rx1BFrfV9mOJM0NXCxyQ+4ReloEvDK6+onJRfz+ypxau1hh6kUi/i0iE2UBO X-Received: by 2002:ac8:7318:0:b0:3a5:4544:a465 with SMTP id x24-20020ac87318000000b003a54544a465mr48681235qto.438.1669667344311; Mon, 28 Nov 2022 12:29:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669667344; cv=none; d=google.com; s=arc-20160816; b=a6Z6nwXeVz6zozanM/QtebTom7qdhZuGZkQaA7urFrzr4TPRl9WYYKkB5LeBwUUSuJ Q2dCMtIOC3n5dHx3aXsP2R4auovHvdznsLm1+GcGN9/2a1m7Fi/Ld3GS2+l4FvYA40UN GfL/qK1O1RzuqC6NYvJa3h0K3LLv8NpR7ymZnliF6/Gu8dw2/Ha6SV2bPC9M68e9doWI L8X6oNPrCJk16Maz0w70SASCfjmWdqB14hu6L12x4S4uMXywqY4IFRm8KeoJvI5xMyUY 1pm9phqWFP7QSEn/F9ok0c7LO6fOIsmNec1TUQPyHgd/k4jdmqS1t+fe78t5x/VSi1xE F66Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=C+Rx9RTkWkiWZS0xp8Eh57HAo/NYcsk9u6PhwzmEdp4=; b=P8zuKx/WBsYQdzvHpobXpsAYvWZTCteSuQmbTF0e/XcWkQTfW3ZddnJgKSF38szRse 3130aRIE0M29+bwAt6gOGgQLnKyB51G1rUatGOv+bPnMYTCo1Ij/C13awxKNsE043j0/ fZ43vBfXhwmupiCQ7ZHDuYcu+9tl7LhuBW3Jn0h9ZCYHqCux+UHb0UNnu5h5ZxW9lU8y ND9uq4Q4aPnpZHya4Y+5YZVCzf8loDE76kNqbz9YZuZZeHpXqWfJ7l3Z8gSRMmOHEubL rhylH/wJT/b1hXnAvD/A08lObyO0M4DD24KCFWpfPObcF6Ew9pVx721WDDKnQvSA3vEj gDpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dMuA+SrO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q3-20020a05620a0d8300b006fb7ad6bb8dsi8099476qkl.491.2022.11.28.12.29.04 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Nov 2022 12:29:04 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dMuA+SrO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1ozkje-0002oK-BH; Mon, 28 Nov 2022 15:28:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1ozkjc-0002o0-V2 for qemu-devel@nongnu.org; Mon, 28 Nov 2022 15:28:12 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1ozkjb-00029o-FI for qemu-devel@nongnu.org; Mon, 28 Nov 2022 15:28:12 -0500 Received: by mail-wr1-x429.google.com with SMTP id o5so9844910wrm.1 for <qemu-devel@nongnu.org>; Mon, 28 Nov 2022 12:28:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C+Rx9RTkWkiWZS0xp8Eh57HAo/NYcsk9u6PhwzmEdp4=; b=dMuA+SrOwN77OKI3dKOXW5y/5s0XfUry+lCT+/hnGRHSjV/Fa3IGQ+tF7FEdZUX5lw I3UjUALNmeFLtH9QoaSFaV2cyZriddRil8H19gCKrlgDlPDeAlKJB0PqYx3z3AjlCgfR dYqsAVHWS7PnTsgVMPrVDeoFc9hLRjrCHR0yry5ybPUKGiVIFkrqAsYVv0UH8CNt5++z n0lpd4dbQTHEq7Z37Q6ufSL07Bu3bW2m+BPuj3UkOh6/Mx4LYXN1D9hr5eu3fC8k43I2 K9yuekvFxeFOlZKGVQNF/5Up44oC3BlHrUpeNaf/kPxLrmnbQZihinXXXsX9EHqpLyVb Ko/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C+Rx9RTkWkiWZS0xp8Eh57HAo/NYcsk9u6PhwzmEdp4=; b=FTmMKGKMsMo20k/9CypDNwxidAYNCT0JnPq8G2pGegWassGpOTvNCBfKtjvL/vzyXs UgurQhO6CfVxcLXu49g2W2HUOtA1rmQyn4TdnpGjGgjTjxJwAnCR4xDBm+iKnEbea5W9 897Z2w7QlamKeEpr1hjTALb8YjD6GXuoTp085lS2H+ngFD/9lGfZyLeWPxzCRqtSxVfS r309tnhfHpffxJBrFEDyNJ55VeULZhAByVRul4bDfpa4/j9GEe9Tih9x3DwB3dZhpIwr U+GnJwX1Iwr2HbsmFgkYcciJxccsRSsSViwWJhuf9AuMtdbgXrilCbQe/B1E6vmqyxCx z3Zg== X-Gm-Message-State: ANoB5pmTt0JlxGLXAJ843C2nLMlfcIHjyDLfj1hEok02MLnL7GR+G4bC 8flmwYGgcvOMLm1j4CUdgdpGsZgN3/ScXA== X-Received: by 2002:adf:fc48:0:b0:236:e0d:9ad with SMTP id e8-20020adffc48000000b002360e0d09admr22492175wrs.692.1669667289041; Mon, 28 Nov 2022 12:28:09 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id h3-20020a05600c2ca300b003cff309807esm20335003wmc.23.2022.11.28.12.28.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 28 Nov 2022 12:28:08 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com> Cc: Alexander Bulekov <alxndr@bu.edu>, Paolo Bonzini <pbonzini@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Mauro Matteo Cascella <mcascell@redhat.com>, =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= <philmd@linaro.org> Subject: [PATCH-for-8.0 v3 5/5] hw/display/qxl: Assert memory slot fits in preallocated MemoryRegion Date: Mon, 28 Nov 2022 21:27:41 +0100 Message-Id: <20221128202741.4945-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221128202741.4945-1-philmd@linaro.org> References: <20221128202741.4945-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
hw/display/qxl: Avoid buffer overrun in qxl_phys2virt()
|
expand
|
diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 0b21626aad..6772849dec 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -1384,6 +1384,7 @@ static int qxl_add_memslot(PCIQXLDevice *d, uint32_t slot_id, uint64_t delta, qxl_set_guest_bug(d, "%s: pci_region = %d", __func__, pci_region); return 1; } + assert(guest_end - pci_start <= memory_region_size(mr)); virt_start = (intptr_t)memory_region_get_ram_ptr(mr); memslot.slot_id = slot_id;
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/display/qxl.c | 1 + 1 file changed, 1 insertion(+)