All posts by rocco

CWE-1324 – Sensitive Information Accessible by Physical Probing of JTAG Interface

Read Time:39 Second

Description

Sensitive information in clear text on the JTAG
interface may be examined by an eavesdropper, e.g.
by placing a probe device on the interface such as a logic
analyzer, or a corresponding software technique.

Modes of Introduction:

– Architecture and Design

 

 

Related Weaknesses

CWE-300

 

Consequences

Confidentiality: Read Memory, Read Files or Directories, Read Application Data

 

Potential Mitigations

Phase: Manufacturing

Effectiveness: High

Description: 

Disable permanently the JTAG interface before releasing the system to untrusted users.

Phase: Architecture and Design

Effectiveness: High

Description: 

Encrypt all information (traffic) on the JTAG interface using an approved algorithm (such as recommended by NIST). Encrypt the path from inside the chip to the trusted user application.

Phase: Implementation

Effectiveness: High

Description: 

Block access to secret data from JTAG.

CVE References

CWE-1325 – Improperly Controlled Sequential Memory Allocation

Read Time:1 Minute, 20 Second

Description

The product manages a group of objects or resources and performs a separate memory allocation for each object, but it does not properly limit the total amount of memory that is consumed by all of the combined objects.

Modes of Introduction:

– Implementation

 

 

Related Weaknesses

CWE-770
CWE-789
CWE-476

 

Consequences

Availability: DoS: Resource Consumption (Memory)

Not controlling memory allocation can result in a request for too much system memory, possibly leading to a crash of the application due to out-of-memory conditions, or the consumption of a large amount of memory on the system.

 

Potential Mitigations

Phase: Implementation

Description: 

Ensure multiple allocations of the same kind of object are properly tracked – possibly across multiple sessions, requests, or messages. Define an appropriate strategy for handling requests that exceed the limit, and consider supporting a configuration option so that the administrator can extend the amount of memory to be used if necessary.

Phase: Operation

Description: 

Run the program using system-provided resource limits for memory. This might still cause the program to crash or exit, but the impact to the rest of the system will be minimized.

CVE References

  • CVE-2020-36049
    • JavaScript-based packet decoder uses concatenation of many small strings, causing out-of-memory (OOM) condition
  • CVE-2019-20176
    • Product allocates a new buffer on the stack for each file in a directory, allowing stack exhaustion
  • CVE-2013-1591
    • Chain: an integer overflow (CWE-190) in the image size calculation causes an infinite loop (CWE-835) which sequentially allocates buffers without limits (CWE-1325) until the stack is full.

CWE-1326 – Missing Immutable Root of Trust in Hardware

Read Time:31 Second

Description

A missing immutable root of trust in the hardware results in the ability to bypass secure boot or execute untrusted or adversarial boot code.

Modes of Introduction:

– Architecture and Design

 

 

Related Weaknesses

CWE-693

 

Consequences

Authentication, Authorization: Gain Privileges or Assume Identity, Execute Unauthorized Code or Commands, Modify Memory

 

Potential Mitigations

Phase: Architecture and Design

Description: 

When architecting the system, the RoT should be designated for storage in a memory that does not allow further programming/writes.

Phase: Implementation

Description: 

During implementation and test, the RoT memory location should be demonstrated to not allow further programming/writes.

CVE References

CWE-1287 – Improper Validation of Specified Type of Input

Read Time:22 Second

Description

The product receives input that is expected to be of a certain type, but it does not validate or incorrectly validates that the input is actually of the expected type.

Modes of Introduction:

– Implementation

 

 

Related Weaknesses

CWE-20
CWE-843

 

Consequences

Other: Varies by Context

 

Potential Mitigations

Phase: Implementation

Effectiveness: High

Description: 

CVE References

  • CVE-2008-2223
    • SQL injection through an ID that was supposed to be numeric.

CWE-1288 – Improper Validation of Consistency within Input

Read Time:31 Second

Description

The product receives a complex input with multiple elements or fields that must be consistent with each other, but it does not validate or incorrectly validates that the input is actually consistent.

Modes of Introduction:

– Implementation

 

 

Related Weaknesses

CWE-20

 

Consequences

Other: Varies by Context

 

Potential Mitigations

Phase: Implementation

Effectiveness: High

Description: 

CVE References

  • CVE-2018-16733
    • product does not validate that the start block appears before the end block
  • CVE-2006-3790
    • size field that is inconsistent with packet size leads to buffer over-read
  • CVE-2008-4114
    • system crash with offset value that is inconsistent with packet size

CWE-1289 – Improper Validation of Unsafe Equivalence in Input

Read Time:48 Second

Description

The product receives an input value that is used as a resource identifier or other type of reference, but it does not validate or incorrectly validates that the input is equivalent to a potentially-unsafe value.

Modes of Introduction:

– Implementation

 

 

Related Weaknesses

CWE-20
CWE-41
CWE-178

 

Consequences

Other: Varies by Context

 

Potential Mitigations

Phase: Implementation

Effectiveness: High

Description: 

CVE References

  • CVE-2005-0269
    • File extension check in forum software only verifies extensions that contain all lowercase letters, which allows remote attackers to upload arbitrary files via file extensions that include uppercase letters.
  • CVE-2001-1238
    • Task Manager does not allow local users to end processes with uppercase letters named (1) winlogon.exe, (2) csrss.exe, (3) smss.exe and (4) services.exe via the Process tab which could allow local users to install Trojan horses that cannot be stopped.
  • CVE-2004-2214
    • HTTP server allows bypass of access restrictions using URIs with mixed case.

CWE-129 – Improper Validation of Array Index

Read Time:3 Minute, 58 Second

Description

The product uses untrusted input when calculating or using an array index, but the product does not validate or incorrectly validates the index to ensure the index references a valid position within the array.

Modes of Introduction:

– Implementation

 

Likelihood of Exploit: High

 

Related Weaknesses

CWE-1285
CWE-20
CWE-119
CWE-823
CWE-789

 

Consequences

Integrity, Availability: DoS: Crash, Exit, or Restart

Use of an index that is outside the bounds of an array will very likely result in the corruption of relevant memory and perhaps instructions, leading to a crash, if the values are outside of the valid memory area.

Integrity: Modify Memory

If the memory corrupted is data, rather than instructions, the system will continue to function with improper values.

Confidentiality, Integrity: Modify Memory, Read Memory

Use of an index that is outside the bounds of an array can also trigger out-of-bounds read or write operations, or operations on the wrong objects; i.e., “buffer overflows” are not always the result. This may result in the exposure or modification of sensitive data.

Integrity, Confidentiality, Availability: Execute Unauthorized Code or Commands

If the memory accessible by the attacker can be effectively controlled, it may be possible to execute arbitrary code, as with a standard buffer overflow and possibly without the use of large inputs if a precise index can be controlled.

Integrity, Availability, Confidentiality: DoS: Crash, Exit, or Restart, Execute Unauthorized Code or Commands, Read Memory, Modify Memory

A single fault could allow either an overflow (CWE-788) or underflow (CWE-786) of the array index. What happens next will depend on the type of operation being performed out of bounds, but can expose sensitive information, cause a system crash, or possibly lead to arbitrary code execution.

 

Potential Mitigations

Phase: Architecture and Design

Description: 

Use an input validation framework such as Struts or the OWASP ESAPI Validation API. Note that using a framework does not automatically address all input validation problems; be mindful of weaknesses that could arise from misusing the framework itself (CWE-1173).

Phase: Architecture and Design

Description: 

Phase: Requirements

Description: 

Phase: Operation

Effectiveness: Defense in Depth

Description: 

This is not a complete solution. However, it forces the attacker to guess an unknown value that changes every program execution. In addition, an attack could still cause a denial of service, since the typical response is to exit the application.

Phase: Operation

Effectiveness: Defense in Depth

Description: 

Use a CPU and operating system that offers Data Execution Protection (NX) or its equivalent [REF-60] [REF-61].

This is not a complete solution, since buffer overflows could be used to overwrite nearby variables to modify the software’s state in dangerous ways. In addition, it cannot be used in cases in which self-modifying code is required. Finally, an attack could still cause a denial of service, since the typical response is to exit the application.

Phase: Implementation

Description: 

Phase: Implementation

Description: 

Be especially careful to validate all input when invoking code that crosses language boundaries, such as from an interpreted language to native code. This could create an unexpected interaction between the language boundaries. Ensure that you are not violating any of the expectations of the language with which you are interfacing. For example, even though Java may not be susceptible to buffer overflows, providing a large argument in a call to native code might trigger an overflow.

Phase: Architecture and Design, Operation

Description: 

Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.

Phase: Architecture and Design, Operation

Effectiveness: Limited

Description: 

The effectiveness of this mitigation depends on the prevention capabilities of the specific sandbox or jail being used and might only help to reduce the scope of an attack, such as restricting the attacker to certain system calls or limiting the portion of the file system that can be accessed.

CVE References

  • CVE-2001-1009
    • negative array index as argument to POP LIST command
  • CVE-2003-0721
    • Integer signedness error leads to negative array index
  • CVE-2004-1189
    • product does not properly track a count and a maximum number, which can lead to resultant array index overflow.
  • CVE-2007-5756
    • Chain: device driver for packet-capturing software allows access to an unintended IOCTL with resultant array index error.
  • CVE-2005-2456
    • Chain: array index error (CWE-129) leads to deadlock (CWE-833)

CWE-1290 – Incorrect Decoding of Security Identifiers

Read Time:35 Second

Description

The product implements a decoding mechanism to decode certain bus-transaction signals to security identifiers. If the decoding is implemented incorrectly, then untrusted agents can now gain unauthorized access to the asset.

Modes of Introduction:

– Implementation

 

 

Related Weaknesses

CWE-284
CWE-1294

 

Consequences

Confidentiality, Integrity, Availability, Access Control: Modify Memory, Read Memory, DoS: Resource Consumption (Other), Execute Unauthorized Code or Commands, Gain Privileges or Assume Identity, Quality Degradation

 

Potential Mitigations

Phase: Architecture and Design

Description: 

Security identifier decoders must be reviewed for design consistency and common weaknesses.

Phase: Implementation

Description: 

Access and programming flows must be tested in pre-silicon and post-silicon testing in order to check for this weakness.

CVE References

CWE-1291 – Public Key Re-Use for Signing both Debug and Production Code

Read Time:21 Second

Description

The same public key is used for signing both debug and production code.

Modes of Introduction:

– Implementation

 

 

Related Weaknesses

CWE-693
CWE-321

 

Consequences

Confidentiality, Integrity, Availability, Access Control, Accountability, Authentication, Authorization, Non-Repudiation, Other: Read Memory, Modify Memory, Execute Unauthorized Code or Commands, Gain Privileges or Assume Identity, Varies by Context

 

Potential Mitigations

Phase: Implementation

Description: 

Use different keys for Production and Debug

CVE References

CWE-1292 – Incorrect Conversion of Security Identifiers

Read Time:33 Second

Description

The product implements a conversion mechanism to map certain bus-transaction signals to security identifiers. However, if the conversion is incorrectly implemented, untrusted agents can gain unauthorized access to the asset.

Modes of Introduction:

– Architecture and Design

 

 

Related Weaknesses

CWE-284
CWE-1294

 

Consequences

Confidentiality, Integrity, Availability, Access Control: Modify Memory, Read Memory, DoS: Resource Consumption (Other), Execute Unauthorized Code or Commands, Gain Privileges or Assume Identity, Quality Degradation

 

Potential Mitigations

Phase: Architecture and Design

Description: 

Security identifier decoders must be reviewed for design inconsistency and common weaknesses.

Phase: Implementation

Description: 

Access and programming flows must be tested in pre-silicon and post-silicon testing.

CVE References