Message ID | 20250820152223.1569324-5-sjg@u-boot.org |
---|---|
State | New |
Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755703358; bh=73moozkailM+KoGg509ItCU17CcxvHq27L3d968d2L4=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=UA2PTzBtgQScNNSasALkOdoqH3jsDFeRwKoDpUneDQvgYPr0pbDcKJ6ngLc5lCm4J 7C9WvK2Gx+3YxqpT9rrdOWMRAWVxaPbSuhQjgWjR3m8wXRxRY3jvQ7M23M9y9vsQvL Gs1LLlj/D6dltMLbSJnPZfRYIVhrj4j0aXN/Z7gDY/eSUPzdkHP8KZy+iYttgLZlDs xisXteXHVT7KWxJEBBParB0Pq28TPpunBiwChRTzC3SEUm2rgIz7Xr/wYI8Fax7fKw d/Y9R6eqVJ9sX4crKiHMJjm5BiywqCLouaOYDx4rGC8LrSyydAvOD5fRpsfNQWlc0C oEUDa8a6COTMQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1FCA067699 for <u-boot-concept@u-boot.org>; Wed, 20 Aug 2025 09:22:38 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id GtVxZtCIDIRO for <u-boot-concept@u-boot.org>; Wed, 20 Aug 2025 09:22:38 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755703356; bh=73moozkailM+KoGg509ItCU17CcxvHq27L3d968d2L4=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=GjrWmlnaccfu2ies9uyYi8pHnVDEG3nvhgKm4rSkPBYZc5Lj0qBUCo7wFG6S0tH2y cwhDogRp5HV/z/Kxc0XgjdeXu095S0MoXPtoD56aiGG9ZYQEf4HBehBxoWC9fdTZyX GQrFGxsUGKudT7zgnUhfhalF1BF+xdBnHu2kY53KhUOaNMuK0bcVkAh/uovMiodt9a PkPqW0kVgvSbq1hhG9MhSxDqUKg07amBbwJhjWWwvm+IgeD3G7OtzRE1PMXNEDlpHk m9Ljva6oUQeylT+dX+q+9ONt4camYCoF7KUrlGLwqBofbA6Jf7ucMZUJ9lRKc7KWtk uKsI8Tnbidp/w== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6C4F3676B3 for <u-boot-concept@u-boot.org>; Wed, 20 Aug 2025 09:22:36 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755703353; bh=EWOHdy+EJYFAOabfQD3PzWucrCqAW/z5eOom/WB29P0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SyYiDcby3dmFRlMgSEmfSGatSdDBkJmCKnRjTiefyfTxBfS8Ng5kYoHbz37Uz0llU QsAgHLpHoXvUsEd6jrdefLAyCfJYq8Y7QUoPOvloqR0jd/VjX45QSbmZHc+uNaktvj YeEyH7pLWJWbtRmdtRtuhrcnaxhsM2+kaic4TPeB8NXmqxXBD0eGCYg46RFacPZa2h UWKhsZjipp5LOHLn70xcCvprALk6jqG1eAC3J07M66Wpv8DR2UYXHK4/SK5k/wnSN5 /yzz2PevU6P67pPAH7XmgsILSI9QLsf37HdkegcW7O7hDiF60K/f/0KijARIrw0V/U oO1ahS0a2NBXA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 91FB86768B; Wed, 20 Aug 2025 09:22:33 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id ZiOVoo7XSlcf; Wed, 20 Aug 2025 09:22:33 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755703353; bh=HJMyP2P4ePFJfxjIvBgD9r0DaC2RxzE8lSUgrYwkXv0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aE1CwQEQYkS/COMDKBu/bIrXSPc7jhrIQdzJWDwFE9O4WbJVGlsz96ZUsqhkegq3/ PxtYgQPM4haoe6nw8FphMzTTMosyjS8AQiPwvJ12OXAHKPzee6fNkDuk4vUwk+Uc4r /OMEAJkwAy0xQ3H13ZMyhOzD7mvnPSFTekdz25hCZKrcDmbUgjbkW6HbETLD46Jcvl 9RMnDutYymV9B2STEtTNwoy5YglVB3g/ja0Pqiq3IxWDV2Wov2VO6dtSX/AnzbGvOk IlXtKlemxGCJly836JeawfZVdbp4fQ9PixX0sRi5tufNhhkqPupbduiFSjhh0Rs2er aT5Sncg22yb1g== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 18F996766B; Wed, 20 Aug 2025 09:22:33 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 20 Aug 2025 09:22:19 -0600 Message-ID: <20250820152223.1569324-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250820152223.1569324-1-sjg@u-boot.org> References: <20250820152223.1569324-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: C54U2RGALWF7F26Z4UEDQWTYK5VKKWNP X-Message-ID-Hash: C54U2RGALWF7F26Z4UEDQWTYK5VKKWNP X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH v2 4/5] acpi: Check ACPI revision before accessing XSDT List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/C54U2RGALWF7F26Z4UEDQWTYK5VKKWNP/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
Series |
ACPI fixes
|
|
Commit Message
Simon Glass
Aug. 20, 2025, 3:22 p.m. UTC
From: Simon Glass <sjg@chromium.org> This field is only present in revisions after zero, so add the missing check. This avoids a buffer overrun with a revision 1.0 ACPI table. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> --- (no changes since v1) lib/acpi/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/acpi/acpi.c b/lib/acpi/acpi.c index b13cba1a608..698d17a02e8 100644 --- a/lib/acpi/acpi.c +++ b/lib/acpi/acpi.c @@ -81,7 +81,7 @@ static int setup_search(struct acpi_rsdt **rsdtp, struct acpi_xsdt **xsdtp) return -ENOENT; if (!acpi_valid_rsdp(rsdp)) return -EINVAL; - if (rsdp->xsdt_address) { + if (rsdp->revision > 1 && rsdp->xsdt_address) { xsdt = nomap_sysmem(rsdp->xsdt_address, 0); len = xsdt->header.length - sizeof(xsdt->header); count = len / sizeof(u64);