{"id":125,"date":"2020-05-12T04:20:18","date_gmt":"2020-05-12T11:20:18","guid":{"rendered":"https:\/\/blog.mozilla.org\/attack-and-defense\/?p=125"},"modified":"2020-06-16T07:24:13","modified_gmt":"2020-06-16T14:24:13","slug":"fuzzing-firefox-with-webidl","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/attack-and-defense\/2020\/05\/12\/fuzzing-firefox-with-webidl\/","title":{"rendered":"Fuzzing Firefox with WebIDL"},"content":{"rendered":"<div style=\"display:none\"><\/div>\n<h2>TL;DR, An Introduction<\/h2>\n<p><a href=\"https:\/\/hacks.mozilla.org\/2020\/04\/fuzzing-with-webidl\/\"><small><em>This post originally appeared on Mozilla Hacks.<\/em><\/small><\/a><\/p>\n<p><em>Fuzzing<\/em>, or fuzz testing, is an automated approach for testing the safety and stability of software. It\u2019s typically performed by supplying specially crafted inputs to identify unexpected or even dangerous behavior. If you\u2019re unfamiliar with the basics of fuzzing, you can find lots more information in the <a href=\"https:\/\/firefox-source-docs.mozilla.org\/tools\/fuzzing\/index.html\" target=\"_blank\" rel=\"noopener noreferrer\">Firefox Fuzzing Docs<\/a> and the <a href=\"https:\/\/www.fuzzingbook.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Fuzzing Book<\/a>.<\/p>\n<p>For the past 3 years, the Firefox fuzzing team has been developing a new fuzzer to help identify security vulnerabilities in the implementation of WebAPIs in Firefox. This fuzzer, which we\u2019re calling Domino, leverages the WebAPIs&#8217; own <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Glossary\/WebIDL\" target=\"_blank\" rel=\"noopener noreferrer\">WebIDL<\/a> definitions as a fuzzing grammar. Our approach has led to the identification of over <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1340565\" target=\"_blank\" rel=\"noopener noreferrer\">850 bugs<\/a>. 116 of those bugs have received a security rating. In this post, I\u2019d like to discuss some of Domino\u2019s key features and how they differ from our previous WebAPI fuzzing efforts.<\/p>\n<h2>Fuzzing Basics<\/h2>\n<p>Before we begin discussing what Domino is and how it works, we first need to discuss the types of fuzzing techniques available to us today.<\/p>\n<h3>Types of Fuzzers<\/h3>\n<p>Fuzzers are typically classified as either blackbox, greybox, or whitebox. These designations are based upon the level of communication between the fuzzer and the target application. The two most common types are blackbox and greybox fuzzers.<\/p>\n<h4>Blackbox Fuzzing<\/h4>\n<p>Blackbox fuzzing submits data to the target application with essentially no knowledge of how that data affects the target. Because of this restriction, the effectiveness of a blackbox fuzzer is based entirely on the fitness of the generated data.<\/p>\n<p>Blackbox fuzzing is often used for large, non-deterministic applications or those which process highly structured data.<\/p>\n<h4>Whitebox Fuzzing<\/h4>\n<p>Whitebox fuzzing enables direct correlation between the fuzzer and the target application in order to generate data that satisfies the application\u2019s \u201crequirements\u201d. This typically involves the use of theorem solvers to evaluate branch conditions and generate data to intentionally exercise all branches. In doing so, the fuzzer can test hard-to-reach branches that might never be tested by blackbox or greybox fuzzers.<\/p>\n<p>The downside of this type of fuzzing\u2014it is computationally expensive. Large applications with complex branching may require a significant amount of time to solve. This greatly reduces the number of inputs tested. Outside of academic exercises, whitebox fuzzing is often not feasible for real-world applications.<\/p>\n<h4>Greybox Fuzzing<\/h4>\n<p>Greybox fuzzing has emerged as one of the most popular and effective fuzzing techniques. These fuzzers implement a feedback mechanism, typically via instrumentation, to inform decisions on what data to generate in the future. Inputs which appear to cover more code are reused as the basis for later tests. Inputs which decrease coverage are discarded.<\/p>\n<p>This method is incredibly popular due to its speed and efficiency in reaching obscure code paths. However, not all targets are good candidates for greybox fuzzing. Greybox fuzzing typically works best with <a href=\"https:\/\/llvm.org\/docs\/LibFuzzer.html#id22\" target=\"_blank\" rel=\"noopener noreferrer\">smaller, deterministic targets that can process a large number of inputs quickly<\/a> (several hundred a second).<\/p>\n<blockquote><p><i>We often use these types of fuzzers to test individual components within Firefox such as media parsers. If you\u2019re interested in learning how to leverage these fuzzers to test your code, take a look at the Fuzzing Interface documentation<\/i><a href=\"https:\/\/firefox-source-docs.mozilla.org\/tools\/fuzzing\/fuzzing_interface.html\" target=\"_blank\" rel=\"noopener noreferrer\"> <i>here<\/i><\/a><i>.<\/i><\/p><\/blockquote>\n<p>Unfortunately, we are somewhat limited in the techniques that we can use when fuzzing WebAPIs. The browser by nature is non-deterministic and the input is highly structured. Additionally, the process of starting the browser, executing tests, and monitoring for faults is slow (several seconds to minutes per test). With these limitations, blackbox fuzzing is the most appropriate solution.<\/p>\n<p>However, since the inputs expected by these APIs are highly structured, we need to ensure that our fuzzer generates data that is considered valid.<\/p>\n<h3>Grammar-Based Fuzzing<\/h3>\n<p>Grammar-based fuzzing is a fuzzing technique that uses a formal language grammar to define the structure of the data to be generated. These grammars are typically represented in plain-text and use a combination of symbols and constants to represent the data. The fuzzer can then parse the grammar and use it to generate fuzzed output.<\/p>\n<p><a href=\"https:\/\/hacks.mozilla.org\/files\/2020\/04\/Untitled-drawing.svg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-46105 \" role=\"img\" src=\"https:\/\/hacks.mozilla.org\/files\/2020\/04\/Untitled-drawing.svg\" alt=\"A screenshot showing a side-by-side comparison of the grammars of two fuzzers, Domato and Dharma\" width=\"623\" height=\"395\" \/><\/a><\/p>\n<p>The examples here demonstrate two simplified grammar excerpts from the <a href=\"https:\/\/github.com\/googleprojectzero\/domato\" target=\"_blank\" rel=\"noopener noreferrer\">Domato<\/a> and <a href=\"https:\/\/github.com\/MozillaSecurity\/dharma\" target=\"_blank\" rel=\"noopener noreferrer\">Dharma<\/a> fuzzers. These grammars describe the process of creating an <code><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/HTMLCanvasElement\" target=\"_blank\" rel=\"noopener noreferrer\">HTMLCanvasElement<\/a><\/code> and manipulating its properties and operations.<\/p>\n<h4>Issues with Traditional Grammars<\/h4>\n<p>Unfortunately, the level of effort required to develop a grammar is directly proportional to the size and complexity of the data you\u2019re attempting to represent. This is the biggest downside of grammar-based fuzzing. For reference, WebAPIs in Firefox expose over 730 interfaces with approximately 6300 members. Keep in mind, this number does not account for other required data structures like callbacks, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Enumerated_type\" target=\"_blank\" rel=\"noopener noreferrer\">enums<\/a>, or dictionaries, to name a few. Creating a grammar to describe these APIs accurately would be a huge undertaking; not to mention error-prone and difficult to maintain.<\/p>\n<p>To more effectively fuzz these APIs, we wanted to avoid as much manual grammar development as possible.<\/p>\n<p>&nbsp;<\/p>\n<h2>WebIDL as a Fuzzing Grammar<\/h2>\n<pre><code>typedef (BufferSource or Blob or USVString) BlobPart;\r\n\r\n[Exposed=(Window,Worker)]\r\ninterface Blob {\r\n [Throws]\r\n constructor(optional sequence blobParts,\r\n             optional BlobPropertyBag options = {});\r\n\r\n [GetterThrows]\r\n readonly attribute unsigned long long size;\r\n readonly attribute DOMString type;\r\n\r\n [Throws]\r\n Blob slice(optional [Clamp] long long start,\r\n            optional [Clamp] long long end,\r\n            optional DOMString contentType);\r\n [NewObject, Throws] ReadableStream stream();\r\n [NewObject] Promise text();\r\n [NewObject] Promise arrayBuffer();\r\n\r\n};\r\n\r\nenum EndingType { \"transparent\", \"native\" };\r\n\r\ndictionary BlobPropertyBag {\r\n DOMString type = \"\";\r\n EndingType endings = \"transparent\";\r\n};<\/code><\/pre>\n<p style=\"text-align: center;\"><i>A simplified example of the Blob WebIDL definition<\/i><\/p>\n<p><a href=\"https:\/\/heycam.github.io\/webidl\/\" target=\"_blank\" rel=\"noopener noreferrer\">WebIDL<\/a>, is an <a href=\"https:\/\/en.wikipedia.org\/wiki\/Interface_description_language\">interface description language<\/a> (IDL) for describing the APIs implemented by browsers. It lists the interfaces, members, and values exposed by those APIs as well as the syntax.<\/p>\n<p>The WebIDL definitions are well known among the browser fuzzing community because of the wealth of information contained within them. Previous work has been done in this area to extract the data from these IDLs for use as a fuzzing grammar, namely the <a href=\"https:\/\/sensepost.com\/blog\/2015\/wadi-fuzzer\/\" target=\"_blank\" rel=\"noopener noreferrer\">WADI fuzzer from Sensepost<\/a>. However, in each example we investigated, we found that the information from these definitions was extracted and re-implemented using the fuzzer\u2019s native grammar syntax. This approach still requires a significant amount of manual effort. And further, the fuzzing grammars&#8217; syntax make it difficult, if not impossible in some instances, to describe behaviors specific to WebAPIs.<\/p>\n<p>Based on these issues, we decided to use the WebIDL definitions directly, rather than converting them to an existing fuzzing grammar syntax. This approach provides us with a number of benefits.<\/p>\n<h3>Standardized Grammar<\/h3>\n<p>First and foremost, the WebIDL specification defines a standardized grammar to which these definitions must adhere. This lets us leverage existing tools, such as <a href=\"https:\/\/github.com\/w3c\/webidl2.js\/\" target=\"_blank\" rel=\"noopener noreferrer\">WebIDL2.js<\/a>, for parsing the raw WebIDL definitions and converting them into an <a href=\"https:\/\/en.wikipedia.org\/wiki\/Abstract_syntax_tree\" target=\"_blank\" rel=\"noopener noreferrer\">abstract syntax tree<\/a> (AST). Then this AST can be interpreted by the fuzzer to generate testcases.<\/p>\n<h3>Simplified Grammar Development<\/h3>\n<p>Second, the WebIDL defines the structure and behavior of the APIs we intend to target. Thus, we significantly reduce the amount of required rule development. In contrast, if we were to describe these APIs using one of the previously mentioned grammars, we would have to create individual rules for each interface, member, and value defined by the API.<\/p>\n<h3>ECMAScript Extended Attributes<\/h3>\n<p>Unlike traditional grammars, which only define the structure of data, the WebIDL specification provides additional information regarding the interface\u2019s behavior via ECMAScript extended attributes. Extended attributes can describe a variety of behaviors including:<\/p>\n<ul>\n<li>The contexts where a particular interface can be used.<\/li>\n<li>Whether the returned object is a new or duplicate instance.<\/li>\n<li>If the member instance can be replaced.<\/li>\n<\/ul>\n<p>These types of behaviors are not typically represented by traditional grammars.<\/p>\n<h3>Automatic Detection of API Changes<\/h3>\n<p>Finally, since the WebIDL files are linked with the interfaces implemented by the browser, we can ensure that updates to the WebIDL reflect updates to the interface.<\/p>\n<p>&nbsp;<\/p>\n<h2>Transforming IDL to JavaScript<\/h2>\n<p style=\"text-align: center;\"><a href=\"https:\/\/hacks.mozilla.org\/files\/2020\/04\/WebIDL-Inference2.svg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-46101\" role=\"img\" src=\"https:\/\/2r4s9p1yi1fa2jd7j43zph8r-wpengine.netdna-ssl.com\/files\/2020\/04\/WebIDL-Inference2.svg\" alt=\"screenshot of an AST generated using the WebIDL2.js library to parse the IDL\" width=\"623\" height=\"395\" \/><\/a><\/p>\n<p>In order to leverage WebIDL for fuzzing, we first need to parse it. Fortunately for us, we can use the <a href=\"https:\/\/github.com\/w3c\/webidl2.js\/\" target=\"_blank\" rel=\"noopener noreferrer\">WebIDL2.js<\/a> library to convert the raw IDL files into an <a href=\"https:\/\/en.wikipedia.org\/wiki\/Abstract_syntax_tree\" target=\"_blank\" rel=\"noopener noreferrer\">abstract-syntax tree<\/a> (AST). The AST generated by WebIDL2.js describes the data as a series of nodes on a tree. Each of these nodes defines some construct of the WebIDL syntax.<\/p>\n<blockquote><p><i>Further information on the WebIDL2 AST structure can be found <\/i><a href=\"https:\/\/github.com\/w3c\/webidl2.js\/#ast-abstract-syntax-tree\" target=\"_blank\" rel=\"noopener noreferrer\"><i>here<\/i><\/a><i>.<\/i><\/p><\/blockquote>\n<p>Once we have our AST, we simply need to define translations for each of these constructs. In Domino, we\u2019ve implemented a series of tools for traversing the AST and translating AST nodes into JavaScript. The diagram above demonstrates a few of these translations.<\/p>\n<p>Most of these nodes can be represented using a static translation. This means that a construct in the AST will always have the same representation in JavaScript. For example, the constructor keyword will always be replaced with the JavaScript \u201cnew\u201d operator in combination with the interface name. There are however, several instances where the WebIDL construct can have many meanings and must be generated dynamically.<\/p>\n<h3>Generic Types<\/h3>\n<p>The <a href=\"https:\/\/heycam.github.io\/webidl\/#idl-types\" target=\"_blank\" rel=\"noopener noreferrer\">WebIDL specification<\/a> lists a number of types used for representing generic values. For each of these types, Domino implements a function that will either return a randomly generated value matching the requested type or a previously recorded object of the same type. For example, when iterating over the AST, occurrences of the numeric types <em>octet<\/em>, <em>short<\/em>, and <em>long<\/em> will return values within those numeric ranges.<\/p>\n<h3>Object References<\/h3>\n<p>In places where the construct type references another IDL definition and is used as an argument, these values require an object instance of that IDL type. When one of these values is identified, Domino will attempt to create a new instance of the object (via its constructor). Or, it will attempt to do so by identifying and accessing another member which returns an object of that type.<\/p>\n<h3>Callback Handlers<\/h3>\n<p>The WebIDL specification also defines a number of types which represent functions (i.e., <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Promise\" target=\"_blank\" rel=\"noopener noreferrer\">promises<\/a>, <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Glossary\/Callback_function\" target=\"_blank\" rel=\"noopener noreferrer\">callbacks<\/a>, and <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/EventListener\" target=\"_blank\" rel=\"noopener noreferrer\">event listeners<\/a>). For each of these types, Domino will generate a unique function that performs random operations on the supplied arguments (if present.<\/p>\n<p>Of course the steps above only account for a small fraction of what is necessary to fully translate the IDLs to JavaScript. Domino\u2019s generator implements support for the entire WebIDL specification. Let\u2019s take a look at what our output might look like using the Blob WebIDL as a fuzzing grammar.<\/p>\n<h2>Zero Configuration Fuzzing<\/h2>\n<pre><code>&gt; const { Domino } = require('~\/domino\/dist\/src\/index.js')\r\n&gt; const { Random } = require('~\/domino\/dist\/src\/strategies\/index.js')\r\n&gt; const domino = new Domino(blob, { strategy: Random, output: '~\/test\/' })\r\n&gt; domino.generateTestcase()\r\n\u2026\r\n\r\nconst o = []\r\no[2] = new ArrayBuffer(8484)\r\no[1] = new Float64Array(o[2])\r\no[0] = new Blob([o[1]])\r\no[0].text().then(function (arg0) {\r\n o[0].text().then(function (arg1) {\r\n   o[3] = o[0].slice()\r\n   o[3].stream()\r\n   o[3].slice(65535, 1, \u2018foobar\u2019)\r\n })\r\n})\r\no[0].arrayBuffer().then(function (arg2) {\r\n o[3].text().then(function (arg3) {\r\n   O[4] = arg3\r\n   o[0].slice()\r\n })\r\n})<\/code><\/pre>\n<p>As we can see here, the information provided by the IDL is enough to generate valid testcases. These cases exercise a fairly large portion of the Blob-related code. In turn, this allows us to quickly develop baseline fuzzers for new APIs with zero manual intervention.<\/p>\n<p>Unfortunately, not everything is as precise as we would prefer. Take, for instance, the values supplied to the slice operation. After reviewing the <a href=\"https:\/\/w3c.github.io\/FileAPI\/#dfn-slice\" target=\"_blank\" rel=\"noopener noreferrer\">Blob specification<\/a>, we see that the start and end arguments are expected to be byte-order positions relative to the size of the Blob. We\u2019re currently generating these numbers at random. As such, it seems unlikely that we&#8217;ll be able to return values within the limits of the Blob length.<\/p>\n<p>Furthermore, both the <code>contentType<\/code> argument of the slice operation and the type property on the <code>BlobPropertyBag<\/code> dictionary are defined as <code><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/DOMString\" target=\"_blank\" rel=\"noopener noreferrer\">DOMString<\/a><\/code>. Similar to our numeric values, we generate strings at random. However, further review of the specification indicates that these values are used to represent the media type of the Blob data. Now, it doesn\u2019t appear that this value has much effect on the Blob object directly. Nevertheless, we can\u2019t be certain that these values won\u2019t have an effect on the APIs which consume these Blobs.<\/p>\n<p>To address these issues, we needed to develop a way of differentiating between these generic types.<\/p>\n<h2>Rule Patching with GrIDL<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-127 size-large\" src=\"http:\/\/blog.mozilla.org\/attack-and-defense\/files\/2020\/05\/GrIDL-Domino-Relationship2-600x489.png\" alt=\"\" width=\"600\" height=\"489\" srcset=\"https:\/\/blog.mozilla.org\/attack-and-defense\/files\/2020\/05\/GrIDL-Domino-Relationship2-600x489.png 600w, https:\/\/blog.mozilla.org\/attack-and-defense\/files\/2020\/05\/GrIDL-Domino-Relationship2-300x245.png 300w, https:\/\/blog.mozilla.org\/attack-and-defense\/files\/2020\/05\/GrIDL-Domino-Relationship2-768x627.png 768w, https:\/\/blog.mozilla.org\/attack-and-defense\/files\/2020\/05\/GrIDL-Domino-Relationship2-1000x816.png 1000w, https:\/\/blog.mozilla.org\/attack-and-defense\/files\/2020\/05\/GrIDL-Domino-Relationship2.png 1520w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Out of this need, we developed another tool named GrIDL. GrIDL leverages the WebIDL2.js library for converting our IDL definitions into an AST. It also makes several optimizations to the AST to better support its use as a fuzzing grammar.<\/p>\n<p>However, the most interesting feature of GrIDL is this: We can dynamically patch IDL declarations where a more precise value is required. Using a rule-based matching system, GrIDL identifies the target value and inserts a unique identifier. Those identifiers correspond with a matching generator implemented by Domino. While iterating over the AST, if one of these identifiers is encountered, Domino calls the matching generator and emits the value returned.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-128 size-large\" src=\"http:\/\/blog.mozilla.org\/attack-and-defense\/files\/2020\/05\/GrIDL-Markup-and-Generators-600x154.png\" alt=\"\" width=\"600\" height=\"154\" srcset=\"https:\/\/blog.mozilla.org\/attack-and-defense\/files\/2020\/05\/GrIDL-Markup-and-Generators-600x154.png 600w, https:\/\/blog.mozilla.org\/attack-and-defense\/files\/2020\/05\/GrIDL-Markup-and-Generators-300x77.png 300w, https:\/\/blog.mozilla.org\/attack-and-defense\/files\/2020\/05\/GrIDL-Markup-and-Generators-768x197.png 768w, https:\/\/blog.mozilla.org\/attack-and-defense\/files\/2020\/05\/GrIDL-Markup-and-Generators.png 812w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>The diagram above demonstrates the correlation between GrIDL identifiers and Domino generators. Here we\u2019ve defined two generators. One returns byte offsets and the other returns a valid MIME type.<\/p>\n<p>It\u2019s important to note that each generator will also receive access to a live representation of the current object being fuzzed. This provides us with the ability to generate values informed by the current state of the object.<\/p>\n<blockquote><p>In the example above, we leverage this object to generate byte offsets for the slice function that are relative to its length. However, consider any of the attributes or operations associated with the WebGLRenderingContextBase interface. This interface could be implemented by either a WebGL or WebGL2 context. The arguments required by each may vary drastically. By referencing the current object being fuzzed, we can determine the context type and return values accordingly.<\/p><\/blockquote>\n<pre><code>&gt; domino.generateTestcase()\r\n\u2026\r\nconst o = []\r\no[1] = new Uint8Array(14471)\r\no[0] = new Blob([null, null, o[1]], {\r\n'type': 'image\/*',\r\n'endings': 'transparent'\r\n})\r\no[2] = o[0].slice((1642420336 % o[0].size), (3884321603 % o[0].size), 'application\/xhtml+xml')\r\no[0].arrayBuffer().then(function (arg0) {\r\n  setTimeout(function () { o[0].text().then(function (arg1) { o[0].stream() }) }, 180)\r\n  o[2].arrayBuffer().then(function (arg2) {\r\n    o[0].slice((3412050218 % o[0].size), (646665894 % o[0].size), 'text\/plain')\r\n    o[0].stream()\r\n  })\r\n  o[2].text().then(function (arg3) {\r\n    o[2].slice((2025414481 % o[2].size), (2615146387 % o[2].size), 'text\/html')\r\n    o[3] = o[0].slice((753872984 % o[0].size), (883984089 % o[0].size), 'text\/xml')\r\n    o[3].stream()\r\n  })\r\n})\r\n<\/code><\/pre>\n<p>With our newly created rules, we\u2019re now able to generate values that more closely resemble those described by the specification.<\/p>\n<p>&nbsp;<\/p>\n<h2>Real-World Examples<\/h2>\n<p>The examples included in this post have been greatly simplified. It can often be hard to see how an approach like this might be applied to more complex APIs. With that, I\u2019d like to leave you with an example of one of the more complex vulnerabilities uncovered by Domino.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-129 size-large\" src=\"http:\/\/blog.mozilla.org\/attack-and-defense\/files\/2020\/05\/Bug-15585221-600x444.png\" alt=\"\" width=\"600\" height=\"444\" srcset=\"https:\/\/blog.mozilla.org\/attack-and-defense\/files\/2020\/05\/Bug-15585221-600x444.png 600w, https:\/\/blog.mozilla.org\/attack-and-defense\/files\/2020\/05\/Bug-15585221-300x222.png 300w, https:\/\/blog.mozilla.org\/attack-and-defense\/files\/2020\/05\/Bug-15585221.png 682w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>In <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1558522\" target=\"_blank\" rel=\"noopener noreferrer\">bug 1558522<\/a>, we identified a critical <a href=\"https:\/\/en.wikipedia.org\/wiki\/Dangling_pointer\" target=\"_blank\" rel=\"noopener noreferrer\">use-after-free<\/a> vulnerability affecting the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/IndexedDB_API\" target=\"_blank\" rel=\"noopener noreferrer\">IndexedDB API<\/a>. This vulnerability is very interesting from a fuzzing perspective due to the level of complexity required to trigger the issue. Domino was able to trigger this vulnerability by creating a file in the global context, then passing the file object to a worker context where an IndexedDB database connection is established.<\/p>\n<p>This level of coordination between contexts would often be difficult to describe using traditional grammars. However, due to the detailed descriptions of these APIs provided by the WebIDL, Domino can identify vulnerabilities like this with ease.<\/p>\n<h2>Contributing<\/h2>\n<p>A final note: Domino continues to find security-sensitive vulnerabilities in our code. Unfortunately, this means we cannot release it yet for public use. However, we have plans to release a more generic version in the near future. Stay tuned. If you&#8217;d like to get started <a href=\"https:\/\/codetribute.mozilla.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">contributing code to the development of Firefox<\/a>, there are plenty of open opportunities. And, if you are a Mozilla employee or NDA\u2019d code contributor and you\u2019d like to work on Domino, feel free to reach out to the team in the Fuzzing room on Riot (Matrix)!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TL;DR, An Introduction This post originally appeared on Mozilla Hacks. Fuzzing, or fuzz testing, is an automated approach for testing the safety and stability of software. It\u2019s typically performed by &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/attack-and-defense\/2020\/05\/12\/fuzzing-firefox-with-webidl\/\">Read more<\/a><\/p>\n","protected":false},"author":1790,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[542,449523],"tags":[],"coauthors":[447603],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/posts\/125"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/users\/1790"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/comments?post=125"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/posts\/125\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/media?parent=125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/categories?post=125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/tags?post=125"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/coauthors?post=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}