<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdePkg/Library/BasePeCoffLib, branch dependabot/github_actions/github/codeql-action-4</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Fgithub%2Fcodeql-action-4</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Fgithub%2Fcodeql-action-4'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2025-09-25T22:04:10+00:00</updated>
<entry>
<title>MdePkg: Remove ARM32 Support from PE/COFF Libs</title>
<updated>2025-09-25T22:04:10+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2025-09-15T20:12:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=756fd38a801dff792d6e6a28399b6243db019e72'/>
<id>urn:sha1:756fd38a801dff792d6e6a28399b6243db019e72</id>
<content type='text'>
edk2 is dropping support for the ARM32 architecture. This
commit removes ARM32 code from the PE/COFF libs.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BasePeCoffLib: Remove DEBUG() statements from runtime code</title>
<updated>2025-01-29T18:42:13+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2025-01-28T23:09:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=3600675368581ba4987f5656c2783bab62750ee7'/>
<id>urn:sha1:3600675368581ba4987f5656c2783bab62750ee7</id>
<content type='text'>
PeCoffLoaderRelocateImageForRuntime() executes after boot services, and
so it should not use DEBUG() prints at all, given that these may rely on
MMIO mappings or other boot time facilities that are no longer
available.

So revert the changes in aedcaa3df8a2 ("MdePkg: Fix overflow issue in
PeCoffLoaderRelocateImageForRuntime") that replaced code comments with
DBEUG() statements.

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
<entry>
<title>MdePkg: Fix Clang Build Error</title>
<updated>2025-01-28T15:04:30+00:00</updated>
<author>
<name>INDIA\sachinganesh</name>
<email>sachinganesh@ami.com</email>
</author>
<published>2025-01-28T10:17:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=428cd8a46fb3bd8468183e2ac30bbbee2c25689b'/>
<id>urn:sha1:428cd8a46fb3bd8468183e2ac30bbbee2c25689b</id>
<content type='text'>
Fixed Clang build error introduced by unintialized variables in
https://github.com/tianocore/edk2/commit/6278bbb89822c598fcd0637ae74174e367895c84

Signed-off-by: Sachin Ganesh &lt;sachinganesh@ami.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Use SafeIntLib to handle overflow</title>
<updated>2025-01-26T17:15:56+00:00</updated>
<author>
<name>INDIA\sachinganesh</name>
<email>sachinganesh@ami.com</email>
</author>
<published>2025-01-23T13:05:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=6278bbb89822c598fcd0637ae74174e367895c84'/>
<id>urn:sha1:6278bbb89822c598fcd0637ae74174e367895c84</id>
<content type='text'>
Used SafeIntLib to handle the overflow check in
PeCoffLoaderRelocateImage

Signed-off-by: Sachin Ganesh &lt;sachinganesh@ami.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Fix overflow issue in PeCoffLoaderRelocateImageForRuntime</title>
<updated>2025-01-26T17:15:56+00:00</updated>
<author>
<name>INDIA\sachinganesh</name>
<email>sachinganesh@ami.com</email>
</author>
<published>2025-01-13T10:45:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=aedcaa3df8a246ef859c234ed5c243471c5be698'/>
<id>urn:sha1:aedcaa3df8a246ef859c234ed5c243471c5be698</id>
<content type='text'>
RelocDir-&gt;Size is a UINT32 value, and RelocDir-&gt;VirtualAddress is
also a UINT32 value. The current code in
PeCoffLoaderRelocateImageForRuntime does not check for overflow when
adding RelocDir-&gt;Size to RelocDir-&gt;VirtualAddress. This patch uses
SafeIntLib to ensure that the addition does not overflow.

Signed-off-by: Sachin Ganesh &lt;sachinganesh@ami.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Allows loading X64 and ARM64 OPROM images on LoongArch64</title>
<updated>2024-12-12T04:57:03+00:00</updated>
<author>
<name>Chao Li</name>
<email>lichao@loongson.cn</email>
</author>
<published>2024-12-10T11:23:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=03783393e16d776ca29d3f13b9cab1e1c3a5d11b'/>
<id>urn:sha1:03783393e16d776ca29d3f13b9cab1e1c3a5d11b</id>
<content type='text'>
Enable foreign images loading on LoongArch64 if the
EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL is present.

Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;
Signed-off-by: Chao Li &lt;lichao@loongson.cn&gt;
Co-Authored-by: Dongyan Qian &lt;qiandongyan@loongson.cn&gt;
</content>
</entry>
<entry>
<title>MdePkg: CodeQL Fixes.</title>
<updated>2024-11-01T04:30:39+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2024-07-31T23:10:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=b7735a087afce6a5157b61e5450b6848ed535a14'/>
<id>urn:sha1:b7735a087afce6a5157b61e5450b6848ed535a14</id>
<content type='text'>
Includes changes across the repo for the following CodeQL rules:
- cpp/comparison-with-wider-type
- cpp/overflow-buffer
- cpp/redundant-null-check-param
- cpp/uselesstest

Co-authored-by: Taylor Beebe &lt;tabeebe@microsoft.com&gt;
Co-authored-by: kenlautner &lt;85201046+kenlautner@users.noreply.github.com&gt;

Signed-off-by: Aaron Pop &lt;aaronpop@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Improving readability of CVE patch for PeCoffLoaderRelocateImage</title>
<updated>2024-10-02T19:45:12+00:00</updated>
<author>
<name>Doug Flick</name>
<email>dougflick@microsoft.com</email>
</author>
<published>2024-09-30T19:54:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e73ec569429ba72fbb6829518d6c192b4cd3346f'/>
<id>urn:sha1:e73ec569429ba72fbb6829518d6c192b4cd3346f</id>
<content type='text'>
This change adds parantheses to the if condition detecting overflow in
the PeCoffLoaderRelocateImage function to improve readability.

Follow on change for:
    REF!: https://github.com/tianocore/edk2/pull/6249

Signed-off-by: Doug Flick &lt;dougflick@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Fix overflow issue in BasePeCoffLib</title>
<updated>2024-09-30T18:12:30+00:00</updated>
<author>
<name>Doug Flick</name>
<email>dougflick@microsoft.com</email>
</author>
<published>2024-09-27T19:08:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c95233b8525ca6828921affd1496146cff262e65'/>
<id>urn:sha1:c95233b8525ca6828921affd1496146cff262e65</id>
<content type='text'>
The RelocDir-&gt;Size is a UINT32 value, and RelocDir-&gt;VirtualAddress is
also a UINT32 value. The current code does not check for overflow when
adding RelocDir-&gt;Size to RelocDir-&gt;VirtualAddress. This patch adds a
check to ensure that the addition does not overflow.

Signed-off-by: Doug Flick &lt;dougflick@microsoft.com&gt;
Authored-by: sriraamx gobichettipalayam &lt;sri..@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BasePeCoffLib: Deal with broken debug directories</title>
<updated>2023-05-05T08:11:22+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2023-05-04T14:40:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=94c802e108a082d6f74c854bea8bd98fe7808453'/>
<id>urn:sha1:94c802e108a082d6f74c854bea8bd98fe7808453</id>
<content type='text'>
Older versions of GenFw put the wrong value in the debug directory size
field in the PE/COFF header: instead of putting the combined size of all
the entries, it puts the size of the only entry it creates, but adds the
size of the NB10 payload that the entry points to. This confuses the
loader now that we started using additional debug directory entries to
describe DLL characteristics.

GenFw was fixed in commit 60e85a39fe49071, but the binaries that were
generated with it still need to be supported.

So let's detect this condition, and check whether the size of the debug
directory is consistent with the NB10 payload: if we should expect
additional directory entries where we observe the NB10 payload, the size
field is clearly wrong, and we can break from the loop.

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4425
Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Tested-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Acked-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
</feed>
