From nobody Sat Feb 7 08:53:56 2026 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+99144+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+99144+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1674811797; cv=none; d=zohomail.com; s=zohoarc; b=LzD/jKbKj+YEGQj62MY1oraInXPRQTBDXXS8MEcB7rYuL7Oy6/lJHvBY0a5PPkIFzgoGaeKH3PGGBSKFD9cvFnP1AYTEz/JKmbos49iETZw4NGlKvtA/uVXOyQivx1505Ztn39xH0lDx6fKbQphb1XiElqjpJRggVLMhs9aI808= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674811797; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=i3xPSi0WnwVF5T264Q9kqkGtXEWH+Wy1GMFYsxLfhOU=; b=IFL3oSnpyziRjZEdPwI9GUQhNrEAkobkCNBobGnMi8JMaBsTz6eMATbAB3D3EFU4oiZyUc4uh59Rs+gJN00SaJfnE8ndFhlp5+9vEYLwsAeA37yNdn1piI/MRb0+5UhJHkCereUHzJx8Y0e/Ek3vWkSLc6kYxBDPsVaH8spdQms= 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+99144+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1674811797404314.90061681881514; Fri, 27 Jan 2023 01:29:57 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id ZQ32YY1788612xRizlJoOhMw; Fri, 27 Jan 2023 01:29:57 -0800 X-Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by mx.groups.io with SMTP id smtpd.web10.98479.1674811792817229856 for ; Fri, 27 Jan 2023 01:29:56 -0800 X-Received: by mail-lf1-f42.google.com with SMTP id bp15so7179379lfb.13 for ; Fri, 27 Jan 2023 01:29:56 -0800 (PST) X-Gm-Message-State: cMSdJOEiyZiOoSJuXB0CcLPXx1787277AA= X-Google-Smtp-Source: AMrXdXv8ELOlsrH1OrK5fe5CQqZ5KVR043XvI336ViCnX/GYc1dz+y5C2xPOU8yJm1wyGHb48RjWgw== X-Received: by 2002:ac2:434f:0:b0:4b5:9e70:ca6e with SMTP id o15-20020ac2434f000000b004b59e70ca6emr11076779lfl.17.1674811795517; Fri, 27 Jan 2023 01:29:55 -0800 (PST) X-Received: from localhost.localdomain ([176.62.67.29]) by smtp.gmail.com with ESMTPSA id t11-20020a056512068b00b004cc8196a308sm229071lfe.98.2023.01.27.01.29.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 27 Jan 2023 01:29:55 -0800 (PST) From: "Savva Mitrofanov" To: devel@edk2.groups.io Cc: =?UTF-8?q?Marvin=20H=C3=A4user?= , Pedro Falcato , Vitaly Cheptsov Subject: [edk2-devel] [edk2-platforms][PATCH v3 09/11] Ext4Pkg: Add missing exit Status in Ext4OpenDirent Date: Fri, 27 Jan 2023 15:29:43 +0600 Message-Id: <20230127092945.94389-10-savvamtr@gmail.com> In-Reply-To: <20230127092945.94389-1-savvamtr@gmail.com> References: <20230127092945.94389-1-savvamtr@gmail.com> MIME-Version: 1.0 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,savvamtr@gmail.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1674811797; bh=wSHL6SRH+JazKuasnnXpg8rCiuZ70HUHOUjEaavGMBg=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=MW8GATQ5+mNcEcfsLR3W+3CjQHDEjZlzvlrgy6smnc6O+VvQV4sEfkBp+D8QuLKOKDA AVmYgi+eZF5OniL7P+y32LV0H0xWhRhcv/CEud1PLFAvF5Ke9LzYxlP/XYfm59LYyyx4k /6U7/UIdvJAVtOPfrv21VrVx01W6mAtYQdM= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1674811798654100031 Content-Type: text/plain; charset="utf-8" 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=C3=A4user Cc: Pedro Falcato Cc: Vitaly Cheptsov Fixes: 21b1853880d5 ("Ext4Pkg: Add a directory entry tree.") Signed-off-by: Savva Mitrofanov Reviewed-by: Marvin H=C3=A4user Reviewed-by: Pedro Falcato --- Features/Ext4Pkg/Ext4Dxe/Directory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Features/Ext4Pkg/Ext4Dxe/Directory.c b/Features/Ext4Pkg/Ext4Dx= e/Directory.c index 2e9a58a7e329..0753a20b5377 100644 --- a/Features/Ext4Pkg/Ext4Dxe/Directory.c +++ b/Features/Ext4Pkg/Ext4Dxe/Directory.c @@ -267,7 +267,8 @@ Ext4OpenDirent ( } else { File->Dentry =3D Ext4CreateDentry (FileName, Directory->Dentry); =20 - if (!File->Dentry) { + if (File->Dentry =3D=3D NULL) { + Status =3D EFI_OUT_OF_RESOURCES; goto Error; } } --=20 2.39.0 -=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 (#99144): https://edk2.groups.io/g/devel/message/99144 Mute This Topic: https://groups.io/mt/96562697/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-