Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools
CWE-1267:Policy Uses Obsolete Encoding
Weakness ID:1267
Version:v4.17
Weakness Name:Policy Uses Obsolete Encoding
Vulnerability Mapping:Allowed
Abstraction:Base
Structure:Simple
Status:Draft
Likelihood of Exploit:
DetailsContent HistoryObserved CVE ExamplesReports
▼Description

The product uses an obsolete encoding mechanism to implement access controls.

▼Extended Description

Within a System-On-a-Chip (SoC), various circuits and hardware engines generate transactions for the purpose of accessing (read/write) assets or performing various actions (e.g., reset, fetch, compute, etc.). Among various types of message information, a typical transaction is comprised of source identity (identifying the originator of the transaction) and a destination identity (routing the transaction to the respective entity). Sometimes the transactions are qualified with a Security Token. This Security Token helps the destination agent decide on the set of allowed actions (e.g., access to an asset for reads and writes). A policy encoder is used to map the bus transactions to Security Tokens that in turn are used as access-controls/protection mechanisms. A common weakness involves using an encoding which is no longer trusted, i.e., an obsolete encoding.

▼Alternate Terms
▼Relationships
Relevant to the view"Research Concepts - (1000)"
NatureMappingTypeIDName
ChildOfDiscouragedP284Improper Access Control
Nature: ChildOf
Mapping: Discouraged
Type: Pillar
ID: 284
Name: Improper Access Control
▼Memberships
NatureMappingTypeIDName
MemberOfProhibitedC1198Privilege Separation and Access Control Issues
MemberOfProhibitedC1396Comprehensive Categorization: Access Control
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1198
Name: Privilege Separation and Access Control Issues
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1396
Name: Comprehensive Categorization: Access Control
▼Tags
NatureMappingTypeIDName
MemberOfProhibitedBSBOSS-294Not Language-Specific Weaknesses
MemberOfProhibitedBSBOSS-298Not OS-Specific(os class) Weaknesses
MemberOfProhibitedBSBOSS-301Not Architecture-Specific (architecture class) Weaknesses
MemberOfProhibitedBSBOSS-307Not Technology-Specific (technology class) Weaknesses
MemberOfProhibitedBSBOSS-311Execute Unauthorized Code or Commands (impact)
MemberOfProhibitedBSBOSS-316Bypass Protection Mechanism (impact)
MemberOfProhibitedBSBOSS-317Reduce Reliability (impact)
MemberOfProhibitedBSBOSS-319Read Files or Directories (impact)
MemberOfProhibitedBSBOSS-320Modify Files or Directories (impact)
MemberOfProhibitedBSBOSS-323Read Memory (impact)
MemberOfProhibitedBSBOSS-331Modify Memory (impact)
MemberOfProhibitedBSBOSS-332Gain Privileges or Assume Identity (impact)
MemberOfProhibitedBSBOSS-333DoS: Resource Consumption (Other) (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-294
Name: Not Language-Specific Weaknesses
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-298
Name: Not OS-Specific(os class) Weaknesses
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-301
Name: Not Architecture-Specific (architecture class) Weaknesses
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-307
Name: Not Technology-Specific (technology class) Weaknesses
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-311
Name: Execute Unauthorized Code or Commands (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-316
Name: Bypass Protection Mechanism (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-317
Name: Reduce Reliability (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-319
Name: Read Files or Directories (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-320
Name: Modify Files or Directories (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-323
Name: Read Memory (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-331
Name: Modify Memory (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-332
Name: Gain Privileges or Assume Identity (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-333
Name: DoS: Resource Consumption (Other) (impact)
▼Relevant To View
Relevant to the view"Hardware Design - (1194)"
NatureMappingTypeIDName
MemberOfProhibitedC1198Privilege Separation and Access Control Issues
Nature: MemberOf
Mapping: Prohibited
Type: Category
ID: 1198
Name: Privilege Separation and Access Control Issues
▼Background Detail

▼Common Consequences
ScopeLikelihoodImpactNote
ConfidentialityIntegrityAvailabilityAccess ControlHighModify MemoryRead MemoryModify Files or DirectoriesRead Files or DirectoriesDoS: Resource Consumption (Other)Execute Unauthorized Code or CommandsGain Privileges or Assume IdentityBypass Protection MechanismReduce Reliability
N/A
Scope: Confidentiality, Integrity, Availability, Access Control
Likelihood: High
Impact: Modify Memory, Read Memory, Modify Files or Directories, Read Files or Directories, DoS: Resource Consumption (Other), Execute Unauthorized Code or Commands, Gain Privileges or Assume Identity, Bypass Protection Mechanism, Reduce Reliability
Note:
N/A
▼Potential Mitigations
Phase:Architecture and Design, Implementation
Mitigation ID:
Strategy:
Effectiveness: High
Description:

Security Token Decoders should be reviewed for design inconsistency and common weaknesses.

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

Note:

▼Modes Of Introduction
Phase: Architecture and Design
Note:

N/A

Phase: Implementation
Note:

N/A

▼Applicable Platforms
Languages
Class: Not Language-Specific(Undetermined Prevalence)
Technology
Class: Not Technology-Specific(Undetermined Prevalence)
Operating System
Class: Not OS-Specific(Undetermined Prevalence)
Architecture
Class: Not Architecture-Specific(Undetermined Prevalence)
▼Demonstrative Examples
Example 1

For example, consider a system that has four bus masters. The table below provides bus masters, their Security Tokens, and trust assumptions.

| Bus Master | Security Token Decoding | Trust Assumptions | | --- | --- | --- | | Master_0 | "00" | Untrusted | | Master_1 | "01" | Trusted | | Master_2 | "10" | Untrusted | | Master_3 | "11" | Untrusted |

The policy encoding is to be defined such that Security Token will be used in implemented access-controls. The bits in the bus transaction that contain Security-Token information are Bus_transaction [15:11]. The assets are the AES-Key registers for encryption or decryption. The key of 128 bits is implemented as a set of four, 32-bit registers.

| Register | Field description | | --- | --- | | AES_ENC_DEC_KEY_0 | AES key [0:31] for encryption or decryption, Default 0x00000000 | | AES_ENC_DEC_KEY_1 | AES key [32:63] for encryption or decryption, Default 0x00000000 | | AES_ENC_DEC_KEY_2 | AES key [64:95] for encryption or decryption, Default 0x00000000 | | AES_ENC_DEC_KEY_4 | AES key [96:127] for encryption or decryption, Default 0x00000000 |

Below is an example of a policy encoding scheme inherited from a previous project where all "ODD" numbered Security Tokens are trusted.

Language: ( code)
N/A

Language: (Bad code)
If (Bus_transaction[14] == "1") Trusted = "1" Else Trusted = "0" If (trusted) Allow access to AES-Key registers Else Deny access to AES-Key registers

Language: ( code)
N/A

The inherited policy encoding is obsolete and does not work for the new system where an untrusted bus master with an odd Security Token exists in the system, i.e., Master_3 whose Security Token is "11". Based on the old policy, the untrusted bus master (Master_3) has access to the AES-Key registers. To resolve this, a register AES_KEY_ACCESS_POLICY can be defined to provide necessary, access controls:

Language: ( code)
N/A

New Policy:

| | | | AES_KEY_ACCESS_POLICY | [31:0] Default 0x00000002 - agent with Security Token "1" has access to AES_ENC_DEC_KEY_0 through AES_ENC_DEC_KEY_4 registers |

The AES_KEY_ACCESS_POLICY register defines which agents with a Security Token in the transaction can access the AES-key registers. Each bit in this 32-bit register defines a Security Token. There could be a maximum of 32 security Tokens that are allowed access to the AES-key registers. The number of the bit when set (i.e., "1") allows respective action from an agent whose identity matches the number of the bit and, if "0" (i.e., Clear), disallows the respective action to that corresponding agent. Thus, any bus master with Security Token "01" is allowed access to the AES-Key registers. Below is the Pseudo Code for policy encoding:

Language: (Good code)
Security_Token[4:0] = Bus_transaction[15:11] If (AES_KEY_ACCESS_POLICY[Security_Token] == "1") Allow access to AES-Key registers Else Deny access to AES-Key registers

▼Observed Examples
ReferenceDescription
▼Affected Resources
    ▼Functional Areas
      ▼Weakness Ordinalities
      OrdinalityDescription
      ▼Detection Methods
      ▼Vulnerability Mapping Notes
      Usage:Allowed
      Reason:Acceptable-Use
      Rationale:

      This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.

      Comments:

      Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

      Suggestions:
      ▼Notes
      ▼Taxonomy Mappings
      Taxonomy NameEntry IDFitEntry Name
      ▼Related Attack Patterns
      IDName
      CAPEC-121
      Exploit Non-Production Interfaces
      CAPEC-681
      Exploitation of Improperly Controlled Hardware Security Identifiers
      ID: CAPEC-121
      Name: Exploit Non-Production Interfaces
      ID: CAPEC-681
      Name: Exploitation of Improperly Controlled Hardware Security Identifiers
      ▼References
      Reference ID: REF-1093
      Title: Huge Intel CPU Bug Allegedly Causes Kernel Memory Vulnerability With Up To 30% Performance Hit In Windows And Linux
      Author: Brandon Hill
      Section:
      Publication:
      Publisher:
      Edition:
      URL:https://hothardware.com/news/intel-cpu-bug-kernel-memory-isolation-linux-windows-macos
      URL Date:2023-04-07
      Day:02
      Month:01
      Year:2018
      Details not found