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 <mhaeu...@posteo.de> Cc: Pedro Falcato <pedro.falc...@gmail.com> Cc: Vitaly Cheptsov <vit9...@protonmail.com> Fixes: e55f0527dde48a5f139c1b8f35acc4e6b59dd794 Signed-off-by: Savva Mitrofanov <savva...@gmail.com> --- Features/Ext4Pkg/Ext4Dxe/Directory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Features/Ext4Pkg/Ext4Dxe/Directory.c b/Features/Ext4Pkg/Ext4Dxe/Directory.c index ff476c8641e8..efdce1477246 100644 --- a/Features/Ext4Pkg/Ext4Dxe/Directory.c +++ b/Features/Ext4Pkg/Ext4Dxe/Directory.c @@ -260,7 +260,8 @@ Ext4OpenDirent ( } else { File->Dentry = Ext4CreateDentry (FileName, Directory->Dentry); - if (!File->Dentry) { + if (File->Dentry == NULL) { + Status = EFI_OUT_OF_RESOURCES; goto Error; } } -- 2.38.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#97271): https://edk2.groups.io/g/devel/message/97271 Mute This Topic: https://groups.io/mt/95622340/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-