<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Turbofan on Arzedlab 🪵</title><link>https://arzedlab.github.io/tags/turbofan/</link><description>Recent content in Turbofan on Arzedlab 🪵</description><generator>Hugo</generator><language>en-us</language><copyright>© Ravshan</copyright><lastBuildDate>Sat, 30 Mar 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://arzedlab.github.io/tags/turbofan/index.xml" rel="self" type="application/rss+xml"/><item><title>CVE-2021-38003 The Hole Leak to RCE</title><link>https://arzedlab.github.io/posts/cve-2021-38003-the-hole-leak-to-rce-ed84a7ccd2664916bb597042d3423439/</link><pubDate>Sat, 30 Mar 2024 00:00:00 +0000</pubDate><guid>https://arzedlab.github.io/posts/cve-2021-38003-the-hole-leak-to-rce-ed84a7ccd2664916bb597042d3423439/</guid><description>&lt;h1 id="cve-2021-38003--the-hole-leak-to-rce">CVE-2021-38003 | The Hole Leak to RCE&lt;/h1>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>Type Of Vulnerability&lt;/strong>&lt;/th>
 &lt;th>The Hole Leak&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;strong>Security Severity&lt;/strong>&lt;/td>
 &lt;td>&lt;strong>High&lt;/strong>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Effected Components&lt;/strong>&lt;/td>
 &lt;td>&lt;strong>Javascript, Turbofan&lt;/strong>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Issue Source&lt;/strong>&lt;/td>
 &lt;td>&lt;a href="https://issues.chromium.org/issues/40057710">https://issues.chromium.org/issues/40057710&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Writeup Source(s)&lt;/strong>&lt;/td>
 &lt;td>None&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Tested Version&lt;/strong>&lt;/td>
 &lt;td>Google Chrome 95.0.4638.54 (Official Build) (x86_64)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Vulnerable commit&lt;/strong>&lt;/td>
 &lt;td>a4252db3228433fed5c2bdb0fdff9a6b7b638f3b&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h1 id="deep-dive-into-vulnerability">Deep Dive Into Vulnerability&lt;/h1>
&lt;p>[1] The vulnerability arises as V8 attempts to handle exceptions in &lt;code>JSON.stringify()&lt;/code>. If a exception appears in the built-in function, &lt;code>pending_exception_&lt;/code> is set by the &lt;code>Isolate::set_pending_exception()&lt;/code> method. The calling code then moves to the V8 exception handling mechanism, where the &lt;code>Isolate::pending_exception()&lt;/code> member is fetched from the active isolate and the currently active JavaScript exception handler is invoked using it.&lt;/p></description></item><item><title>CVE-2020-6418 Type Confusion V8</title><link>https://arzedlab.github.io/posts/cve-2020-6418-incorrect-optimization-52d04cb78c1e47608e7874b83db5dcce/</link><pubDate>Fri, 02 Feb 2024 13:13:13 +0500</pubDate><guid>https://arzedlab.github.io/posts/cve-2020-6418-incorrect-optimization-52d04cb78c1e47608e7874b83db5dcce/</guid><description>&lt;h1 id="cve-2020-6418--incorrect-optimization">CVE-2020-6418 | Incorrect Optimization&lt;/h1>
&lt;h2 id="research-done-by-ravshan-rikhsiev-2023">&lt;strong>Research Done By Ravshan Rikhsiev (2023)&lt;/strong>&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>Type Of Vulnerability&lt;/strong>&lt;/th>
 &lt;th>Type Confusion&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;strong>Security Severity&lt;/strong>&lt;/td>
 &lt;td>&lt;strong>High&lt;/strong>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Effected Components&lt;/strong>&lt;/td>
 &lt;td>&lt;strong>Javascript, Turbofan, Optimizer&lt;/strong>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Issue Source&lt;/strong>&lt;/td>
 &lt;td>&lt;a href="https://issues.chromium.org/issues/40051542">https://issues.chromium.org/issues/40051542&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Writeup Source(s)&lt;/strong>&lt;/td>
 &lt;td>Later&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Tested Version&lt;/strong>&lt;/td>
 &lt;td>V8 8.2.0&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Vulnerable commit&lt;/strong>&lt;/td>
 &lt;td>bdaa7d66a37adcc1f1d81c9b0f834327a74ffe07&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>CVE-2020-6418&lt;/strong> is a security vulnerability that was identified in the V8 JavaScript engine, which is used in various web browsers including Google Chrome. This vulnerability was &lt;em>reported by Clement Lecigne of Google&amp;rsquo;s Threat Analysis Group on 2020-02-18&lt;/em> [1] and assigned CVE-2020-6418. It was classified as a type confusion bug in the V8 engine.&lt;/p></description></item><item><title>CVE-2019-5782 Out-Of-Bounds V8</title><link>https://arzedlab.github.io/posts/cve-2019-5782-oob-v8-f710491993d8478483ca99402710ec07/</link><pubDate>Fri, 01 Dec 2023 13:13:13 +0500</pubDate><guid>https://arzedlab.github.io/posts/cve-2019-5782-oob-v8-f710491993d8478483ca99402710ec07/</guid><description>&lt;h1 id="cve-2019-5782--oob-v8">CVE-2019-5782 | OOB V8&lt;/h1>
&lt;h1 id="research-done-by-ravshan-rikhsiev-2023">Research Done By &lt;strong>Ravshan Rikhsiev&lt;/strong> (2023)&lt;/h1>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>Type Of Vulnerability&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Out-Of-Bounds&lt;/strong>&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;strong>Security Severity&lt;/strong>&lt;/td>
 &lt;td>&lt;strong>High&lt;/strong>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Effected Components&lt;/strong>&lt;/td>
 &lt;td>&lt;strong>Javascript, Turbofan, Compiler&lt;/strong>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Issue Source&lt;/strong>&lt;/td>
 &lt;td>&lt;a href="https://bugs.chromium.org/p/chromium/issues/detail?id=906043">https://bugs.chromium.org/p/chromium/issues/detail?id=906043&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Writeup Source(s)&lt;/strong>&lt;/td>
 &lt;td>None&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Tested Version&lt;/strong>&lt;/td>
 &lt;td>V8 7.3.0&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Vulnerable commit&lt;/strong>&lt;/td>
 &lt;td>18b28402118b7918512c3e5b6bc5c6f348d43564&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h1 id="building">Building&lt;/h1>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>mkdir v8
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8be9fd;font-style:italic">cd&lt;/span> v8
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>fetch v8
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8be9fd;font-style:italic">cd&lt;/span> v8
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6272a4"># Moving into vulnerable commit&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>git checkout 18b28402118b7918512c3e5b6bc5c6f348d43564
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6272a4"># Sync depot tools&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>gclient sync -D
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6272a4"># Installing dependencies &lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>build/install-build-deps.sh
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6272a4"># Installing ninja to build&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sudo apt install -y ninja-build
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6272a4"># Release and Debug versions of V8&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>tools/dev/gm.py x64.release; tools/dev/gm.py x64.debug
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h1 id="incorrect-optimization-assumptions-in-v8">&lt;strong>Incorrect optimization assumptions in V8&lt;/strong>&lt;/h1>
&lt;p>&lt;strong>Turbofan&lt;/strong> is an optimizing compiler in the &lt;strong>V8&lt;/strong> JavaScript engine. It translates JavaScript code into highly optimized machine code for better performance. It uses various techniques, such as inlining functions, optimizing data types, and eliminating unnecessary operations, to generate efficient code. This helps improve the execution speed of JavaScript programs running in V8.&lt;/p></description></item></channel></rss>