amd

package
v0.0.0-...-f44e450 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Copyright 2023 Meta Platforms, Inc. and affiliates.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Copyright 2023 Meta Platforms, Inc. and affiliates.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Copyright 2023 Meta Platforms, Inc. and affiliates.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPSPSignatureVerificationFailedSELValidator

func NewPSPSignatureVerificationFailedSELValidator() validator.Validator

NewPSPSignatureVerificationFailedSELValidator creates Validator that expects a signature verification failed SEL event

Types

type ModifiedABLPublicKey

type ModifiedABLPublicKey struct {
	PSPSignatureCorruption
}

ModifiedABLPublicKey represents a testcase with modified ABL key

func NewModifiedABLPublicKey

func NewModifiedABLPublicKey() ModifiedABLPublicKey

NewModifiedABLPublicKey creates a modified PSB bootloader testcase

type ModifiedDRTMTA

type ModifiedDRTMTA struct {
	PSPSignatureCorruption
}

ModifiedDRTMTA represents a testcase with modified DRTM TA (Currently generates "PSB_STS (0x46), Event Data: (EE00FF) PSB Pass Assertion")

func NewModifiedDRTMTA

func NewModifiedDRTMTA() ModifiedDRTMTA

NewModifiedDRTMTA creates modified DRTM TA SRAM firmware testcase

type ModifiedDXIOPHYSRAMFirmware

type ModifiedDXIOPHYSRAMFirmware struct {
	PSPSignatureCorruption
}

ModifiedDXIOPHYSRAMFirmware represents a testcase with modified DXIO SRAM firmware

func NewModifiedDXIOPHYSRAMFirmware

func NewModifiedDXIOPHYSRAMFirmware() ModifiedDXIOPHYSRAMFirmware

NewModifiedDXIOPHYSRAMFirmware creates modified DXIO SRAM firmware

type ModifiedKeyDatabase

type ModifiedKeyDatabase struct {
	PSPSignatureCorruption
}

ModifiedKeyDatabase represents a testcase with modified key database

func NewModifiedKeyDatabase

func NewModifiedKeyDatabase() ModifiedKeyDatabase

NewModifiedKeyDatabase creates modified Key database testcase

type ModifiedMP5Firmware

type ModifiedMP5Firmware struct {
	PSPSignatureCorruption
}

ModifiedMP5Firmware represents a testcase with modifided MP5 Firmware

func NewModifiedMP5Firmware

func NewModifiedMP5Firmware() ModifiedMP5Firmware

NewModifiedMP5Firmware creates modified MP5 firmware testcase

type ModifiedPMUFirmwareData

type ModifiedPMUFirmwareData struct {
	PSPSignatureCorruption
}

ModifiedPMUFirmwareData represents a testcase with modified PMU firmware data

func NewModifiedPMUFirmwareData

func NewModifiedPMUFirmwareData() ModifiedPMUFirmwareData

NewModifiedPMUFirmwareData creates modified PMU firmware data test case

type ModifiedPMUFirmwareInstructions

type ModifiedPMUFirmwareInstructions struct {
	PSPSignatureCorruption
}

ModifiedPMUFirmwareInstructions represents a testcase with modified PMU firmware instructions

func NewModifiedPMUFirmwareInstructions

func NewModifiedPMUFirmwareInstructions() ModifiedPMUFirmwareInstructions

NewModifiedPMUFirmwareInstructions creates modified PMU firmware instructions test case

type ModifiedPSPAGESABinary0

type ModifiedPSPAGESABinary0 struct {
	PSPSignatureCorruption
}

ModifiedPSPAGESABinary0 represents a testcase with modified AGESA Binary 0

func NewModifiedPSPAGESABinary0

func NewModifiedPSPAGESABinary0() ModifiedPSPAGESABinary0

NewModifiedPSPAGESABinary0 creates modified AGESA Binary 0 testcase

type ModifiedPSPBootLoader

type ModifiedPSPBootLoader struct {
	PSPSignatureCorruption
}

ModifiedPSPBootLoader represents a testcase with modified PSB bootloader

func NewModifiedPSPBootLoader

func NewModifiedPSPBootLoader() ModifiedPSPBootLoader

NewModifiedPSPBootLoader creates a modified PSB bootloader testcase

type ModifiedSEVCode

type ModifiedSEVCode struct {
	PSPSignatureCorruption
}

ModifiedSEVCode represents a testcase with modified SEV Code

func NewModifiedSEVCode

func NewModifiedSEVCode() ModifiedSEVCode

NewModifiedSEVCode creates modified SEV Code testcase (Currently generates "PSB_STS (0x46), Event Data: (EE00FF) PSB Pass Assertion")

type ModifiedSMUOffchipFirmware

type ModifiedSMUOffchipFirmware struct {
	PSPSignatureCorruption
}

ModifiedSMUOffchipFirmware represents a testcase with modified SMU offchip firmware

func NewModifiedSMUOffchipFirmware

func NewModifiedSMUOffchipFirmware() ModifiedSMUOffchipFirmware

NewModifiedSMUOffchipFirmware creates a modified PSB bootloader testcase

type ModifiedSecurityPolicyBinary

type ModifiedSecurityPolicyBinary struct {
	PSPSignatureCorruption
}

ModifiedSecurityPolicyBinary represents a testcase with modified Security Policy binary

func NewModifiedSecurityPolicyBinary

func NewModifiedSecurityPolicyBinary() ModifiedSecurityPolicyBinary

NewModifiedSecurityPolicyBinary creates modified Security Policy Binary testcase

type ModifiedUnlockDebugImage

type ModifiedUnlockDebugImage struct {
	PSPSignatureCorruption
}

ModifiedUnlockDebugImage represents a testcase with modified unlock debug image

func NewModifiedUnlockDebugImage

func NewModifiedUnlockDebugImage() ModifiedUnlockDebugImage

NewModifiedUnlockDebugImage creates a modified PSB bootloader testcase

type PSBModifiedPEI

type PSBModifiedPEI struct {
	testcase.ModifiedPEITemplate
}

PSBModifiedPEI specifies scenario when modifying PEI should lead to a non-bootable host because of PSB

func NewPSBModifiedPEI

func NewPSBModifiedPEI() PSBModifiedPEI

NewPSBModifiedPEI created PSBModifiedPEI testcase for AMD Platform Secure Boot enabled

func (PSBModifiedPEI) Matches

func (t PSBModifiedPEI) Matches(fwInfo types.FirmwareInfoProvider) bool

Matches Implements types.TestCase

type PSPSignatureCorruption

type PSPSignatureCorruption struct {
	// contains filtered or unexported fields
}

PSPSignatureCorruption is a configurable TestCase for corrupting AMD PSP firmware

func NewPSPSignatureCorruption

func NewPSPSignatureCorruption(table psb.DirectoryType, entryID uint32, skipIfNotFound bool, extraValidators ...validator.Validator,
) PSPSignatureCorruption

NewPSPSignatureCorruption creates a new PSPSignatureCorruption test case that corrupts a single item in given PSP table

func NewPSPSignatureCorruptionWithRecovery

func NewPSPSignatureCorruptionWithRecovery(table, recoveryTable psb.DirectoryType, entryID uint32,
	skipIfNotFound bool, extraValidators ...validator.Validator,
) PSPSignatureCorruption

NewPSPSignatureCorruptionWithRecovery creates a new PSPSignatureCorruption test case that corrupts a single item in given PSP table and all entries of that type in recovery table

func (PSPSignatureCorruption) Matches

Matches implements types.TestCase

func (PSPSignatureCorruption) Setup

func (tc PSPSignatureCorruption) Setup(ctx context.Context, image []byte) error

Setup implements types.TestCase

func (PSPSignatureCorruption) Severity

func (tc PSPSignatureCorruption) Severity() types.Severity

Severity implements types.TestCase

func (PSPSignatureCorruption) Validate

func (tc PSPSignatureCorruption) Validate(ctx context.Context, origImage []byte, opts ...types.Option) error

Validate implements types.TestCase

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL