Common Weakness Enumeration

A Community-Developed List of Software & Hardware Weakness Types

CWE Top 25 Most Dangerous Software Errors
Home > CWE List > CWE- Individual Dictionary Definition (4.1)  

CWE-1267: Policy Uses Obsolete Encoding

Weakness ID: 1267
Abstraction: Base
Structure: Simple
Status: Draft
Presentation Filter:
+ Description
The product uses an obsolete encoding mechanism to implement access controls.
+ Extended Description

Within a System-On-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 Identifier. This Security Identifier 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 Identifiers 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.

+ Relationships

The table(s) below shows the weaknesses and high level categories that are related to this weakness. These relationships are defined as ChildOf, ParentOf, MemberOf and give insight to similar items that may exist at higher and lower levels of abstraction. In addition, relationships such as PeerOf and CanAlsoBe are defined to show similar weaknesses that the user may want to explore.

+ Relevant to the view "Research Concepts" (CWE-1000)
ChildOfPillarPillar - a weakness that is the most abstract type of weakness and represents a theme for all class/base/variant weaknesses related to it. A Pillar is different from a Category as a Pillar is still technically a type of weakness that describes a mistake, while a Category represents a common characteristic used to group related things.284Improper Access Control
+ Relevant to the view "Hardware Design" (CWE-1194)
MemberOfCategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic.1198Privilege Separation and Access Control Issues
+ Modes Of Introduction

The different Modes of Introduction provide information about how and when this weakness may be introduced. The Phase identifies a point in the life cycle at which introduction may occur, while the Note provides a typical scenario related to introduction during the given phase.

Architecture and DesignSuch issues could be introduced during hardware architecture and design or implementation and identified later during Testing or System Configuration phases.
+ Applicable Platforms
The listings below show possible areas for which the given weakness could appear. These may be for specific named Languages, Operating Systems, Architectures, Paradigms, Technologies, or a class of such platforms. The platform is listed along with how frequently the given weakness appears for that instance.


Class: Language-Independent (Undetermined Prevalence)

Operating Systems

Class: OS-Independent (Undetermined Prevalence)


Class: Architecture-Independent (Undetermined Prevalence)


Class: System on Chip (Undetermined Prevalence)

+ Common Consequences

The table below specifies different individual consequences associated with the weakness. The Scope identifies the application security area that is violated, while the Impact describes the negative technical impact that arises if an adversary succeeds in exploiting this weakness. The Likelihood provides information about how likely the specific consequence is expected to be seen relative to the other consequences in the list. For example, there may be high likelihood that a weakness will be exploited to achieve a certain impact, but a low likelihood that it will be exploited to achieve a different impact.

Access Control

Technical 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

+ Demonstrative Examples

Example 1

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

Bus Master Security Identifier 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 Identifier will be used in implemented access-controls.

The bits in the bus transaction that contain Security-Identifier information are Bus_transaction [15:11].

The assets are the AES-Key registers for encryption or decryption. The key is of 128 bits 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 Identifiers are trusted.

(bad code)
If (Bus_transaction[14] == “1”)
Trusted = “1”
Trusted = “0”
If (trusted)
Allow access to AES-Key registers
Deny access to AES-Key registers

The inhereted policy encoding is obsolete and does not work for the new system where an untrusted bus master with an odd Security Identifier exists in the system, i.e., Master_3 whose Security Identifier 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:

New Policy:

AES_KEY_ACCESS_POLICY [31:0] Default 0x00000002 – agent with Security Identifier “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 Identifier in the transaction can access the AES-key registers. Each bit in this 32-bit register defines a Security Identifier. There could be a maximum of 32 security identifiers that are allowed accesses 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 Identifier “01” is allowed access to the AES-Key registers. Below is the Pseudo Code for policy encoding:

(good code)
Security_Identifier[4:0] = Bus_transaction[15:11]
If (AES_KEY_ACCESS_POLICY[Security_Identifier] == “1”)
Allow access to AES-Key registers
Deny access to AES-Key registers
+ Potential Mitigations

Phases: Architecture and Design; Implementation

Security Identifier Decoders must be reviewed for design inconsistency and common weaknesses.

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

Effectiveness: High

+ References
[REF-1093] Brandon Hill. "Huge Intel CPU Bug Allegedly Causes Kernel Memory Vulnerability With Up To 30% Performance Hit In Windows And Linux". 2018-01-02. <>.
+ Content History
+ Submissions
Submission DateSubmitterOrganization
2020-04-18Arun Kanuparthi, Hareesh Khattri, Parbati Kumar Manna, Narasimha Kumar V MangipudiIntel Corporation
More information is available — Please select a different filter.
Page Last Updated: June 25, 2020