From nobody Mon Feb 9 07:55:44 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+97271+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+97271+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1670856433; cv=none; d=zohomail.com; s=zohoarc; b=Gv2si/H5yIBQtjir4OPS6k26LAzQdQTVFy1OAd9e2y4R2De4ZxzVjH84Upg4mtR7wY076klDlHoxKJHs4c9ErI1tYvsddHD06x00R1uHm4eJgd+0mbMWzkmDtDdKIdUrlyDQ2MN0LAFgF/yeH7VKPQx4Y8jlMvK3x7roz9OHjxQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670856433; 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=VeqybtWvgbJTaf+iKYNuKXs+J8WwLpltmTjdzu8qupY=; b=cIvZyMcH6IIAlpUVnDnrtTXkwnbfJhvysaRih9o0lpSnU6LgWut/FeP8et8P6wKgwy8YpJiByZUefjiuTOV2w34jxETc1Fnsx7r8Mn+ChrFtjkl5esqrkxlF5YvwLuOnzZFQAcGVadJoEXTuqU/pkLaTQJkdusG/hiJCOU93CMY= 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+97271+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 1670856433090996.6481439488773; Mon, 12 Dec 2022 06:47:13 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id X448YY1788612xyLOiIAd1kZ; Mon, 12 Dec 2022 06:47:12 -0800 X-Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by mx.groups.io with SMTP id smtpd.web11.44999.1670856421448535571 for ; Mon, 12 Dec 2022 06:47:11 -0800 X-Received: by mail-lf1-f46.google.com with SMTP id y25so18966017lfa.9 for ; Mon, 12 Dec 2022 06:47:10 -0800 (PST) X-Gm-Message-State: 0wH82se97uuK18jTBkD3NG8sx1787277AA= X-Google-Smtp-Source: AA0mqf67FybjucBZ0nSSIZNNHYcB7DJua11FfbY9w/byUIg5mdXyGJnBevcVX1+P/TZHMmjnFj8B1w== X-Received: by 2002:ac2:4c24:0:b0:4b4:900c:3a28 with SMTP id u4-20020ac24c24000000b004b4900c3a28mr3968031lfq.60.1670856430183; Mon, 12 Dec 2022 06:47:10 -0800 (PST) X-Received: from localhost.localdomain ([77.221.215.144]) by smtp.gmail.com with ESMTPSA id t4-20020a056512030400b0049c29292250sm1643313lfp.149.2022.12.12.06.47.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 06:47:09 -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 v2 11/11] Ext4Pkg: Add missing exit Status in Ext4OpenDirent Date: Mon, 12 Dec 2022 20:46:54 +0600 Message-Id: <20221212144654.2650-12-savvamtr@gmail.com> In-Reply-To: <20221212144654.2650-1-savvamtr@gmail.com> References: <20221212144654.2650-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=1670856432; bh=9Y7AxquD+p6huiKm8/MtTGiTej3U7b11AD0KLMxzLY8=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=oekhLoVeDYc0rO4PRbq8X9IAKQUileuuwwpiu0grnwTxe1pTPH5eFX+RAaZ6RRqHV+h +iZybVF6Wb4Z7iyAMgvrUvaF6a3u5kDsHEln2E6GL/HCKMR2fOpoOzMWHpkOccnrT3L4P i0zIU+C7PBZppybsJqZmfak6Ru0cw8hd2nU= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1670856434293100043 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: e55f0527dde48a5f139c1b8f35acc4e6b59dd794 Signed-off-by: Savva Mitrofanov --- 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 ff476c8641e8..efdce1477246 100644 --- a/Features/Ext4Pkg/Ext4Dxe/Directory.c +++ b/Features/Ext4Pkg/Ext4Dxe/Directory.c @@ -260,7 +260,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.38.1 -=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 (#97271): https://edk2.groups.io/g/devel/message/97271 Mute This Topic: https://groups.io/mt/95622340/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-