{"id":5089,"date":"2023-09-11T19:31:48","date_gmt":"2023-09-11T19:31:48","guid":{"rendered":"http:\/\/cad4security.org\/?page_id=5089"},"modified":"2023-09-26T16:39:35","modified_gmt":"2023-09-26T16:39:35","slug":"soc-vulnerability-5","status":"publish","type":"page","link":"http:\/\/cad4security.org\/index.php\/riscv-vulnerability-details\/soc-vulnerability-5\/","title":{"rendered":"SoC Vulnerability #5"},"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; 1262<\/strong><\/h2>\n\n\n\n<p class=\"has-sm-font-size\">Unauthorized page access request in the memory management unit (MMU)<\/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>5<\/td><td><strong>CVA6 RISC-V CPU<\/strong>&nbsp;<\/td><td>If any memory page doesn\u2019t allow user-level access, no access should be given to the lower privilege-level users.<\/td><td><strong><strong><strong>Privilege Escalation:<\/strong> <\/strong><\/strong>Illegal access is given to lower privilege modes<\/td><td>Illegal memory page access from user privilege level<\/td><td>&nbsp;Software in the guest OS can access memory page without having the proper privilege permission.\u202f&nbsp;<br><strong>Possible attacks:<\/strong> Access control, Illegal interrupt, information leakage etc&nbsp;<\/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. The memory management unit (MMU) determines the memory page access permission for different privilege levels. This vulnerability allows any attacker to access supervisor or machine-level memory pages from user-level privilege mode without generating any data access error.<\/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 mmu;<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @(posedge clk_i) disable iff (!rst_ni) (ariane.ex_stage_i.lsu_i.i_mmu.icache_areq_i.fetch_req &amp;&amp; ((ariane.ex_stage_i.lsu_i.i_mmu.priv_lvl_i == riscv::PRIV_LVL_U) &amp;&amp; ~ariane.ex_stage_i.lsu_i.i_mmu.itlb_content.u)) |-&gt; (ariane.ex_stage_i.lsu_i.i_mmu.iaccess_err == 1);<br>&nbsp;<br>endproperty<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ap_vulnerability123: assert property (mmu);<\/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\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 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 illegal memory access (privilege violation) in the generated CEX (shown in Fig.2).&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>CWE-ID: &#8211; 1262<br \/>\nUnauthorized page access request in the memory management unit (MMU)<\/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\/5089"}],"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=5089"}],"version-history":[{"count":11,"href":"http:\/\/cad4security.org\/index.php\/wp-json\/wp\/v2\/pages\/5089\/revisions"}],"predecessor-version":[{"id":5262,"href":"http:\/\/cad4security.org\/index.php\/wp-json\/wp\/v2\/pages\/5089\/revisions\/5262"}],"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=5089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}