{"id":5077,"date":"2023-09-11T19:08:44","date_gmt":"2023-09-11T19:08:44","guid":{"rendered":"http:\/\/cad4security.org\/?page_id=5077"},"modified":"2023-09-26T16:36:45","modified_gmt":"2023-09-26T16:36:45","slug":"soc-vulnerability-2","status":"publish","type":"page","link":"http:\/\/cad4security.org\/index.php\/riscv-vulnerability-details\/soc-vulnerability-2\/","title":{"rendered":"SoC Vulnerability #2"},"content":{"rendered":"<div class=\"mai-columns has-xl-margin-bottom\"><div class=\"mai-columns-wrap has-columns\" style=\"--column-gap:var(--spacing-xl);--row-gap:var(--spacing-xl);--align-columns:start;--align-columns-vertical:initial;\">\n<div class=\"mai-column is-column\" style=\"--flex-xs:0 0 100%;--columns-sm:1\/2;--flex-sm:0 0 var(--flex-basis);--columns-md:1\/2;--flex-md:0 0 var(--flex-basis);--columns-lg:1\/3;--flex-lg:0 0 var(--flex-basis);\">\n\n<div class=\"wp-block-group has-alt-background-color has-background wp-container-content-1 is-layout-constrained wp-block-group-is-layout-constrained has-light-background has-no-content-width has-sm-padding-top has-sm-padding-bottom has-sm-padding-left has-sm-padding-right\"><div class=\"wp-block-group__inner-container\">\n<h3 class=\"wp-block-heading has-text-align-left is-style-subheading has-body-color has-text-color has-md-font-size\" style=\"font-style:normal;font-weight:100\">The domain of Attacks<\/h3>\n\n\n\n<p class=\"has-text-align-left has-black-color has-text-color has-sm-font-size\">Software<br>Hardware<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"><\/div><\/div>\n\n\n\n\n\n<div class=\"wp-block-group has-alt-background-color has-background wp-container-content-2 is-layout-constrained wp-block-group-is-layout-constrained has-light-background has-sm-padding-top has-sm-padding-bottom has-sm-padding-left has-sm-padding-right\"><div class=\"wp-block-group__inner-container\">\n<h3 class=\"wp-block-heading has-text-align-left is-style-subheading has-body-color has-text-color has-md-font-size\" style=\"font-style:normal;font-weight:100\">Attack Model<\/h3>\n\n\n\n<p class=\"has-text-align-left has-black-color has-text-color has-sm-font-size\">CAPEC-233: Privilege Escalation\u00a0<\/p>\n<\/div><\/div>\n\n\n\n<\/div>\n\n<div class=\"mai-column is-column\" style=\"--flex-xs:0 0 100%;--columns-sm:1\/2;--flex-sm:0 0 var(--flex-basis);--columns-md:1\/2;--flex-md:0 0 var(--flex-basis);--columns-lg:2\/3;--flex-lg:0 0 var(--flex-basis);--justify-content:start;\">\n\n<h2 class=\"wp-block-heading has-md-font-size\"><strong>CWE-ID: &#8211; 266<\/strong><\/h2>\n\n\n\n<p class=\"has-sm-font-size\">Hardware-based isolation and access control (e.g., identity, policy, locking control) of sensitive shared hardware resources such as registers and fuses, and information leakage.&nbsp;&nbsp;&nbsp;<\/p>\n\n<\/div>\n<\/div><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide has-xl-margin-bottom\">\n\n\n\n<h3 class=\"wp-block-heading is-style-subheading has-body-color has-text-color has-md-font-size has-no-margin-bottom\">Threat Model &#8211; Privilege Escalation <\/h3>\n\n\n\n\n<figure class=\"wp-block-table has-sm-font-size\"><table><thead><tr><th>Soc Vul. #<\/th><th>Name of Core<\/th><th>Security Requirement<\/th><th>Threat model description<\/th><th>Effect<\/th><th>SW attack model<\/th><\/tr><\/thead><tbody><tr><td>2<\/td><td><strong>CVA6 RISC-V CPU<\/strong>&nbsp;<\/td><td>Privilege level&nbsp;<br>should be in&nbsp;<br>Machine mode&nbsp;<\/td><td><strong>Privilege Escalation:<\/strong> Tweaked to User mode\/Supervisor mode<\/td><td>Changing the mode can have side-effects on address translation (e.g.: other instructions)&nbsp;<br>Re-fetch the next instruction by executing a flush&nbsp;<\/td><td>A software code will access M mode and S mode registers.\u202f&nbsp;<br><strong>Possible attacks:<\/strong> Access control, Illegal interrupt, information leakage etc<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Table 1. Attack model description <\/figcaption><\/figure>\n\n\n\n<div class=\"wp-block-group has-alt-background-color has-background is-layout-constrained wp-block-group-is-layout-constrained has-light-background has-sm-padding-top has-sm-padding-bottom has-sm-padding-left has-sm-padding-right has-xxl-margin-top has-xl-margin-bottom\"><div class=\"wp-block-group__inner-container\">\n<h3 class=\"wp-block-heading is-style-subheading has-body-color has-text-color has-md-font-size\">Description<\/h3>\n\n\n\n<p class=\"has-black-color has-text-color has-sm-font-size\">In a system-on-chip (SoC), software will commonly access the peripherals through a memory-mapped register interface. Thus, software can access only certain registers with respect to their privilege level hardcoded in the design. However, through the accessible register interface, malicious software could tamper the hardware data. This threat could allow any adversary to exploit a weakness enabling them to elevate their privilege and perform an action that they are not supposed to be authorized to perform.\u00a0\u00a0<\/p>\n<\/div><\/div>\n\n\n\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide has-xl-margin-bottom\">\n\n\n\n<h3 class=\"wp-block-heading is-style-subheading has-body-color has-text-color has-md-font-size has-no-margin-bottom\">Security Property<\/h3>\n\n\n\n\n<figure class=\"wp-block-table has-sm-font-size\"><table><tbody><tr><td>property one1;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @(posedge clk_i) (debug_req_i == 1&#8217;b0)|-&gt; (ariane.csr_regfile_i.priv_lvl_o == riscv::PRIV_LVL_S) or (ariane.csr_regfile_i.priv_lvl_o == riscv::PRIV_LVL_U) or (ariane.csr_regfile_i.priv_lvl_o == riscv::PRIV_LVL_M);&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; endproperty&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ap_vulnerability11: assert property (one1);&nbsp;&nbsp;<br>property one2;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @(posedge clk_i) (debug_req_i == 1&#8217;b1)|-&gt; (ariane.csr_regfile_i.priv_lvl_o == riscv::PRIV_LVL_M); \/\/machine mode is low-priviledged&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; endproperty&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ap_vulnerability12: assert property (one2);&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; property one3;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @(posedge clk_i) (debug_req_i == 1&#8217;b1)|-&gt; (ariane.csr_regfile_i.priv_lvl_o != riscv::PRIV_LVL_U);&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; endproperty&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ap_vulnerability13: assert property (one3);&nbsp;&nbsp;<br>property one4;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @(posedge clk_i) (debug_req_i == 1&#8217;b1)|-&gt; (ariane.csr_regfile_i.priv_lvl_o != riscv::PRIV_LVL_S) ;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; endproperty&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ap_vulnerability14: assert property (one4);&nbsp;&nbsp;<br>endmodule&nbsp;<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Table 2. Assertions\/properties to check privilege escalation in RISC-V design.<\/figcaption><\/figure>\n\n\n\n<div style=\"height:150px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"mai-columns\"><div class=\"mai-columns-wrap has-columns\" style=\"--column-gap:0px;--row-gap:var(--spacing-xl);--align-columns:start;--align-columns-vertical:initial;\">\n<div class=\"mai-column is-column has-md-padding has-border\" style=\"--flex-xs:0 0 100%;--columns-sm:1\/2;--flex-sm:0 0 var(--flex-basis);--columns-md:1\/2;--flex-md:0 0 var(--flex-basis);--columns-lg:2\/3;--flex-lg:0 0 var(--flex-basis);--justify-content:start;\">\n\n<h3 class=\"wp-block-heading has-text-align-left is-style-subheading has-body-color has-text-color has-md-font-size\">Procedure<\/h3>\n\n\n\n<ol class=\"has-black-color has-text-color has-sm-font-size\">\n<li>Invoke Cadence JG<\/li>\n\n\n\n<li>Run prove_tl.tcl script to check the assertion <\/li>\n\n\n\n<li>Violation in the assertion will generate CEX<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link button wp-element-button\">DOWNLOAD FILES<\/a><\/div>\n<\/div>\n\n<\/div>\n\n<div class=\"mai-column is-column\" style=\"--flex-xs:0 0 100%;--columns-sm:1\/2;--flex-sm:0 0 var(--flex-basis);--columns-md:1\/2;--flex-md:0 0 var(--flex-basis);--columns-lg:1\/3;--flex-lg:0 0 var(--flex-basis);\">\n\n<div class=\"wp-block-group has-alt-background-color has-background is-layout-constrained wp-block-group-is-layout-constrained has-light-background has-no-content-width has-sm-padding-top has-sm-padding-bottom has-sm-padding-left has-sm-padding-right\"><div class=\"wp-block-group__inner-container\">\n<h3 class=\"wp-block-heading has-text-align-left is-style-subheading has-body-color has-text-color has-md-font-size\" style=\"font-style:normal;font-weight:100\">Impact of Vulnerability<\/h3>\n\n\n\n<p class=\"has-text-align-left has-black-color has-text-color has-sm-font-size\">Loss of confidentiality and integrity of the SoC<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"><\/div><\/div>\n\n\n\n\n\n<div class=\"wp-block-group has-alt-background-color has-background is-layout-constrained wp-block-group-is-layout-constrained has-light-background has-no-content-width has-sm-padding-top has-sm-padding-bottom has-sm-padding-left has-sm-padding-right\"><div class=\"wp-block-group__inner-container\">\n<h3 class=\"wp-block-heading has-text-align-left is-style-subheading has-body-color has-text-color has-md-font-size\" style=\"font-style:normal;font-weight:100\">Severity<\/h3>\n\n\n\n<p class=\"has-text-align-left has-black-color has-text-color has-sm-font-size\">TBA (Metrics to evaluate the vulnerability impact)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"><\/div><\/div>\n\n\n\n\n\n<div class=\"wp-block-group has-alt-background-color has-background is-layout-constrained wp-block-group-is-layout-constrained has-light-background has-no-content-width has-sm-padding-top has-sm-padding-bottom has-sm-padding-left has-sm-padding-right\"><div class=\"wp-block-group__inner-container\">\n<h3 class=\"wp-block-heading has-text-align-left is-style-subheading has-body-color has-text-color has-md-font-size\" style=\"font-style:normal;font-weight:100\">tools used<\/h3>\n\n\n\n<p class=\"has-text-align-left has-black-color has-text-color has-sm-font-size\">Cadence JasperGold<\/p>\n<\/div><\/div>\n\n\n\n<\/div>\n<\/div><\/div>\n\n\n<div style=\"height:150px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"mai-divider mai-divider-curve alignfull flip-horizontal\" style=\"--divider-color:var(--color-alt);--divider-background-color:transparent;--divider-height:var(--padding-md);\"><svg fill=\"currentColor\" enable-background=\"new 0 0 1000 120\" preserveaspectratio=\"none\" viewbox=\"0 0 1000 120\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"mai-divider-svg\"><path d=\"M1000 120H0c533.3 0 866.7-40 1000-120v120z\"><\/path><\/svg><\/div>\n\n<div class=\"mai-divider mai-divider-curve alignfull flip-vertical\" style=\"--divider-color:var(--color-alt);--divider-background-color:transparent;--divider-height:var(--padding-md);\"><svg fill=\"currentColor\" enable-background=\"new 0 0 1000 120\" preserveaspectratio=\"none\" viewbox=\"0 0 1000 120\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"mai-divider-svg\"><path d=\"M1000 120H0c533.3 0 866.7-40 1000-120v120z\"><\/path><\/svg><\/div>\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading alignwide is-style-subheading has-body-color has-text-color\">Results (counter-example)<\/h3>\n\n\n\n\n\n\n<div class=\"wp-block-group has-alt-background-color has-background is-layout-constrained wp-block-group-is-layout-constrained has-light-background has-md-padding-top has-md-padding-bottom has-sm-padding-left has-sm-padding-right has-no-margin-top has-xxl-margin-bottom\"><div class=\"wp-block-group__inner-container\">\n<h4 class=\"wp-block-heading is-style-subheading has-body-color has-text-color has-md-font-size\">Counter-example insights<\/h4>\n\n\n\n<p class=\"has-black-color has-text-color has-md-font-size\">Fig.2 shows that the privilege escalation from M-mode to U-mode exists in the RISC-V design at the clock pulse of 264.<\/p>\n<\/div><\/div>\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>CWE-ID: &#8211; 266<br \/>\nHardware-based isolation and access control (e.g., identity, policy, locking control) of sensitive shared hardware resources such as registers and fuses, and information leakage.\u00a0\u00a0\u00a0<\/p>\n","protected":false},"author":10,"featured_media":3528,"parent":4639,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"acf":[],"_links":{"self":[{"href":"http:\/\/cad4security.org\/index.php\/wp-json\/wp\/v2\/pages\/5077"}],"collection":[{"href":"http:\/\/cad4security.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/cad4security.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/cad4security.org\/index.php\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"http:\/\/cad4security.org\/index.php\/wp-json\/wp\/v2\/comments?post=5077"}],"version-history":[{"count":10,"href":"http:\/\/cad4security.org\/index.php\/wp-json\/wp\/v2\/pages\/5077\/revisions"}],"predecessor-version":[{"id":5256,"href":"http:\/\/cad4security.org\/index.php\/wp-json\/wp\/v2\/pages\/5077\/revisions\/5256"}],"up":[{"embeddable":true,"href":"http:\/\/cad4security.org\/index.php\/wp-json\/wp\/v2\/pages\/4639"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/cad4security.org\/index.php\/wp-json\/wp\/v2\/media\/3528"}],"wp:attachment":[{"href":"http:\/\/cad4security.org\/index.php\/wp-json\/wp\/v2\/media?parent=5077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}