From nobody Sun Feb 8 23:32:21 2026 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+78943+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+78943+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=posteo.de ARC-Seal: i=1; a=rsa-sha256; t=1628502723; cv=none; d=zohomail.com; s=zohoarc; b=Y8l1ee/K2bCcFFH0eJenvSpzcgPZw0ONjmqi0GeWKBvZcK3h0hV7i5/8oxfbRFHVTC5hZgiShNcz3NfxzAc6/ykAh0urZ0vfT0WNbWu70pYqCAnsyutgcuVYV7RaixLQW09eGdl6lyIVaIf0ghEdgqyqYQkPPwsfgUskRFIRuj8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628502723; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=OgfxWc1L6Y3O0CW+tEuXUcmiOLX2wyKfE1ekF1pcex0=; b=ItOamxJK9xTWQxTMw+1zv59/7fmwe6ucrY5vD/zt8fTXT43+m9KG+9ndBXqkjpIqMhAa/5z7U7Ewzgal+48G41y15iTctLbEkBaoQ4xE1MG/4lZjudMbLbB70y54CMnekfctQw435UQL5DRxa60Mhe921WEfbNuevjnFse/t2VI= 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+78943+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 1628502723494616.5962145851087; Mon, 9 Aug 2021 02:52:03 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id QMXqYY1788612xLu8tU42VgT; Mon, 09 Aug 2021 02:52:03 -0700 X-Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by mx.groups.io with SMTP id smtpd.web09.20691.1628502715450253867 for ; Mon, 09 Aug 2021 02:51:55 -0700 X-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 92355240106 for ; Mon, 9 Aug 2021 11:51:53 +0200 (CEST) X-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Gjrvs1B8zz6tmF; Mon, 9 Aug 2021 11:51:53 +0200 (CEST) From: =?UTF-8?B?TWFydmluIEjDpHVzZXI=?= To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Vitaly Cheptsov Subject: [edk2-devel] [PATCH v2 4/7] ArmPkg/DefaultExceptionHandlerLib: Check DebugImageInfoTable type safely Date: Mon, 9 Aug 2021 09:51:29 +0000 Message-Id: <961f3436a2b52a67aa6c8cd45c75c76835a3a5d8.1628502345.git.mhaeuser@posteo.de> In-Reply-To: References: 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: u3H4QfQS3aVOntojCb8xKa88x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1628502723; bh=yBk3ByHdfJ6M/lniVKzAZVqHw5yNV/lzyjoo2K3PVbI=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=DgsoW57xXmOkRzDeo338boEPWbKRukCJVHroCFEhE45wmqyg3svehMOLvcK0Yy0Q4lt tgCX4Vab2zwmjD3GJ1zVNSss2Y6BLZJe6w3a8CWWlAk3IlYhgFZCzycaDMSXdo+Ji6HaI IhSMXuZhiVEm5twBuZY/XEYfjeeCt+Mldfs= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1628502724926100049 Content-Type: text/plain; charset="utf-8" C does not allow casting to or dereferencing incompatible pointer types. Use the ImageInfoType member of the union first to determine the data type before dereferencing NormalImage. Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Vitaly Cheptsov Signed-off-by: Marvin H=C3=A4user --- ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c | = 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHand= lerUefi.c b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandl= erUefi.c index e9fea4038252..9befb6d4db9b 100644 --- a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi= .c +++ b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi= .c @@ -51,8 +51,8 @@ GetImageName ( =20 Address =3D (CHAR8 *)(UINTN)FaultAddress; for (Entry =3D 0; Entry < DebugTableHeader->TableSize; Entry++, DebugTab= le++) { - if (DebugTable->NormalImage !=3D NULL) { - if ((DebugTable->NormalImage->ImageInfoType =3D=3D EFI_DEBUG_IMAGE_I= NFO_TYPE_NORMAL) && + if (DebugTable->ImageInfoType !=3D NULL) { + if ((*DebugTable->ImageInfoType =3D=3D EFI_DEBUG_IMAGE_INFO_TYPE_NOR= MAL) && (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))) { --=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 (#78943): https://edk2.groups.io/g/devel/message/78943 Mute This Topic: https://groups.io/mt/84764906/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-