From: "Guomin Jiang" <guomin.jiang@intel.com>
To: devel@edk2.groups.io
Cc: Jian J Wang <jian.j.wang@intel.com>,
Hao A Wu <hao.a.wu@intel.com>, Dandan Bi <dandan.bi@intel.com>,
Liming Gao <liming.gao@intel.com>,
Debkumar De <debkumar.de@intel.com>,
Harry Han <harry.han@intel.com>,
Catharine West <catharine.west@intel.com>,
Eric Dong <eric.dong@intel.com>, Ray Ni <ray.ni@intel.com>,
Jordan Justen <jordan.l.justen@intel.com>,
Andrew Fish <afish@apple.com>, Laszlo Ersek <lersek@redhat.com>,
Ard Biesheuvel <ard.biesheuvel@arm.com>,
Anthony Perard <anthony.perard@citrix.com>,
Julien Grall <julien@xen.org>, Leif Lindholm <leif@nuviainc.com>,
Rahul Kumar <rahul1.kumar@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Chao Zhang <chao.b.zhang@intel.com>,
Qi Zhang <qi1.zhang@intel.com>
Subject: [PATCH v7 00/10] Add new feature that evacuate temporary to permanent memory (CVE-2019-11098)
Date: Wed, 22 Jul 2020 16:36:47 +0800 [thread overview]
Message-ID: <20200722083657.739-1-guomin.jiang@intel.com> (raw)
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.
v2:
Create gEdkiiMigratedFvInfoGuid HOB and add PcdMigrateTemporaryRamFirmwareVolumes to control whole feature.
v3:
Remove changes which is not related with the feature and disable the feature in virtual platform.
v4:
Disable the feature as default, Copy the Tcg2Pei behavior to TcgPei
v5:
Initialize local variable Shadow and return EFI_ABORTED when RepublishSecPpi not installed.
v6:
Avoid redundant shadow PEIM when enable Migrated PCD.
v7:
Change patch 10/10 to enhance the logic.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Debkumar De <debkumar.de@intel.com>
Cc: Harry Han <harry.han@intel.com>
Cc: Catharine West <catharine.west@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Julien Grall <julien@xen.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Qi Zhang <qi1.zhang@intel.com>
Guomin Jiang (7):
MdeModulePkg: Add new PCD to control the evacuate temporary memory
feature (CVE-2019-11098)
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)
UefiCpuPkg/CpuMpPei: Enable paging and set NP flag to avoid TOCTOU
(CVE-2019-11098)
UefiCpuPkg: Correct some typos.
SecurityPkg/TcgPei: Use Migrated FV Info Hob for calculating hash
(CVE-2019-11098)
MdeModulePkg/Core: Avoid redundant shadow when enable the Migrated PCD
(CVE-2019-11098)
Michael Kubacki (3):
MdeModulePkg/PeiCore: Enable T-RAM evacuation in PeiCore
(CVE-2019-11098)
UefiCpuPkg/CpuMpPei: Add GDT migration support (CVE-2019-11098)
UefiCpuPkg/SecMigrationPei: Add initial PEIM (CVE-2019-11098)
MdeModulePkg/MdeModulePkg.dec | 14 +
UefiCpuPkg/UefiCpuPkg.dec | 3 +
UefiCpuPkg/UefiCpuPkg.dsc | 1 +
MdeModulePkg/Core/Pei/PeiMain.inf | 3 +
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf | 1 +
SecurityPkg/Tcg/TcgPei/TcgPei.inf | 1 +
UefiCpuPkg/CpuMpPei/CpuMpPei.inf | 4 +
UefiCpuPkg/SecCore/SecCore.inf | 2 +
.../SecMigrationPei/SecMigrationPei.inf | 67 +++
MdeModulePkg/Core/Pei/PeiMain.h | 170 +++++++
MdeModulePkg/Include/Guid/MigratedFvInfo.h | 22 +
UefiCpuPkg/CpuMpPei/CpuMpPei.h | 14 +-
UefiCpuPkg/Include/Ppi/RepublishSecPpi.h | 54 +++
.../CpuExceptionCommon.h | 4 +-
UefiCpuPkg/SecCore/SecMain.h | 1 +
UefiCpuPkg/SecMigrationPei/SecMigrationPei.h | 158 +++++++
MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 434 +++++++++++++++++-
MdeModulePkg/Core/Pei/Image/Image.c | 122 ++++-
MdeModulePkg/Core/Pei/Memory/MemoryServices.c | 82 ++++
MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 42 +-
MdeModulePkg/Core/Pei/Ppi/Ppi.c | 287 ++++++++++++
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 31 +-
SecurityPkg/Tcg/TcgPei/TcgPei.c | 29 +-
UefiCpuPkg/CpuMpPei/CpuMpPei.c | 37 ++
UefiCpuPkg/CpuMpPei/CpuPaging.c | 42 +-
.../Ia32/ArchExceptionHandler.c | 4 +-
.../SecPeiCpuException.c | 2 +-
.../X64/ArchExceptionHandler.c | 4 +-
UefiCpuPkg/SecCore/SecMain.c | 26 +-
UefiCpuPkg/SecMigrationPei/SecMigrationPei.c | 385 ++++++++++++++++
MdeModulePkg/MdeModulePkg.uni | 6 +
.../SecMigrationPei/SecMigrationPei.uni | 13 +
32 files changed, 2037 insertions(+), 28 deletions(-)
create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.inf
create mode 100644 MdeModulePkg/Include/Guid/MigratedFvInfo.h
create mode 100644 UefiCpuPkg/Include/Ppi/RepublishSecPpi.h
create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.h
create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.c
create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.uni
--
2.25.1.windows.1
next reply other threads:[~2020-07-22 8:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-22 8:36 Guomin Jiang [this message]
2020-07-22 8:36 ` [PATCH v7 01/10] MdeModulePkg: Add new PCD to control the evacuate temporary memory feature (CVE-2019-11098) Guomin Jiang
2020-07-22 21:19 ` [edk2-devel] " Laszlo Ersek
2020-07-22 8:36 ` [PATCH v7 02/10] MdeModulePkg/PeiCore: Enable T-RAM evacuation in PeiCore (CVE-2019-11098) Guomin Jiang
2020-07-22 21:20 ` [edk2-devel] " Laszlo Ersek
2020-07-22 8:36 ` [PATCH v7 03/10] UefiCpuPkg/CpuMpPei: Add GDT migration support (CVE-2019-11098) Guomin Jiang
2020-07-22 21:21 ` [edk2-devel] " Laszlo Ersek
2020-07-22 8:36 ` [PATCH v7 04/10] UefiCpuPkg/SecMigrationPei: Add initial PEIM (CVE-2019-11098) Guomin Jiang
2020-07-22 16:21 ` [edk2-devel] " Wang, Jian J
2020-07-22 21:24 ` Laszlo Ersek
2020-07-22 8:36 ` [PATCH v7 05/10] MdeModulePkg/Core: Create Migrated FV Info Hob for calculating hash (CVE-2019-11098) Guomin Jiang
2020-07-22 21:25 ` [edk2-devel] " Laszlo Ersek
2020-07-22 8:36 ` [PATCH v7 06/10] SecurityPkg/Tcg2Pei: Use " Guomin Jiang
2020-07-22 8:36 ` [PATCH v7 07/10] UefiCpuPkg/CpuMpPei: Enable paging and set NP flag to avoid TOCTOU (CVE-2019-11098) Guomin Jiang
2020-07-22 21:29 ` [edk2-devel] " Laszlo Ersek
2020-07-22 8:36 ` [PATCH v7 08/10] UefiCpuPkg: Correct some typos Guomin Jiang
2020-07-22 21:30 ` [edk2-devel] " Laszlo Ersek
2020-07-22 8:36 ` [PATCH v7 09/10] SecurityPkg/TcgPei: Use Migrated FV Info Hob for calculating hash (CVE-2019-11098) Guomin Jiang
2020-07-22 8:36 ` [PATCH v7 10/10] MdeModulePkg/Core: Avoid redundant shadow when enable the Migrated PCD (CVE-2019-11098) Guomin Jiang
2020-07-22 22:53 ` [edk2-devel] " Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200722083657.739-1-guomin.jiang@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox