Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SecurityPkg: Add measurement of Firmware Debugger Enabled based on DeviceState #342

Conversation

VivianNK
Copy link
Contributor

@VivianNK VivianNK commented Oct 3, 2024

Description

Add measurement of Firmware Debugger
Enabled based on DeviceState.

Added both to Tcg2Pei and Tcg2Dxe. The measurement is redundant
in Tcg2Dxe, but is added for consistency with previous functionality.
The plan is to remove the PcdFirmwareDebuggerInitialized PCD
and replace its usage with the DeviceStateLib

This will prevent the system from booting if the device is in an
an insecure state, as determined by the DeviceStateLib from
MdeModulePkg.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

Local CI

Integration Instructions

N/A

@VivianNK VivianNK requested review from os-d and cfernald October 3, 2024 22:07
@github-actions github-actions bot added impact:non-functional Does not have a functional impact impact:security Has a security impact labels Oct 3, 2024
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c Outdated Show resolved Hide resolved
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c Outdated Show resolved Hide resolved
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c Outdated Show resolved Hide resolved
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c Outdated Show resolved Hide resolved
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c Outdated Show resolved Hide resolved
@os-d os-d requested a review from makubacki October 3, 2024 22:13
@VivianNK VivianNK force-pushed the personal/vnowkakeane/insecureDeviceState branch from ea29d01 to da77870 Compare October 3, 2024 22:34
@VivianNK VivianNK changed the title SecurityPkg: Tcg2Pei: Add measurement if DeviceState is not secure (WIP) SecurityPkg: Tcg2Pei: Add measurement if DeviceState is not secure Oct 3, 2024
@github-actions github-actions bot added the impact:breaking-change Requires integration attention label Oct 3, 2024
@VivianNK VivianNK force-pushed the personal/vnowkakeane/insecureDeviceState branch from 7e9afb2 to db307d6 Compare October 9, 2024 00:01
@VivianNK VivianNK force-pushed the personal/vnowkakeane/insecureDeviceState branch from db307d6 to c1f3c50 Compare October 12, 2024 00:25
@VivianNK VivianNK requested a review from makubacki October 12, 2024 00:27
@VivianNK VivianNK force-pushed the personal/vnowkakeane/insecureDeviceState branch from c1f3c50 to f41990e Compare October 14, 2024 20:34
@VivianNK VivianNK force-pushed the personal/vnowkakeane/insecureDeviceState branch 2 times, most recently from f7035d9 to 0571edd Compare October 14, 2024 20:37
@VivianNK VivianNK force-pushed the personal/vnowkakeane/insecureDeviceState branch from 0571edd to f864518 Compare October 14, 2024 20:50
@VivianNK VivianNK changed the title (WIP) SecurityPkg: Tcg2Pei: Add measurement if DeviceState is not secure (WIP) SecurityPkg: Add measurement of Firmware Debugger Enabled based on DeviceState Oct 14, 2024
@VivianNK VivianNK removed the impact:breaking-change Requires integration attention label Oct 14, 2024
@VivianNK VivianNK force-pushed the personal/vnowkakeane/insecureDeviceState branch 3 times, most recently from 279fb41 to aa58612 Compare October 14, 2024 23:19
@codecov-commenter
Copy link

codecov-commenter commented Oct 14, 2024

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 1.44%. Comparing base (522d1ee) to head (bb9e989).

Files with missing lines Patch % Lines
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c 0.00% 5 Missing ⚠️
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c 0.00% 4 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           dev/202405    #342      +/-   ##
=============================================
- Coverage        1.44%   1.44%   -0.01%     
=============================================
  Files             159     159              
  Lines           37091   37126      +35     
  Branches          273     273              
=============================================
  Hits              535     535              
- Misses          36556   36591      +35     
Flag Coverage Δ
SecurityPkg 1.00% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@VivianNK VivianNK changed the title (WIP) SecurityPkg: Add measurement of Firmware Debugger Enabled based on DeviceState SecurityPkg: Add measurement of Firmware Debugger Enabled based on DeviceState Oct 15, 2024
@VivianNK VivianNK force-pushed the personal/vnowkakeane/insecureDeviceState branch from aa58612 to b461728 Compare October 21, 2024 19:46
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c Outdated Show resolved Hide resolved
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c Show resolved Hide resolved
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c Outdated Show resolved Hide resolved
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c Outdated Show resolved Hide resolved
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c Outdated Show resolved Hide resolved
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c Outdated Show resolved Hide resolved
@VivianNK VivianNK force-pushed the personal/vnowkakeane/insecureDeviceState branch 2 times, most recently from 8836d16 to 439b9b7 Compare October 21, 2024 20:58
@VivianNK VivianNK requested review from Flickdm and os-d October 21, 2024 20:59
@VivianNK VivianNK force-pushed the personal/vnowkakeane/insecureDeviceState branch from 439b9b7 to 22c0a4d Compare October 21, 2024 22:43
@VivianNK VivianNK force-pushed the personal/vnowkakeane/insecureDeviceState branch from 22c0a4d to 25fbda0 Compare October 22, 2024 21:37
@VivianNK VivianNK force-pushed the personal/vnowkakeane/insecureDeviceState branch 3 times, most recently from 1aef220 to f58639c Compare October 23, 2024 20:47
Enabled based on DeviceState.

Added both to Tcg2Pei and Tcg2Dxe. The measurement is redundant
in Tcg2Dxe, but is added for consistency with Tcg2Pei.
The plan is to remove the PcdFirmwareDebuggerInitialized PCD
and replace its usage with the DeviceStateLib

This will prevent the system from booting if the device is in an
an insecure state, as determined by the DeviceStateLib from
MdeModulePkg.

Signed-off-by: Vivian Nowka-Keane <[email protected]>
@VivianNK VivianNK force-pushed the personal/vnowkakeane/insecureDeviceState branch from f58639c to bb9e989 Compare October 23, 2024 20:56
@VivianNK VivianNK removed the impact:non-functional Does not have a functional impact label Oct 23, 2024
@github-actions github-actions bot added the impact:non-functional Does not have a functional impact label Oct 23, 2024
@VivianNK VivianNK enabled auto-merge (rebase) October 23, 2024 21:00
@VivianNK VivianNK merged commit bdfd753 into microsoft:dev/202405 Oct 23, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:non-functional Does not have a functional impact impact:security Has a security impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants