From nobody Mon Apr 29 08:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+78876+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+78876+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=posteo.de ARC-Seal: i=1; a=rsa-sha256; t=1628451634; cv=none; d=zohomail.com; s=zohoarc; b=axgLqboloIqcHbr+d9LPAHgsXO4mbb766j071Ze0yDliFpOibMs5a/tU9CNO963jT3wIyjaq+TZS6yZSblqGJ3AAioG8XKft+BXIJ9abjM4U7g26P68Go41iC5DIgGmdaWRXQX27IkC3u47KsL2eZQ+VZ69FMSp/LqzrzrwZSV0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628451634; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=Rb/+QYjgVxNMZNaEMDt0BN1G9wfHbp5P6Q+BnfLIIXQ=; b=IOa5yH2aHVXQS2DAJ/QlWljl86N0SfFJCqkRNY5UF0PCidfrwOR4qTaQMg2qbo6CsURY4k5wuOf9kSXU/aaejdyPjNvWTqnVNVPYUwVfBWBF8hA+fAL0fXEcbT8njm/UZB2kmyA7g+BF/iqghjqFq9+JtRA0ONpdUbhsGnkS7Lc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+78876+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 162845163378819.29816552265538; Sun, 8 Aug 2021 12:40:33 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id NTJfYY1788612xyOQbJ9zbA7; Sun, 08 Aug 2021 12:40:33 -0700 X-Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by mx.groups.io with SMTP id smtpd.web08.13629.1628451631600809464 for ; Sun, 08 Aug 2021 12:40:32 -0700 X-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 01DDC240027 for ; Sun, 8 Aug 2021 21:40:28 +0200 (CEST) X-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GjV1S0XCxz6tm6; Sun, 8 Aug 2021 21:40:27 +0200 (CEST) From: =?UTF-8?B?TWFydmluIEjDpHVzZXI=?= To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Vitaly Cheptsov Subject: [edk2-devel] [PATCH] ArmPkg/DefaultExceptionHandlerLib: Fix DebugImageInfoTable lookup Date: Sun, 8 Aug 2021 19:39:34 +0000 Message-Id: <5df11a13422732b9c03c120775a2b4dd0a49182f.1628444003.git.mhaeuser@posteo.de> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mhaeuser@posteo.de X-Gm-Message-State: 5nedOfVlnD9nqUS4andZdmCyx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1628451633; bh=ZZUr3kT4Z801p0mortk5PL0TIMgJLeFNgGcMFOPyFuM=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=Fwd/EiIP/1sB7BlhK7l2Khps1wXBcqaVJiblasSi52/Hr063FWPpSTG/35fJF36HR/K ICc4fz9GODg01PQM9UyOAMFpa10P9Ar7THF2YLhq5X8YAtxCw8nIo8GfZUcObG5e2cnHO 3B/7Q1zY2EBJ8jLEL/+pyu8f81RilO2D+ng= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1628451635431100001 Content-Type: text/plain; charset="utf-8" The sum of ImageBase + ImageSize yields the address of the first byte outside of the range of the image. Adjust the address comparison accordingly. Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Vitaly Cheptsov Signed-off-by: Marvin H=C3=A4user --- ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c | = 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHand= lerUefi.c b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandl= erUefi.c index e9fea4038252..a9b97cf7caf4 100644 --- a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi= .c +++ b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi= .c @@ -55,7 +55,7 @@ GetImageName ( if ((DebugTable->NormalImage->ImageInfoType =3D=3D EFI_DEBUG_IMAGE_I= NFO_TYPE_NORMAL) && (DebugTable->NormalImage->LoadedImageProtocolInstance !=3D NULL)= ) { if ((Address >=3D (CHAR8 *)DebugTable->NormalImage->LoadedImagePro= tocolInstance->ImageBase) && - (Address <=3D ((CHAR8 *)DebugTable->NormalImage->LoadedImagePr= otocolInstance->ImageBase + DebugTable->NormalImage->LoadedImageProtocolIns= tance->ImageSize))) { + (Address < ((CHAR8 *)DebugTable->NormalImage->LoadedImageProto= colInstance->ImageBase + DebugTable->NormalImage->LoadedImageProtocolInstan= ce->ImageSize))) { *ImageBase =3D (UINTN)DebugTable->NormalImage->LoadedImageProtoc= olInstance->ImageBase; *PeCoffSizeOfHeaders =3D PeCoffGetSizeOfHeaders ((VOID *)(UINTN)= *ImageBase); return PeCoffLoaderGetPdbPointer (DebugTable->NormalImage->Loade= dImageProtocolInstance->ImageBase); --=20 2.31.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#78876): https://edk2.groups.io/g/devel/message/78876 Mute This Topic: https://groups.io/mt/84754048/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-