{"id":5080,"date":"2023-09-11T19:15:26","date_gmt":"2023-09-11T19:15:26","guid":{"rendered":"http:\/\/cad4security.org\/?page_id=5080"},"modified":"2023-09-26T16:38:48","modified_gmt":"2023-09-26T16:38:48","slug":"soc-vulnerability-4","status":"publish","type":"page","link":"http:\/\/cad4security.org\/index.php\/riscv-vulnerability-details\/soc-vulnerability-4\/","title":{"rendered":"SoC Vulnerability #4"},"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);\">\n\n<h2 class=\"wp-block-heading has-md-font-size\"><strong>CWE-ID: &#8211; 1272<\/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>4<\/td><td><strong>CVA6 RISC-V CPU<\/strong>&nbsp;<\/td><td>The privilege level should not be changed during a complete instruction execution<\/td><td><strong><strong>Privilege Escalation:<\/strong> <\/strong>Privilege level switched to lower privilege levels during the execution of an instruction<\/td><td>Changing the privilege level during an instruction can update the micro-architectural state to control and data registers (CSR)\u202f&nbsp;<\/td><td>&nbsp;Software in the guest OS can alter the privilege level during an instruction.\u202f\u202f&nbsp;<br><strong>Possible attacks:<\/strong> Access control, Illegal interrupt, information leakage etc\u202f<\/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), the software will commonly access the peripherals through a memory-mapped register interface. Thus, the 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 with the hardware data. During the execution of an instruction, the privilege level should not be altered. Changing the privilege level during this can lead to access control violations and possible integrity loss.\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 priv_viol;&nbsp;&nbsp;<br>&nbsp; @(posedge clk_i)&nbsp; disable iff (!rst_ni)&nbsp; ( ariane.csr_regfile_i.privilege_violation) |-&gt; (~ariane.csr_regfile_i.csr_we&nbsp; &amp;&amp; ~ariane.csr_regfile_i.csr_read );&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<div class=\"mai-columns has-xl-margin-top has-xl-margin-bottom\"><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 inside the cva6_master folder<\/li>\n\n\n\n<li>Run the prove_t1.tcl script to check the assertion.\u202f&nbsp;<\/li>\n\n\n\n<li>Violation in the assertion will generate CEX.\u202f\u202f&nbsp;<\/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<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 has-lg-margin-bottom\">Results (counter-example)<\/h3>\n\n\n\n\n<p>Fig.1 shows that the property (ref. Table.2) violates the RISC-V design, indicating the read\/write state change (privilege violation) in the generated CEX (shown in Fig.2).&nbsp;&nbsp;<\/p>\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>CWE-ID: &#8211; 1272<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\/5080"}],"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=5080"}],"version-history":[{"count":9,"href":"http:\/\/cad4security.org\/index.php\/wp-json\/wp\/v2\/pages\/5080\/revisions"}],"predecessor-version":[{"id":5260,"href":"http:\/\/cad4security.org\/index.php\/wp-json\/wp\/v2\/pages\/5080\/revisions\/5260"}],"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=5080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}