2040
debug_mode_d = dcsr_q.ebreaku;
...
assign priv_lvl_o = (debug_mode_q && umode_i) ? riscv::PRIV_LVL_M : priv_lvl_q;
...
debug_mode_q <= debug_mode_d;
...
Observed Examples
Reference Description
CVE-2019-18827 After ROM code execution, JTAG access is disabled. But before the ROM
code is executed, JTAG access is possible, allowing a user full system access.
This allows a user to modify the boot flow and successfully bypass the secureboot
process.
https://www.cve.org/CVERecord?id=CVE-2019-18827
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 1207 Debug and Test Problems 1194 2474
MemberOf 1343 Weaknesses in the 2021 CWE Most Important
Hardware Weaknesses List
1343 2592
MemberOf 1396 Comprehensive Categorization: Access Control 1400 2519
Notes
Relationship
CWE-1191 and CWE-1244 both involve physical debug access, but the weaknesses are
different. CWE-1191 is effectively about missing authorization for a debug interface, i.e. JTAG.
CWE-1244 is about providing internal assets with the wrong debug access level, exposing the
asset to untrusted debug agents.
Related Attack Patterns
CAPEC-ID Attack Pattern Name
114 Authentication Abuse
References
[REF-1056]F-Secure Labs. "Multiple Vulnerabilities in Barco Clickshare: JTAG access is not
permanently disabled". < https://labs.f-secure.com/advisories/multiple-vulnerabilities-in-barcoclickshare/
>.
[REF-1057]Kurt Rosenfeld and Ramesh Karri. "Attacks and Defenses for JTAG". < https://
ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=5406671 >.
[REF-1219]Monodeep Kar, Arvind Singh, Santosh Ghosh, Sanu Mathew, Anand Rajan, Vivek
De, Raheem Beyah and Saibal Mukhopadhyay. "Blindsight: Blinding EM Side-Channel Leakage
using Built-In Fully Integrated Inductive Voltage Regulator". 2018 February. < https://arxiv.org/
pdf/1802.09096.pdf >.2023-04-07.
[REF-1377]"csr_regile.sv line 938". 2021. < https://github.com/HACK-EVENT/hackatdac19/
blob/57e7b2109c1ea2451914878df2e6ca740c2dcf34/src/csr_regfile.sv#L938 >.2023-12-13.
[REF-1378]"Fix for csr_regfile.sv line 938". 2021. < https://github.com/HACK-EVENT/hackatdac19/
blob/a7b61209e56c48eec585eeedea8413997ec71e4a/src/csr_regfile.sv#L938C31-L938C56
>.2023-12-13.
CWE Version 4.14
CWE-1245: Improper Finite State Machines (FSMs) in Hardware Logic
CWE-1245: Improper Finite State Machines (FSMs) in Hardware Logic