From nobody Fri Sep 20 22:16:12 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+75120+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+75120+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=posteo.net ARC-Seal: i=1; a=rsa-sha256; t=1620994653; cv=none; d=zohomail.com; s=zohoarc; b=ivy5Yccsi3dy8Ue3mXm6gCtNToV176fac/2wa/injLF9EJyJqEpPv5vNHAu+zNQtpQqHnEDFN14uooXi0H83xa95wJjeRAuPV/2Qr01V1DV/RwRY1bG0L79BCi9RuBw1uawpZbNdNB9GC/qbqnbjdnCwtFXKXOMEW8D0LE6XQm8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620994653; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=W1Dl0CrJ0HHSN+ps/nsxmUbrUAdttK5jffxCz8+bZXk=; b=fApPGjmbwgvPES6g9gCGRHlImYSpNW5RFhCDFjtIqZDqVg8qdfujux56yVBFKVamcwwN4BwhhLCAX2eZszxKmBDD3iLb8+paXdld6PvHE9MxKZ560jpoBIktiDnpQe0sE+NWWJb7JE2FoGYPGLxoL/2DeFl5/DwOK8s4vN4Jn/8= 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+75120+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1620994653862782.3546312166964; Fri, 14 May 2021 05:17:33 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id BKDoYY1788612xxh3l0yH1JW; Fri, 14 May 2021 05:17:33 -0700 X-Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by mx.groups.io with SMTP id smtpd.web11.7867.1620994651919904010 for ; Fri, 14 May 2021 05:17:32 -0700 X-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 037D62400FD for ; Fri, 14 May 2021 14:17:29 +0200 (CEST) X-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FhSG02JNRz9rxR; Fri, 14 May 2021 14:17:28 +0200 (CEST) From: "Sergei Dmitrouk" To: devel@edk2.groups.io Cc: Ray Ni , Zhichao Gao Subject: [edk2-devel] [PATCH v1 1/3] ShellPkg/HttpDynamicCommand: Fix possible uninitialized use Date: Fri, 14 May 2021 12:17:12 +0000 Message-Id: <20210514121714.17312-2-sergei@posteo.net> In-Reply-To: <20210514121714.17312-1-sergei@posteo.net> References: <20210514121714.17312-1-sergei@posteo.net> 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,sergei@posteo.net X-Gm-Message-State: ehL4PSjRG5ZCq4Ivsvwzn73Ax1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1620994653; bh=j83Gi05Vy9XiA+i9l2P5w19AyFqvVgctpknO397LY0E=; h=Cc:Date:From:Reply-To:Subject:To; b=FIMFn0Uw90CD0pHOjKoq3JD/MCzdPALXvz/IrnVIUNaZjMDqYfXEwp1qOUQoXjezlUZ JYCvM8VcPsB+9EuqDwHV3e9X4Bjel4Qrokm+z64KKff2rRWIw/g0e5MBgVMROG0yRpZZG OoEwWsxj14P4r3RRd73FPknIPLg3/RO51y8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" `Status` can be used uninitialized: /* Evaluates to FALSE */ if (ShellGetExecutionBreakFlag ()) { Status =3D EFI_ABORTED; break; } /* Evaluates to FALSE */ if (!Context->ContentDownloaded && !Context->ResponseToken.Event) { Status =3D ...; ASSERT_EFI_ERROR (Status); } else { ResponseMessage.Data.Response =3D NULL; } /* UNINITIALIZED USE */ if (EFI_ERROR (Status)) { break; } Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Sergei Dmitrouk --- ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c b/ShellPkg/D= ynamicCommand/HttpDynamicCommand/Http.c index 3735a4a7e645..7b9b2d238015 100644 --- a/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c +++ b/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c @@ -1524,6 +1524,7 @@ GetResponse ( Context->ResponseToken.Message =3D &ResponseMessage; Context->ContentLength =3D 0; Context->Status =3D REQ_OK; + Status =3D EFI_SUCCESS; MsgParser =3D NULL; ResponseData.StatusCode =3D HTTP_STATUS_UNSUPPORTED_STATUS; ResponseMessage.Data.Response =3D &ResponseData; --=20 2.17.6 -=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 (#75120): https://edk2.groups.io/g/devel/message/75120 Mute This Topic: https://groups.io/mt/82822575/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- From nobody Fri Sep 20 22:16:12 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+75118+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+75118+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=posteo.net ARC-Seal: i=1; a=rsa-sha256; t=1620994658; cv=none; d=zohomail.com; s=zohoarc; b=DHQX0iYjfCNjqZcOQ6B+zP6u/3qA/GH+hYpobUx1rmLnrxw9QecMQz97uKm5EcH/vCo1yHbZQmUWKG+eXUOy+6Jb0GsDd7pHMsFAGZEHRADy93CZp1zdDcYnVddhbKWgt34t4YBcJQTULOx5pPEVGG0r/sMoobSHUgLT+IdXaX0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620994658; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=B+beRxKNnV2VcMPG+L4iLGY7zoiWS+cT7zdIr/mQOPo=; b=jiTjCt5JAEWJTOQLIwpGyQs/Q5wXmfjNrH5rDe6w0dPmRKNtk6wgTRdooVdTX4gfXCtZRW/X/A+JwHD74y1T6np5n/IBVeIT+fA0zbKBMd4r+B7bCJLrRjD78IFCMxuD0YGiQwFOytxqldcP/6WlG6dSDpdXraR5NzQYbvs5v/g= 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+75118+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1620994658761954.2909254656812; Fri, 14 May 2021 05:17:38 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id WW7cYY1788612x8TKDKexsW8; Fri, 14 May 2021 05:17:38 -0700 X-Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by mx.groups.io with SMTP id smtpd.web08.7854.1620994651596367325 for ; Fri, 14 May 2021 05:17:32 -0700 X-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id DE2BA240028 for ; Fri, 14 May 2021 14:17:29 +0200 (CEST) X-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FhSG06mB7z9rxb; Fri, 14 May 2021 14:17:28 +0200 (CEST) From: "Sergei Dmitrouk" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Ray Ni Subject: [edk2-devel] [PATCH v1 2/3] MdeModulePkg/PciBusDxe: Fix possible uninitialized use Date: Fri, 14 May 2021 12:17:13 +0000 Message-Id: <20210514121714.17312-3-sergei@posteo.net> In-Reply-To: <20210514121714.17312-1-sergei@posteo.net> References: <20210514121714.17312-1-sergei@posteo.net> 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,sergei@posteo.net X-Gm-Message-State: SDVPAWkldKxF0a7nyCXbEJsCx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1620994658; bh=FaVoQjqlU/b/iHCXeCXcfGCUwRTVi1e2TQK6CtCHXUM=; h=Cc:Date:From:Reply-To:Subject:To; b=cPIxh+x2O6mnyhdvbRuKspbWIi/xOAISWoOfHSiom9i9mBH4hW8sLAYqb38u6UpAgPd fmRxkHG3FS+uz82ZetamxBymMMtwCHHqX9oHObDrA/5gziwJetLb6G9Uk8q75a7wf6kP1 rTzE5KLnG5VsvPPtTuUQv62VKDz+G1wWNG8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" If the function gets invalid value for the `ResizableBarOp` parameter and asserts are disabled, `Bit` can be used uninitialized. Cc: Jian J Wang Cc: Hao A Wu Cc: Ray Ni Signed-off-by: Sergei Dmitrouk Reviewed-by: Hao A Wu --- MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c b/MdeModulePkg/Bus/Pci= /PciBusDxe/PciLib.c index 6bba28367165..de601713a53b 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c @@ -1781,6 +1781,11 @@ PciProgramResizableBar ( } else if (ResizableBarOp =3D=3D PciResizableBarMin) { Bit =3D LowBitSet64(Capabilities); } else { + // + // Set Bit to avoid uninitialized use when built without assertions. + // + Bit =3D 0; + ASSERT ((ResizableBarOp =3D=3D PciResizableBarMax) || (ResizableBarO= p =3D=3D PciResizableBarMin)); } =20 --=20 2.17.6 -=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 (#75118): https://edk2.groups.io/g/devel/message/75118 Mute This Topic: https://groups.io/mt/82822573/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- From nobody Fri Sep 20 22:16:12 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+75119+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+75119+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=posteo.net ARC-Seal: i=1; a=rsa-sha256; t=1620994653; cv=none; d=zohomail.com; s=zohoarc; b=lcRIafWtOs7dlgtqf9Nf/ggpaLZK7N6x1G+8uvyZoIxnDpvC59v8NFGKl5d/A7Wcw1K8AVaGMJl44XHxzIEjUtxR1vzTqa2DyDtzNbqrLDvRmTIEYFwzit6ErZiEy/5G/y+LFB6EJH2EeavO5akmRdc9cxA4fpXRtts+c/kY/r0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620994653; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=+VHGqnEmXIjY0aXEXdWwLBm/Kpro1SPxFR8JhfPeu14=; b=IeO/e3ate1s4lZcXj2Iqqi38Tw4SVHaUvOs+Ef3T060npK9pFeVaWUNOuvWRL9ZMboozghnHJg7tLlZ3jJ+18ISXs14IYTPQPNFuOb/3VieLgm9I5l3qlz1o+DHWBqqrLetiaNqrPW3TpnkjkAwE89gZ9+km3KEWhWgZJn36rKo= 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+75119+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1620994653416298.8584861876566; Fri, 14 May 2021 05:17:33 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 93l3YY1788612xOP1L7Wef98; Fri, 14 May 2021 05:17:32 -0700 X-Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by mx.groups.io with SMTP id smtpd.web12.7983.1620994651978478480 for ; Fri, 14 May 2021 05:17:32 -0700 X-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 6F1F024002B for ; Fri, 14 May 2021 14:17:30 +0200 (CEST) X-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FhSG14BcKz9rxS; Fri, 14 May 2021 14:17:29 +0200 (CEST) From: "Sergei Dmitrouk" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Xiaoyu Lu , Guomin Jiang Subject: [edk2-devel] [PATCH v1 3/3] CryptoPkg/BaseCryptLib: Fix possible uninitialized use Date: Fri, 14 May 2021 12:17:14 +0000 Message-Id: <20210514121714.17312-4-sergei@posteo.net> In-Reply-To: <20210514121714.17312-1-sergei@posteo.net> References: <20210514121714.17312-1-sergei@posteo.net> 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,sergei@posteo.net X-Gm-Message-State: wqQD3xr1OLiC4MHGS7EZTY6Mx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1620994652; bh=PRRVbc4oc4EZKnOx/G+kDjDU8SuixsKUPBCCtz827OI=; h=Cc:Date:From:Reply-To:Subject:To; b=PSTs5+Liun5Su4FAMSFTn1/rc5/1AILlA9uB673QJionVcEkL4iL09GXvrZbMphf3zZ 4xcE5sd5qlAp3CGrMsJPwmGQwrLvUPNPw3tB9tnev6b71HkmtRQS1wFql5hoOAsJzgf4t VJRzVQOJMZUkKSYfh4jW5xD+oUb6dyCJ7GA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" `Result` can be used uninitialized in both functions after following either first or second `goto` statement. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Sergei Dmitrouk Reviewed-by: Jiewen Yao --- CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPss.c | 1 + CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPssSign.c | 1 + 2 files changed, 2 insertions(+) diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPss.c b/CryptoPkg/Li= brary/BaseCryptLib/Pk/CryptRsaPss.c index 4009d37d5f91..0b2960f06c4c 100644 --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPss.c +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPss.c @@ -82,6 +82,7 @@ RsaPssVerify ( EVP_PKEY_CTX *KeyCtx; CONST EVP_MD *HashAlg; =20 + Result =3D FALSE; EvpRsaKey =3D NULL; EvpVerifyCtx =3D NULL; KeyCtx =3D NULL; diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPssSign.c b/CryptoPk= g/Library/BaseCryptLib/Pk/CryptRsaPssSign.c index b66b6f7296ad..ece765f9ae0a 100644 --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPssSign.c +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPssSign.c @@ -97,6 +97,7 @@ RsaPssSign ( EVP_PKEY_CTX *KeyCtx; CONST EVP_MD *HashAlg; =20 + Result =3D FALSE; EvpRsaKey =3D NULL; EvpVerifyCtx =3D NULL; KeyCtx =3D NULL; --=20 2.17.6 -=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 (#75119): https://edk2.groups.io/g/devel/message/75119 Mute This Topic: https://groups.io/mt/82822574/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-