From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id CE83E7803CE for ; Mon, 30 Oct 2023 07:49:26 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=98l1hH2GytOzN00iytwzGsH3uTuK7znLdm8UmENHepU=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1698652165; v=1; b=Oat3em9m7QPV4yCVfbSGK7RMeTa071ztewOH2HGwfutkK5440nEC5VtWHNZQ4dYX1WsBqiMm 13TsOQyyltzYFTYbUHWC8ygLVz5x/txygw8JUdpLGaGEtaJyOE/wTZaG5kQEatnmCqIQuIK8H7N fDeZ6fQ0GrsIY4sF5WPGJSSA= X-Received: by 127.0.0.2 with SMTP id 1bxxYY7687511xD3LmYgDe6P; Mon, 30 Oct 2023 00:49:25 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.143793.1698652164261209974 for ; Mon, 30 Oct 2023 00:49:24 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10878"; a="419138567" X-IronPort-AV: E=Sophos;i="6.03,263,1694761200"; d="scan'208";a="419138567" X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2023 00:49:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10878"; a="736666718" X-IronPort-AV: E=Sophos;i="6.03,263,1694761200"; d="scan'208";a="736666718" X-Received: from shpfwdbuild003.ccr.corp.intel.com ([10.239.56.82]) by orsmga006.jf.intel.com with ESMTP; 30 Oct 2023 00:49:21 -0700 From: "Xu, Wei6" To: devel@edk2.groups.io Cc: Wei6 Xu , Laszlo Ersek , Ard Biesheuvel , Sami Mujawar , Ray Ni Subject: [edk2-devel] [PATCH v3 0/4] StandaloneMmCore finds drivers in uncompressed inner fv. Date: Mon, 30 Oct 2023 15:49:14 +0800 Message-Id: MIME-Version: 1.0 Precedence: Bulk 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,wei6.xu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 2K0ScCvxdBzQREJrD6pB1YU9x7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=Oat3em9m; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io V1: This patch is to fix the issue that StandaloneMmCore fails to detect uncompressed inner FV. PR: https://github.com/tianocore/edk2/pull/4943 V2: Based on V1, fix some other issues 1. Add Missing object size checks before casting pointers to header types a. InnerFvHeader = (EFI_FIRMWARE_VOLUME_HEADER *)SectionData; This is introduced in V1, add the size check on SectionDataSize against EFI_FIRMWARE_VOLUME_HEADER b. Section = (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1); Use FfsFindSection instead of FfsFindSectionData to avoid pointer casting. 2. Fix potential memory leak issue that ScratchBuffer is not freed when page allocation for DstBuffer fails. PR: https://github.com/tianocore/edk2/pull/4965 V3: 1. Separate patch per individual issue fix on patch V2. 2. Fix one more issue: Limit FwVol encapsulation section recursion in MmCoreFfsFindMmDriver(). PR: https://github.com/tianocore/edk2/pull/4975 Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Sami Mujawar Cc: Ray Ni Wei6 Xu (4): StandaloneMmPkg/Core: Limit FwVol encapsulation section recursion StandaloneMmPkg/Core: Fix potential memory leak issue StandaloneMmPkg/Core: Fix issue that section address might be wrong StandaloneMmPkg/Core: Fix the failure to find uncompressed inner FV StandaloneMmPkg/Core/FwVol.c | 50 ++++++++++++++++++----- StandaloneMmPkg/Core/StandaloneMmCore.c | 5 ++- StandaloneMmPkg/Core/StandaloneMmCore.inf | 3 ++ StandaloneMmPkg/StandaloneMmPkg.dec | 5 +++ 4 files changed, 51 insertions(+), 12 deletions(-) -- 2.29.2.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110296): https://edk2.groups.io/g/devel/message/110296 Mute This Topic: https://groups.io/mt/102270545/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-