@@ -808,13 +808,13 @@ All security-relevant firmware and software shall be compiled with secure compil
| WL-1 | SCFS, SSCA |
| all others | SCFS, SSCA, (FZ95 or BTIN or IMSL) |
### 5.2.X **TR-MSAF**: Memory error mitigations
### 5.2.X **TR-LMII**: Limit incident impact
#### 5.2.X.x Requirement
The product shall implement appropriate mitigations for memory errors.
The product shall implement appropriate mitigations to limit incident impact
#### 5.2.X.x Default Preparation, Verdict, and Evidence
#### 5.2.X.x Default Preparation, Verdict, and Evidence for memory safety mitigations
Most memory safety mitigations have the same Verdict and Evidence:
@@ -822,13 +822,13 @@ Most memory safety mitigations have the same Verdict and Evidence:
* Verdict: each involved thread fails to read or write the target data and takes a segmentation fault, has error handling code executed, or is terminated in all tests => PASS, otherwise FAIL
* Evidence: error messages, log message, or the product reboots or halts
For each mitigation grouped under requirement TR-MSAF, for each field Preparation, Verdict, or Evidence, if it is not specified for that test, then the above Preparation, Verdict, or Evidence field shall apply.
For each mitigation grouped under requirement TR-LMII, for each field Preparation, Verdict, or Evidence, if it is not specified for that test, then the above Preparation, Verdict, or Evidence field shall apply.
The product shall reject writes beyond the end of the stack.
* Reference: TR-MSAF
* Reference: TR-LMII
* Objective: Prevent thread from writing beyond end of stack
* Activities: Write beyond the end of the stack
@@ -838,7 +838,7 @@ Guidance: Two methods of exhausting stack memory include allocating a very large
The product shall reject stack buffer writes that go beyond the end of the stack frame.
* Reference: TR-MSAF
* Reference: TR-LMII
* Objective: Prevent thread from writing beyond end of stack
* Activities: Write beyond the end of the stack frame
@@ -846,7 +846,7 @@ The product shall reject stack buffer writes that go beyond the end of the stack
The product shall reject writes to fixed-size arrays that are beyond the end of the array.
* Reference: TR-MSAF
* Reference: TR-LMII
* Objective: Prevent thread from writing beyond the end of a fixed-size array
* Activities: Write beyond the end of a fixed-size array
@@ -854,7 +854,7 @@ The product shall reject writes to fixed-size arrays that are beyond the end of
The product shall zero-initialize all stack memory before use.
* Reference: TR-MSAF
* Reference: TR-LMII
* Objective: Prevent attacker from exploiting erroneous use of uninitialized stack memory
* Activities: Sequentially call 2 functions that allocate the same amount of memory, fill the first with non-zero values and return, and during second function call, read the stack contents back
* Verdict: Stack contents are all zero on second call
@@ -864,7 +864,7 @@ The product shall zero-initialize all stack memory before use.
The product shall zero-initialize all heap memory before use.
* Reference: TR-MSAF
* Reference: TR-LMII
* Objective: Prevent attacker from exploiting erroneous use of uninitialized heap memory
* Activities: Allocate heap memory, fill with a non-zero value, free it, allocate it again in a deterministic way to get the same heap region, and read back the contents
* Verdict: Memory contents are all zero on second call
@@ -1536,17 +1536,17 @@ SP-VI-2: KEVD, (KEVL or SCAN), SCFS, SSCA, (FZ95 or BTIN or IMSL), IMSL or (MSAF