Message ID | 20250820140516.344113-4-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=1755698750; bh=5hwtrKnqTaYSw49EufhnqwZg/uqg1Iij+riaKXftzqE=; 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=UDxVxf+uX8iBsR1U8bOHpnPanmgwBFSk2SWxzE5mS+zlUl2gg/xV3/K6EfgrGmrw8 0hhODPXD0JI2mUTld0gOpM9qwan/1AcqeLLZLjSHWkHPINyyxpPg5SwWxg/PS2TaN3 AFjBFZvs8rSvgxTrjxY2n4gOvmHmi3+DpJKFkTtA9Ph8F7hHLyPuWAUK3LPE0psclB /x7oY2GSbdaeUAnCONpoJtxNtuboO0tIvHYzmW4H+uw/AYQB9Uya1zNmRuDHaTe/cM BVh6whmu/BefrmQlbMIZjxYGY0jUvbOF4QjI41aK7MqpV7d5G0wawB7exk/0yvwM1f QULIOoiuZrM3w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3669367419 for <u-boot-concept@u-boot.org>; Wed, 20 Aug 2025 08:05:50 -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 km_akPRXRu3C for <u-boot-concept@u-boot.org>; Wed, 20 Aug 2025 08:05:50 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755698750; bh=5hwtrKnqTaYSw49EufhnqwZg/uqg1Iij+riaKXftzqE=; 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=UDxVxf+uX8iBsR1U8bOHpnPanmgwBFSk2SWxzE5mS+zlUl2gg/xV3/K6EfgrGmrw8 0hhODPXD0JI2mUTld0gOpM9qwan/1AcqeLLZLjSHWkHPINyyxpPg5SwWxg/PS2TaN3 AFjBFZvs8rSvgxTrjxY2n4gOvmHmi3+DpJKFkTtA9Ph8F7hHLyPuWAUK3LPE0psclB /x7oY2GSbdaeUAnCONpoJtxNtuboO0tIvHYzmW4H+uw/AYQB9Uya1zNmRuDHaTe/cM BVh6whmu/BefrmQlbMIZjxYGY0jUvbOF4QjI41aK7MqpV7d5G0wawB7exk/0yvwM1f QULIOoiuZrM3w== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 23D19674C4 for <u-boot-concept@u-boot.org>; Wed, 20 Aug 2025 08:05:50 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755698747; bh=FOtJwANLHHMiTTkCj01bDr6dMfQ5LKMy/10+iLeYTuo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vrSxa9TsQKA9EBUXqA/Z16jBKOL9NW1dFlRfMq9fuDg55oLF1WoJwcV0SBzXw0HVB J9nSEht6NV5PW/F9HQ7DxU7A1I6kfG6pEDrp5SgVallJp7yeQL+aDt5MVFwRj5ZBdA 2OIf+sPIItfnzI2Nl/0FT4i1ary6+Zw12Xx+RNV1hguGVSlOvvZQd1huq5ClGq9rLc bh6YR8bkYsqFS7umuEj1MbuomvuaKhbxovsdAowMh4FItEUGDp/xRdZJWXIMAo205H tnqBDq64eumiUe6jYe8s6gwvKEkzPH9k9Tore+MwCWnLRvIPLkyPruef98VkcxnN+I WGQoQTaQhJUzQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9E25A67419; Wed, 20 Aug 2025 08:05:47 -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 OP2GuNsYWNdJ; Wed, 20 Aug 2025 08:05:47 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755698745; bh=Qk96kpuGak+evPtPWdEBnUX53Z2hgcGkBKAdIvNISOc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mAQzLbpv3Dy44oqBkKEZN4U+s597YbKZEi+g9rxlxqnYObaTvWahQ8c3CyGtDNYe/ 1IV9//8R7fB6blYRrMGCzBk9hADnwqWzLH3vmJTuNGhcf6cT9hj+Ee6CCOTDq9of4P jdvR6Fk3T0Jdb1c7DzngYEhrBT7V2xRFLLjB09PlGnxPdKg9+gYF9fVHfvPZcXNFfc Ttw7x6WIn4UIF5QdHiKiz74KXwAtlJHjwKC5wKNzZgHpGlhIb3X4yy3DWshiHoKQ0D n9ZDlhjhL94erqrzNs07098lhhUoV5/k7FYObYKH6jfbk9L7T0utQMiZ6JWZPch/ZJ Bspa+fNEMxs+g== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 55B72674FA; Wed, 20 Aug 2025 08:05:45 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 20 Aug 2025 08:05:11 -0600 Message-ID: <20250820140516.344113-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250820140516.344113-1-sjg@u-boot.org> References: <20250820140516.344113-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: EY7G6QBY4PUDDRFQ2FE25S624HDAADI7 X-Message-ID-Hash: EY7G6QBY4PUDDRFQ2FE25S624HDAADI7 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 3/4] 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/EY7G6QBY4PUDDRFQ2FE25S624HDAADI7/> 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, 2:05 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> --- 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);