6 Commits

Author SHA1 Message Date
Savva Mitrofanov
d24fd429be
Ext4Pkg: Code correctness and security improvements
Applies latest upstream changes, which performs minor changes into
previous patchset

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-02-16 21:20:02 +06:00
Savva Mitrofanov
f335cf23f1
Revert "Ext4Pkg: Add comparison between Position and FileSize in Ext4SetPosition"
This reverts commit f21c8083753d667815d2719a9e7417dd4f1277c5.
We don't need to perform this check in SetPosition because by spec this
check done in read operation

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-01-13 12:57:46 +03:00
Savva Mitrofanov
b4077c6f4f
Ext4Pkg: Check VolumeName allocation correctness in Ext4GetVolumeName
Missing check in some cases leads to failed StrCpyS call in
Ext4GetVolumeLabelInfo. Also correct condition that checks Inode pointer
for being NULL in Ext4AllocateInode

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-08 22:07:10 +06:00
Savva Mitrofanov
8f4875d7b5
Ext4Pkg: Check that source file is directory in Ext4OpenInternal
This check already present in the while loop below, but absent for cases
when input file is nameless, so to handle assertion in Ext4ReadFile we
need to add it at the top of function

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-07 14:48:07 +06:00
Savva Mitrofanov
f21c808375
Ext4Pkg: Add comparison between Position and FileSize in Ext4SetPosition
Missing such comparison leads to infinite loop states, for example code
which trying to read entire file can easily get out of bound of
file size by passing position value which exceeds file size without this
check. So we need to add there missing comparison between the desired
position to be set and file size

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-07 14:48:03 +06:00
Savva Mitrofanov
03362e6d6f
Ext4Pkg: Add EDK II Ext4 package
Adds a Pedro Falcato's UEFI EXT4 filesystem driver that implements the EFI_FILE_PROTOCOL and EFI_SIMPLE_FILE_SYSTEM_PROTOCOL.

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-07 14:47:55 +06:00