{"@ID": "1268", "@Name": "Policy Privileges are not Assigned Consistently Between Control and Data Agents", "@Abstraction": "Base", "@Structure": "Simple", "@Status": "Draft", "Description": "The product's hardware-enforced access control for a particular resource improperly accounts for privilege discrepancies between control and write policies.", "Extended_Description": {"xhtml:p": ["Integrated circuits and hardware engines may provide access to resources (device-configuration, encryption keys, etc.) belonging to trusted firmware or software modules (commonly set by a BIOS or a bootloader). These accesses are typically controlled and limited by the hardware. Hardware design access control is sometimes implemented using a policy. A policy defines which entity or agent may or may not be allowed to perform an action. When a system implements multiple levels of policies, a control policy may allow direct access to a resource as well as changes to the policies themselves.", "Resources that include agents in their control policy but not in their write policy could unintentionally allow an untrusted agent to insert itself in the write policy register. Inclusion in the write policy register could allow a malicious or misbehaving agent write access to resources. This action could result in security compromises including leaked information, leaked encryption keys, or modification of device configuration."]}, "Related_Weaknesses": {"Related_Weakness": {"@Nature": "ChildOf", "@CWE_ID": "266", "@View_ID": "1000", "@Ordinal": "Primary"}}, "Weakness_Ordinalities": {"Weakness_Ordinality": {"Ordinality": "Primary"}}, "Applicable_Platforms": {"Language": {"@Class": "Not Language-Specific", "@Prevalence": "Undetermined"}, "Operating_System": {"@Class": "Not OS-Specific", "@Prevalence": "Undetermined"}, "Architecture": {"@Class": "Not Architecture-Specific", "@Prevalence": "Undetermined"}, "Technology": {"@Class": "Not Technology-Specific", "@Prevalence": "Undetermined"}}, "Modes_Of_Introduction": {"Introduction": [{"Phase": "Architecture and Design", "Note": "This weakness may be introduced during the design of a device when the architect does not comprehensively specify all of the policies required by an agent."}, {"Phase": "Implementation", "Note": "This weakness may be introduced during implementation if device policy restrictions do not sufficiently constrain less-privileged clients."}]}, "Common_Consequences": {"Consequence": {"Scope": ["Confidentiality", "Integrity", "Availability", "Access Control"], "Impact": ["Modify Memory", "Read Memory", "DoS: Crash, Exit, or Restart", "Execute Unauthorized Code or Commands", "Gain Privileges or Assume Identity", "Bypass Protection Mechanism", "Read Files or Directories", "Reduce Reliability"], "Likelihood": "High"}}, "Potential_Mitigations": {"Mitigation": {"Phase": ["Architecture and Design", "Implementation"], "Description": "Access-control-policy definition and programming flow must be sufficiently tested in pre-silicon and post-silicon testing."}}, "Demonstrative_Examples": {"Demonstrative_Example": {"Intro_Text": {"xhtml:p": ["Consider a system of seven registers for storing and configuring an AES key for encryption or decryption.", "Four 32-bit registers are used to store a 128-bit AES key. The names of those registers are AES_ENC_DEC_KEY_0, AES_ENC_DEC_KEY_1, AES_ENC_DEC_KEY_2, and AES_ENC_DEC_KEY_3. Collectively these are referred to as the AES Key registers.", "Three 32-bit registers are used to define access control for the AES-key registers. The names of those registers are AES_KEY_CONTROL_POLICY, AES_KEY_READ_POLICY, and AES_KEY_WRITE_POLICY. Collectively these registers are referred to as the Policy registers, and their functions are explained next.", "The preceding three policy registers encode access control at the bit level. Therefore a maximum of 32 agents can be defined (1 bit per agent). The value of the bit when set (i.e., \"1\") allows the respective action from an agent whose identity corresponds to the number of the bit. If clear (i.e., \"0\"), it disallows the respective action to that corresponding agent. For example, if bit 0 is set to \"1\" in the AES_KEY_READ_POLICY register, then agent 0 has permission to read the AES-key registers.", "Consider that there are 4 agents named Agent 1, Agent 2, Agent 3, and Agent 4. For access control purposes Agent 1 is assigned to bit 1, Agent 2 to bit 2, Agent 3 to bit 3, and Agent 4 to bit 4. All agents are trusted except for Agent 3 who is untrusted. Also consider the register values in the below table."], "xhtml:table": {"xhtml:tr": [{"xhtml:th": ["Register", "Field description"]}, {"xhtml:td": ["AES_ENC_DEC_KEY_0", {"xhtml:br": null, "#text": "AES key [0:31] for encryption or decryptionDefault 0x00000000"}]}, {"xhtml:td": ["AES_ENC_DEC_KEY_1", {"xhtml:br": null, "#text": "AES key [32:63] for encryption or decryptionDefault 0x00000000"}]}, {"xhtml:td": ["AES_ENC_DEC_KEY_2", {"xhtml:br": null, "#text": "AES key [64:95] for encryption or decryptionDefault 0x00000000"}]}, {"xhtml:td": ["AES_ENC_DEC_KEY_3", {"xhtml:br": null, "#text": "AES key [96:127] for encryption or decryptionDefault 0x00000000"}]}]}, "xhtml:ul": {"xhtml:li": ["The AES_KEY_CONTROL_POLICY register defines which agents can write to the AES_KEY_READ_POLICY or AES_KEY_WRITE_POLICY registers.", "The AES_KEY_READ_POLICY register defines which agents can read the AES-key registers.", "The AES_KEY_WRITE_POLICY register defines which agents can write the AES key registers."]}}, "Example_Code": [{"@Nature": "Bad", "@Language": "Other", "xhtml:table": {"xhtml:tr": [{"xhtml:th": ["Register", "Field description"]}, {"xhtml:td": ["AES_KEY_CONTROL_POLICY", {"xhtml:br": null, "#text": "Controls which agents can write to READ_POLICY and WRITE_POLICY registers[31:0] Default 0x00000018"}]}, {"xhtml:td": ["AES_KEY_READ_POLICY", {"xhtml:br": null, "#text": "Controls which agents can read the AES-key registers[31:0] Default 0x00000002"}]}, {"xhtml:td": ["AES_KEY_WRITE_POLICY", {"xhtml:br": null, "#text": "Controls which agents can write to the AES-key registers[31:0] Default 0x00000004"}]}]}}, {"@Nature": "Good", "@Language": "Other", "xhtml:table": {"xhtml:tr": [{"xhtml:th": ["Register", "Field description"]}, {"xhtml:td": ["AES_KEY_CONTROL_POLICY", "[31:0] Default 0x00000010"]}, {"xhtml:td": ["AES_KEY_READ_POLICY", "[31:0] Default 0x00000002"]}, {"xhtml:td": ["AES_KEY_WRITE_POLICY", "[31:0] Default 0x00000004"]}]}}], "Body_Text": {"xhtml:p": ["The AES_KEY_CONTROL_POLICY register value is 0x00000018. In binary, the lower 8 bits will be 0001 1000, meaning that:", "The AES_KEY_READ_POLICY register value is 0x00000002. In binary, the lower 8 bits will be 0000 0010, meaning that:", "The AES_KEY_WRITE_POLICY register value is 0x00000004. In binary, the lower 8 bits will be 0000 0100, meaning that:", "The configured access control policy for Agents 1,2,3,4 is summarized in the table below.", "At this point, Agents 3 and 4 can only configure which agents can read AES keys and which agents can write AES keys. Agents 3 and 4 cannot read or write AES keys - just configure access control.", "Now, recall Agent 3 is untrusted. As explained above, the value of the AES_KEY_CONTROL_POLICY register gives agent 3 access to write to the AES_KEY_WRITE_POLICY register. Agent 3 can use this write access to add itself to the AES_KEY_WRITE_POLICY register. This is accomplished by Agent 3 writing the value 0x0000000C. In binary, the lower 8 bits are 0000 1100, meaning that bits 2 and 3 will be set. Thus, Agent 3 will be given the ability to write to the AES Key registers. If Agent 3 does not set bit 2, this would prevent Agent 2 from having write access, which could cause operational failures that could expose the attack (or be used for a denial of service).", "If the AES_KEY_CONTROL_POLICY register value is 0x00000010, the lower 8 bits will be 0001 0000. This will give Agent 4, a trusted agent, write access to AES_KEY_WRITE_POLICY, but Agent 3, who is untrusted, will not have write access. The Policy register values should therefore be as follows:"], "xhtml:ul": [{"xhtml:li": ["Bits 3 and 4 are set, thus Agents 3 and 4 will have write access to AES_KEY_READ_POLICY or AES_KEY_WRITE_POLICY.", "All other bits are clear, hence agents other than 3 and 4 will not have access to write to AES_KEY_READ_POLICY or AES_KEY_WRITE_POLICY."]}, {"xhtml:li": "Bit 1 is set, thus Agent 1 will be able to read the AES key registers."}, {"xhtml:li": "Bit 2 is set, thus Agent 2 will be able to write the AES Key registers."}], "xhtml:table": {"xhtml:tr": [{"xhtml:th": ["Agent", "Read", "Write", "Control"]}, {"xhtml:td": ["Agent 1", "Allowed", "Not Allowed", "Not Allowed"]}, {"xhtml:td": ["Agent 2", "Not Allowed", "Allowed", "Not Allowed"]}, {"xhtml:td": ["Agent 3", "Not Allowed", "Not Allowed", "Allowed"]}, {"xhtml:td": ["Agent 4", "Not Allowed", "Not Allowed", "Allowed"]}]}}}}, "Related_Attack_Patterns": {"Related_Attack_Pattern": {"@CAPEC_ID": "180"}}, "Mapping_Notes": {"Usage": "Allowed", "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.", "Reasons": {"Reason": {"@Type": "Acceptable-Use"}}}, "Notes": {"Note": {"@Type": "Maintenance", "#text": "This entry is still under development and will continue to see updates and content improvements."}}, "Content_History": {"Submission": {"Submission_Name": "Arun Kanuparthi, Hareesh Khattri, Parbati Kumar Manna, Narasimha Kumar V Mangipudi", "Submission_Organization": "Intel Corporation", "Submission_Date": "2020-02-12", "Submission_Version": "4.1", "Submission_ReleaseDate": "2020-02-24"}, "Modification": [{"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2020-08-20", "Modification_Version": "4.2", "Modification_ReleaseDate": "2020-08-20", "Modification_Comment": "updated Demonstrative_Examples, Description, Modes_of_Introduction, Name, Potential_Mitigations, Related_Attack_Patterns"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2021-10-28", "Modification_Version": "4.6", "Modification_ReleaseDate": "2021-10-28", "Modification_Comment": "updated Potential_Mitigations"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2022-04-28", "Modification_Version": "4.7", "Modification_ReleaseDate": "2022-04-28", "Modification_Comment": "updated Related_Attack_Patterns"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2022-10-13", "Modification_Version": "4.9", "Modification_ReleaseDate": "2022-10-13", "Modification_Comment": "updated Demonstrative_Examples"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-01-31", "Modification_Version": "4.10", "Modification_ReleaseDate": "2023-01-31", "Modification_Comment": "updated Demonstrative_Examples"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-04-27", "Modification_Version": "4.11", "Modification_ReleaseDate": "2023-04-27", "Modification_Comment": "updated Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-06-29", "Modification_Version": "4.12", "Modification_ReleaseDate": "2023-06-29", "Modification_Comment": "updated Mapping_Notes"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2025-12-11", "Modification_Version": "4.19", "Modification_ReleaseDate": "2025-12-11", "Modification_Comment": "updated Demonstrative_Examples, Relationships, Weakness_Ordinalities"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2026-04-30", "Modification_Version": "4.20", "Modification_ReleaseDate": "2026-04-30", "Modification_Comment": "updated Demonstrative_Examples"}], "Contribution": {"@Type": "Feedback", "Contribution_Name": "Jagadish Nayak", "Contribution_Organization": "Cycuity", "Contribution_Date": "2025-10-09", "Contribution_Version": "4.20", "Contribution_ReleaseDate": "2026-04-30", "Contribution_Comment": "Reported an incorrect value for Agent 3 in the demonstrative example, and suggested an alternative."}, "Previous_Entry_Name": {"@Date": "2020-08-20", "#text": "Agents Included in Control Policy are not Contained in Less-Privileged Policy"}}}
