<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2-platforms.git/Features/Ext4Pkg, branch CodeCleanup</title>
<subtitle>EDK II sample platform branches and tags (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2-platforms.git/atom?h=CodeCleanup</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/atom?h=CodeCleanup'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/'/>
<updated>2023-12-03T23:36:16+00:00</updated>
<entry>
<title>Ext4Pkg: Fix CRC16 checksumming on block groups</title>
<updated>2023-12-03T23:36:16+00:00</updated>
<author>
<name>Pedro Falcato</name>
<email>pedro.falcato@gmail.com</email>
</author>
<published>2023-11-30T02:51:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=b95395ba400e2ab45c902a80a965380538670f6b'/>
<id>urn:sha1:b95395ba400e2ab45c902a80a965380538670f6b</id>
<content type='text'>
Old filesystems (around 2008 and older) do not use CRC32c
but rather CRC16-ANSI. Previously, the CalculateCrc16Ansi function was
broken and gave us wrong checksums. Adapt to the new interface.

And while we're at it, fix the checksum algorithm itself - the crc16
algorithm just skips over the bg_checksum, and does not checksum it.

This problem was found out-of-list when older ext4 filesystems
(that use crc16 checksums) failed to mount with "corruption".

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4609
Signed-off-by: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
Cc: Savva Mitrofanov &lt;savvamtr@gmail.com&gt;
Cc: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
Reviewed-by: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
</content>
</entry>
<entry>
<title>Ext4Pkg: Advertise CSUM_SEED as supported</title>
<updated>2023-05-09T16:47:54+00:00</updated>
<author>
<name>Pedro Falcato</name>
<email>pedro.falcato@gmail.com</email>
</author>
<published>2023-05-09T00:38:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=92479808e7227017cdfb19815605bb1fa877d19f'/>
<id>urn:sha1:92479808e7227017cdfb19815605bb1fa877d19f</id>
<content type='text'>
We had added support for CSUM_SEED but accidentally forgot to advertise
it in gSupportedIncompatFeat. This made it (erroneously) impossible to
mount CSUM_SEED filesystems.

Detected by attempting to mount a relatively new mkfs.ext4'd filesystem.

Cc: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
Signed-off-by: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
Reviewed-by: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
</content>
</entry>
<entry>
<title>Ext4Pkg: Improve extent node validation on the number of entries</title>
<updated>2023-05-09T16:47:48+00:00</updated>
<author>
<name>Pedro Falcato</name>
<email>pedro.falcato@gmail.com</email>
</author>
<published>2023-05-09T00:32:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=82f4b393e55488463741e1055671f70d1e527f60'/>
<id>urn:sha1:82f4b393e55488463741e1055671f70d1e527f60</id>
<content type='text'>
Improve the extent tree node validation by validating the number of
entries the node advertises against the theoretical max (derived from
the size of on-disk structs and the block size (or i_data, if inline
extents).

Previously, we did not validate the number of entries. This could be
exploited for out-of-bounds reads and crashes.

Cc: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
Fixes: d9ceedca6c8f ("Ext4Pkg: Add Ext4Dxe driver.")
Reported-by: Savva Mitrofanov &lt;savvamtr@gmail.com&gt;
Signed-off-by: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
Reviewed-by: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
</content>
</entry>
<entry>
<title>Ext4Pkg: Move unicode collation initialization to Start()</title>
<updated>2023-02-24T00:29:04+00:00</updated>
<author>
<name>Pedro Falcato</name>
<email>pedro.falcato@gmail.com</email>
</author>
<published>2023-02-17T19:46:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=54306d023e7d610d326d103852bc6a45c803012e'/>
<id>urn:sha1:54306d023e7d610d326d103852bc6a45c803012e</id>
<content type='text'>
There have been reports[1] of failures to boot due to unicode collation
protocols not being available at Ext4Dxe load time. Therefore, attempt
to initialize unicode collation at Start() time, like done previously in
FatPkg/EnhancedFatDxe. By doing so, we move collation initialization
to BDS, where the module responsible for protocol installation should
have already been loaded and ran.

[1]: https://edk2.groups.io/g/devel/message/100312

Cc: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Cc: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
Fixes: d9ceedca6c8f ("Ext4Pkg: Add Ext4Dxe driver.")
Signed-off-by: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Reviewed-by: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
</content>
</entry>
<entry>
<title>Ext4Pkg: Fix double-free in Ext4ReadSymlink</title>
<updated>2023-02-17T19:03:31+00:00</updated>
<author>
<name>Savva Mitrofanov</name>
<email>savvamtr@gmail.com</email>
</author>
<published>2023-02-16T18:09:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=81ec441723a0db032b3e22e1364a1b4b922beadf'/>
<id>urn:sha1:81ec441723a0db032b3e22e1364a1b4b922beadf</id>
<content type='text'>
The SymlinkTmp was deallocated unconditionally, so we shouldn't free it
again on EFI_ERROR

Cc: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
Cc: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
Cc: Vitaly Cheptsov &lt;vit9696@protonmail.com&gt;
Fixes: e81432fbacb7 ("Ext4Pkg: Add symbolic links support")
Signed-off-by: Savva Mitrofanov &lt;savvamtr@gmail.com&gt;
Reviewed-by: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
Reviewed-by: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
</content>
</entry>
<entry>
<title>Ext4Pkg: Correct memory leak in Ext4ReadSlowSymlink</title>
<updated>2023-02-08T16:25:02+00:00</updated>
<author>
<name>Savva Mitrofanov</name>
<email>savvamtr@gmail.com</email>
</author>
<published>2023-01-27T10:31:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=615afc82db9f3ff348dacf8a94d9bb588783964b'/>
<id>urn:sha1:615afc82db9f3ff348dacf8a94d9bb588783964b</id>
<content type='text'>
We need to free SymlinkTmp before exiting if SymlinkSizeTmp != ReadSize
condition is true.

Reported-by: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
Cc: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
Cc: Vitaly Cheptsov &lt;vit9696@protonmail.com&gt;
Fixes: e81432fbacb7 ("Ext4Pkg: Add symbolic links support")
Signed-off-by: Savva Mitrofanov &lt;savvamtr@gmail.com&gt;
Reviewed-by: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
Reviewed-by: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
</content>
</entry>
<entry>
<title>Ext4Pkg: Filter out directory entry names containing \0 as invalid</title>
<updated>2023-02-08T16:25:02+00:00</updated>
<author>
<name>Savva Mitrofanov</name>
<email>savvamtr@gmail.com</email>
</author>
<published>2023-01-27T07:20:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=0af4ed52a2e605761b4bcfdb3f10e5a8d9685931'/>
<id>urn:sha1:0af4ed52a2e605761b4bcfdb3f10e5a8d9685931</id>
<content type='text'>
The directory entry name conventions forbid having null-terminator
symbols in its body and can lead to undefined behavior conditions
and crashes

Cc: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
Cc: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
Cc: Vitaly Cheptsov &lt;vit9696@protonmail.com&gt;
Fixes: 89b2bb0db263 ("Ext4Pkg: Fix and clarify handling regarding non-utf8 dir entries")
Signed-off-by: Savva Mitrofanov &lt;savvamtr@gmail.com&gt;
Reviewed-by: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
Reviewed-by: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
</content>
</entry>
<entry>
<title>Ext4Pkg: Fix build on MSVC</title>
<updated>2023-02-08T16:24:11+00:00</updated>
<author>
<name>Savva Mitrofanov</name>
<email>savvamtr@gmail.com</email>
</author>
<published>2023-01-26T14:26:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=1a6ad23a4617e4e155529db37529b1ada408b67f'/>
<id>urn:sha1:1a6ad23a4617e4e155529db37529b1ada408b67f</id>
<content type='text'>
Accessing array using index of uint64 type makes MSVC compiler to
include `__allmul` function in NOOPT which is not referenced in IA32.
So we null-terminate the string using ReadSize, which should be equal to
SymlinkSizeTmp after correct reading. Also add missing MultU64x32
in Ext4Read.

Cc: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
Cc: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
Cc: Vitaly Cheptsov &lt;vit9696@protonmail.com&gt;
Fixes: 7c46116b0e18 ("Ext4Pkg: Add ext2/3 support")
Fixes: e81432fbacb7 ("Ext4Pkg: Add symbolic links support")
Signed-off-by: Savva Mitrofanov &lt;savvamtr@gmail.com&gt;
Reviewed-by: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
Reviewed-by: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
</content>
</entry>
<entry>
<title>Ext4Pkg: Add missing exit status in Ext4OpenDirent</title>
<updated>2023-02-08T16:23:58+00:00</updated>
<author>
<name>Savva Mitrofanov</name>
<email>savvamtr@gmail.com</email>
</author>
<published>2022-11-30T12:01:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=1f5c4f7cab506e800b13ecd1898bcc13df5d524d'/>
<id>urn:sha1:1f5c4f7cab506e800b13ecd1898bcc13df5d524d</id>
<content type='text'>
Missing EFI_OUT_OF_RESOURCES exit status on failed Ext4CreateDentry
leads to NULL-pointer dereference in Ext4GetFileInfo (passing NULL
buffer in Ext4ReadDir)

Cc: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
Cc: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
Cc: Vitaly Cheptsov &lt;vit9696@protonmail.com&gt;
Fixes: 21b1853880d5 ("Ext4Pkg: Add a directory entry tree.")
Signed-off-by: Savva Mitrofanov &lt;savvamtr@gmail.com&gt;
Reviewed-by: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
Reviewed-by: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
</content>
</entry>
<entry>
<title>Ext4Pkg: Check VolumeName allocation correctness in Ext4GetVolumeName</title>
<updated>2023-02-08T16:23:58+00:00</updated>
<author>
<name>Savva Mitrofanov</name>
<email>savvamtr@gmail.com</email>
</author>
<published>2022-11-30T12:56:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=dc30a6213115d15a58cb2a967f0df3f48704f890'/>
<id>urn:sha1:dc30a6213115d15a58cb2a967f0df3f48704f890</id>
<content type='text'>
Missing check in some cases leads to failed StrCpyS call in
Ext4GetVolumeLabelInfo. Also correct condition that checks Inode pointer
for being NULL in Ext4AllocateInode

Cc: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
Cc: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
Cc: Vitaly Cheptsov &lt;vit9696@protonmail.com&gt;
Fixes: cfbbae595eec ("Ext4Pkg: Add handling of EFI_FILE_SYSTEM_VOLUME_LABEL GetInfo().")
Signed-off-by: Savva Mitrofanov &lt;savvamtr@gmail.com&gt;
Reviewed-by: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
Reviewed-by: Marvin Häuser &lt;mhaeuser@posteo.de&gt;
</content>
</entry>
</feed>
