From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web10.9111.1597124053529204379 for ; Mon, 10 Aug 2020 22:34:13 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: guomin.jiang@intel.com) IronPort-SDR: xeCJMk3BCk6SR035VrC2UhlunkJWk4CP0/IKpNhh0wWZFx7ycTlDyw1quVWIy1Px+JO9iMYBY4 ANURDk7Wgkmg== X-IronPort-AV: E=McAfee;i="6000,8403,9709"; a="151348951" X-IronPort-AV: E=Sophos;i="5.75,459,1589266800"; d="scan'208";a="151348951" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2020 22:34:12 -0700 IronPort-SDR: zjrG/GzQCftGk11AnLPI3c6JNyZ4ebbvggK2+42CKuObYT+pVMpXZRuMlo6jmndQ+cnsfqHcL2 LwMxuxdFFThw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,459,1589266800"; d="scan'208";a="324662667" Received: from guominji-mobl.ccr.corp.intel.com ([10.238.13.140]) by orsmga008.jf.intel.com with ESMTP; 10 Aug 2020 22:34:11 -0700 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: Jian J Wang , Liming Gao Subject: [edk2-wiki][PATCH v2] Update the Boot Guard TOCTOU wiki page. Date: Tue, 11 Aug 2020 13:32:25 +0800 Message-Id: <20200811053225.1277-1-guomin.jiang@intel.com> X-Mailer: git-send-email 2.25.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The Boot Guard TOCTOU have been migrated into edk2/master. Update the document to meet the change. Signed-off-by: Guomin Jiang Cc: Jian J Wang Cc: Liming Gao Reviewed-by: Jian J Wang --- Boot-Guard-TOCTOU-Vulnerability-Mitigation.md | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/Boot-Guard-TOCTOU-Vulnerability-Mitigation.md b/Boot-Guard-TOCTOU-Vulnerability-Mitigation.md index e59c7b1..64b9d66 100644 --- a/Boot-Guard-TOCTOU-Vulnerability-Mitigation.md +++ b/Boot-Guard-TOCTOU-Vulnerability-Mitigation.md @@ -45,32 +45,20 @@ references must be updated. In this mitigation, the process of performing these The changes described in this mitigation are intended to simply integrate into firmware solutions. For the changes to function as intended, the platform firmware implementation should follow these guidelines. -The changes are currently being staged in the following EDK II fork for additional validation before being -sent to the EDK II mailing list: https://github.com/makubacki/edk2/tree/btg_toctou_mitigation_staging - -The changes should not be considered final or production ready until they are reviewed and pushed onto edk2/master. - -1. Always ensure PcdShadowPeimOnBoot and PcdShadowPeimOnS3Boot - (if platform supports S3) are set to TRUE if Boot Guard is - enabled and V=1 or M=1. -2. Always ensure PcdMigrateTemporaryRamFirmwareVolumes is set to TRUE. -3. Ensure that all PEIMs are relocatable. Relocation tables should +1. Always ensure PcdMigrateTemporaryRamFirmwareVolumes is set to TRUE + if Boot Guard is enabled and V=1 or M=1. +2. Ensure that all PEIMs are relocatable. Relocation tables should not be stripped. -4. If an Intel® Firmware Support Package (FSP) binary solution is +3. If an Intel® Firmware Support Package (FSP) binary solution is used, the binary must have these mitigation changes integrated. -5. Avoid maintaining pointers to pre-memory addresses inside embedded +4. Avoid maintaining pointers to pre-memory addresses inside embedded structures or other non-standard structures that the automatic migration code introduced in this change cannot identify. -6. Migrate the FIT table based on platform requirements for FIT +5. Migrate the FIT table based on platform requirements for FIT access in post-memory. -**Very Important** - -7. Enable paging after memory initialization and mark the IBB range - as Not Present (NP). - - This will cause a page fault on access to the IBB region. This CR2 register can be used to identify the address - accessed and the IP. +Notes: IBB will be set Not Present, you will see a page fault if any code access to the IBB region after migration. + the address where the code access can be identified in the CR2 register. # High-Level Migration Required Resources that must be migrated can be categorized as code or data. -- 2.25.1.windows.1