From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.10277.1593501867582751430 for ; Tue, 30 Jun 2020 00:24:27 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: guomin.jiang@intel.com) IronPort-SDR: V9WENj+g6+wfRZGhheL2TWpxaPCOvDtT30172HHM150fCS3YdfJO/eB2vQ4wlamYbkHEm+Uqy5 g4HgWpGZHPig== X-IronPort-AV: E=McAfee;i="6000,8403,9666"; a="126292038" X-IronPort-AV: E=Sophos;i="5.75,296,1589266800"; d="scan'208";a="126292038" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 00:24:26 -0700 IronPort-SDR: DBMfUwgSBvBdvOagdUlVldLStkwA2qRwD3rJnUBcSeN4drkDW4uZMUGEsdic7n6zWnTUts3+XJ SoZ9tqnEG5DA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,296,1589266800"; d="scan'208";a="320853957" Received: from guominji-mobl.ccr.corp.intel.com ([10.238.4.95]) by FMSMGA003.fm.intel.com with ESMTP; 30 Jun 2020 00:24:23 -0700 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Dandan Bi , Liming Gao , Debkumar De , Harry Han , Catharine West , Eric Dong , Ray Ni , Laszlo Ersek , Rahul Kumar , Jiewen Yao , Chao Zhang , Qi Zhang Subject: [PATCH 0/6] Migrate Pointer from flash to permanent memory (CVE-2019-11098) Date: Tue, 30 Jun 2020 15:24:16 +0800 Message-Id: <20200630072422.753-1-guomin.jiang@intel.com> X-Mailer: git-send-email 2.25.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The TOCTOU vulnerability allow that the physical present person to replace the code with the normal BootGuard check and PCR0 value. The issue occur when BootGuard measure IBB and access flash code after NEM disable. the reason why we access the flash code is that we have some pointer to flash. To avoid this vulnerability, we need to convert those pointers, the patch series do this work and make sure that no code will access flash address. Cc: Jian J Wang Cc: Hao A Wu Cc: Dandan Bi Cc: Liming Gao Cc: Debkumar De Cc: Harry Han Cc: Catharine West Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Cc: Jiewen Yao Cc: Chao Zhang Cc: Qi Zhang Guomin Jiang (2): MdeModulePkg/Core: Create Migrated FV Info Hob for calculating hash (CVE-2019-11098) SecurityPkg/Tcg2Pei: Use Migrated FV Info Hob for calculating hash (CVE-2019-11098) Jian J Wang (1): MdeModulePkg/DxeIplPeim: Register for shadow on S3 shadowed boot (CVE-2019-11098) Michael Kubacki (3): MdeModulePkg/PeiCore: Enable T-RAM evacuation in PeiCore (CVE-2019-11098) UefiCpuPkg/CpuMpPei: Add GDT and IDT migration support (CVE-2019-11098) UefiCpuPkg/SecMigrationPei: Add initial PEIM (CVE-2019-11098) MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 3 + MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 2 +- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 417 ++++++++++++++++++ MdeModulePkg/Core/Pei/Image/Image.c | 115 +++++ MdeModulePkg/Core/Pei/Memory/MemoryServices.c | 82 ++++ MdeModulePkg/Core/Pei/PeiMain.h | 169 +++++++ MdeModulePkg/Core/Pei/PeiMain.inf | 2 + MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 16 + MdeModulePkg/Core/Pei/Ppi/Ppi.c | 287 ++++++++++++ MdeModulePkg/Include/Guid/MigratedFvInfo.h | 22 + MdeModulePkg/MdeModulePkg.dec | 3 + SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 31 +- SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf | 1 + UefiCpuPkg/CpuMpPei/CpuMpPei.c | 40 +- UefiCpuPkg/CpuMpPei/CpuMpPei.h | 13 + UefiCpuPkg/CpuMpPei/CpuPaging.c | 14 +- UefiCpuPkg/Include/Ppi/RepublishSecPpi.h | 54 +++ .../Ia32/ArchExceptionHandler.c | 4 +- .../SecPeiCpuException.c | 2 +- UefiCpuPkg/SecCore/SecCore.inf | 2 + UefiCpuPkg/SecCore/SecMain.c | 26 +- UefiCpuPkg/SecCore/SecMain.h | 1 + UefiCpuPkg/SecMigrationPei/SecMigrationPei.c | 372 ++++++++++++++++ UefiCpuPkg/SecMigrationPei/SecMigrationPei.h | 170 +++++++ .../SecMigrationPei/SecMigrationPei.inf | 64 +++ .../SecMigrationPei/SecMigrationPei.uni | 13 + UefiCpuPkg/UefiCpuPkg.dec | 4 + UefiCpuPkg/UefiCpuPkg.dsc | 1 + 28 files changed, 1916 insertions(+), 14 deletions(-) create mode 100644 MdeModulePkg/Include/Guid/MigratedFvInfo.h create mode 100644 UefiCpuPkg/Include/Ppi/RepublishSecPpi.h create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.c create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.h create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.inf create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.uni -- 2.25.1.windows.1