Skip to content
Permalink
Browse files

fix readme + update docs

  • Loading branch information
deian committed Jan 11, 2020
1 parent 37860f6 commit 7fd720fd004626c40bf0c7a3dad5e93360570ba3
Showing 656 changed files with 10,059 additions and 4,031 deletions.
@@ -113,6 +113,7 @@ library::

// main.cpp:

#define RLBOX_SINGLE_THREADED_INVOCATIONS
#define RLBOX_USE_STATIC_CALLS() rlbox_noop_sandbox_lookup_symbol

#include <stdio.h>
@@ -180,14 +181,14 @@ want to pass to ``echo`` into this region::
// allocate memory in the sandbox:
auto taintedStr = sandbox.malloc_in_sandbox<char>(helloSize);
// copy helloStr into the sandbox:
std::strncpy(taintedStr.unverified_safe_because("writing to region"), helloStr, helloSize);
std::strncpy(taintedStr.unverified_safe_pointer_because(helloSize, "writing to region"), helloStr, helloSize);
...

Note that ``taintedStr`` is actually a :ref:`tainted <tainted>` string: it
lives in the sandbox memory and could be written to by the (compromised)
library code concurrently. As such, it's unsafe for us to use this value
without verification. Above, we use the :ref:`unverified_safe_because
<unverified_safe_because>` verifier which basically removes the taint without
library code concurrently. As such, it's unsafe for us to use this pointer
without verification. Above, we use the :ref:`unverified_safe_pointer_because
<unverified_safe_pointer_because>` verifier which basically removes the taint without
any verification. This is safe because we copy the ``helloStr`` to sandbox
memory: at worst, the sandboxed library can overwrite the memory region pointed
to by ``taintedStr`` and crash when it tries to print it.
@@ -398,6 +399,12 @@ Sometimes this is safe to do and RLBox provides a method for doing so:
.. _unverified_safe_because:
.. doxygenfunction:: unverified_safe_because(const char (&)[N])

Since pointers are special (sandbox code may modify the data the pointer
points to), we have a similar function for pointers:

.. _unverified_safe_pointer_because:
.. doxygenfunction:: unverified_safe_pointer_because(size_t count, const char (&)[N])

We however provide additional functions that are especially useful during
migration:

@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>RLBox: Class List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
@@ -29,18 +29,21 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
@@ -68,15 +71,15 @@
<tr id="row_0_0_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_0_" class="arrow" onclick="toggleFolder('0_0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>detail</b></td><td class="desc"></td></tr>
<tr id="row_0_0_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_0_0_0_" class="arrow" onclick="toggleFolder('0_0_0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>all_extents_same_detail</b></td><td class="desc"></td></tr>
<tr id="row_0_0_0_0_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1all__extents__same__detail_1_1all__extents__same__helper.html" target="_self">all_extents_same_helper</a></td><td class="desc"></td></tr>
<tr id="row_0_0_0_1_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1all__extents__same__detail_1_1all__extents__same__helper_3_01T1_00_01T2fa3c3927c8e078fa88e073dc4dc89b0a.html" target="_self">all_extents_same_helper&lt; T1, T2, std::enable_if_t&lt; std::rank_v&lt; T1 &gt; !=std::rank_v&lt; T2 &gt; &gt; &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_0_0_2_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1all__extents__same__detail_1_1all__extents__same__helper_3_01T1_00_01T28a926837b387cfc9825b906d80afb9d3.html" target="_self">all_extents_same_helper&lt; T1, T2, std::enable_if_t&lt; std::rank_v&lt; T1 &gt;==std::rank_v&lt; T2 &gt; &amp;&amp;!std::is_array_v&lt; T1 &gt; &amp;&amp;!std::is_array_v&lt; T2 &gt; &gt; &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_0_0_3_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1all__extents__same__detail_1_1all__extents__same__helper_3_01T1_00_01T2c85c414d786e56b573ef092d9cd9401b.html" target="_self">all_extents_same_helper&lt; T1, T2, std::enable_if_t&lt; std::rank_v&lt; T1 &gt;==std::rank_v&lt; T2 &gt; &amp;&amp;std::is_array_v&lt; T1 &gt; &amp;&amp;std::is_array_v&lt; T2 &gt; &amp;&amp;std::extent_v&lt; T1 &gt; !=std::extent_v&lt; T2 &gt; &gt; &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_0_0_4_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1all__extents__same__detail_1_1all__extents__same__helper_3_01T1_00_01T2dafdc234639e9e1d414a62f1ef1ccd73.html" target="_self">all_extents_same_helper&lt; T1, T2, std::enable_if_t&lt; std::rank_v&lt; T1 &gt;==std::rank_v&lt; T2 &gt; &amp;&amp;std::is_array_v&lt; T1 &gt; &amp;&amp;std::is_array_v&lt; T2 &gt; &amp;&amp;std::extent_v&lt; T1 &gt;==std::extent_v&lt; T2 &gt; &gt; &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_0_0_1_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1all__extents__same__detail_1_1all__extents__same__helper_3_01T1_00_01T2294706b16288b9be4bf3918e129d9f96.html" target="_self">all_extents_same_helper&lt; T1, T2, std::enable_if_t&lt; std::rank_v&lt; T1 &gt; !=std::rank_v&lt; T2 &gt; &gt; &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_0_0_2_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1all__extents__same__detail_1_1all__extents__same__helper_3_01T1_00_01T258771663e90eb8e999cffbdabdafda93.html" target="_self">all_extents_same_helper&lt; T1, T2, std::enable_if_t&lt; std::rank_v&lt; T1 &gt;==std::rank_v&lt; T2 &gt; &amp;&amp;!std::is_array_v&lt; T1 &gt; &amp;&amp;!std::is_array_v&lt; T2 &gt; &gt; &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_0_0_3_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1all__extents__same__detail_1_1all__extents__same__helper_3_01T1_00_01T20ea5dc1c122986b6d2bb6f4fb185397c.html" target="_self">all_extents_same_helper&lt; T1, T2, std::enable_if_t&lt; std::rank_v&lt; T1 &gt;==std::rank_v&lt; T2 &gt; &amp;&amp;std::is_array_v&lt; T1 &gt; &amp;&amp;std::is_array_v&lt; T2 &gt; &amp;&amp;std::extent_v&lt; T1 &gt; !=std::extent_v&lt; T2 &gt; &gt; &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_0_0_4_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1all__extents__same__detail_1_1all__extents__same__helper_3_01T1_00_01T25d70af5aa43fd6754d0be6a8732f1187.html" target="_self">all_extents_same_helper&lt; T1, T2, std::enable_if_t&lt; std::rank_v&lt; T1 &gt;==std::rank_v&lt; T2 &gt; &amp;&amp;std::is_array_v&lt; T1 &gt; &amp;&amp;std::is_array_v&lt; T2 &gt; &amp;&amp;std::extent_v&lt; T1 &gt;==std::extent_v&lt; T2 &gt; &gt; &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_0_0_1_" class="arrow" onclick="toggleFolder('0_0_1_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>base_type_detail</b></td><td class="desc"></td></tr>
<tr id="row_0_0_1_0_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1base__type__detail_1_1base__type.html" target="_self">base_type</a></td><td class="desc"></td></tr>
<tr id="row_0_0_1_1_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1base__type__detail_1_1base__type_3_01T_01_5_01_4.html" target="_self">base_type&lt; T * &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_0_1_2_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1base__type__detail_1_1base__type_3_01T[]_4.html" target="_self">base_type&lt; T[]&gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_0_1_3_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1base__type__detail_1_1base__type_3_01T[N]_4.html" target="_self">base_type&lt; T[N]&gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_0_1_2_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1base__type__detail_1_1base__type_3_01T_0f_0e_4.html" target="_self">base_type&lt; T[]&gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_0_1_3_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1base__type__detail_1_1base__type_3_01T_0fN_0e_4.html" target="_self">base_type&lt; T[N]&gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_0_2_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_0_0_2_" class="arrow" onclick="toggleFolder('0_0_2_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>compile_time_for_detail</b></td><td class="desc"></td></tr>
<tr id="row_0_0_2_0_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structrlbox_1_1detail_1_1compile__time__for__detail_1_1num.html" target="_self">num</a></td><td class="desc"></td></tr>
<tr id="row_0_0_3_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_0_0_3_" class="arrow" onclick="toggleFolder('0_0_3_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>convert_detail</b></td><td class="desc"></td></tr>
@@ -135,17 +138,17 @@
<tr id="row_0_4_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classrlbox_1_1sandbox__callback.html" target="_self">sandbox_callback</a></td><td class="desc"></td></tr>
<tr id="row_0_5_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classrlbox_1_1tainted.html" target="_self">tainted</a></td><td class="desc"></td></tr>
<tr id="row_0_6_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classrlbox_1_1tainted__base__impl.html" target="_self">tainted_base_impl</a></td><td class="desc"></td></tr>
<tr id="row_0_7_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classrlbox_1_1tainted__boolean__hint.html" target="_self">tainted_boolean_hint</a></td><td class="desc">Tainted boolean value that serves as a "hint" and not a definite answer. Comparisons with a <a class="el" href="classrlbox_1_1tainted__volatile.html" title="Tainted volatile values are like tainted values but still point to sandbox memory. Dereferencing a tainted pointer produces a tainted_volatile. ">tainted_volatile</a> return such hints. They are not <code>tainted&lt;bool&gt;</code> values because a compromised sandbox can modify <a class="el" href="classrlbox_1_1tainted__volatile.html" title="Tainted volatile values are like tainted values but still point to sandbox memory. Dereferencing a tainted pointer produces a tainted_volatile. ">tainted_volatile</a> data at any time </td></tr>
<tr id="row_0_7_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classrlbox_1_1tainted__boolean__hint.html" target="_self">tainted_boolean_hint</a></td><td class="desc">Tainted boolean value that serves as a "hint" and not a definite answer. Comparisons with a <a class="el" href="classrlbox_1_1tainted__volatile.html" title="Tainted volatile values are like tainted values but still point to sandbox memory....">tainted_volatile</a> return such hints. They are not <code>tainted&lt;bool&gt;</code> values because a compromised sandbox can modify <a class="el" href="classrlbox_1_1tainted__volatile.html" title="Tainted volatile values are like tainted values but still point to sandbox memory....">tainted_volatile</a> data at any time </td></tr>
<tr id="row_0_8_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classrlbox_1_1tainted__opaque.html" target="_self">tainted_opaque</a></td><td class="desc"></td></tr>
<tr id="row_0_9_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classrlbox_1_1tainted__volatile.html" target="_self">tainted_volatile</a></td><td class="desc">Tainted volatile values are like tainted values but still point to sandbox memory. Dereferencing a tainted pointer produces a <a class="el" href="classrlbox_1_1tainted__volatile.html" title="Tainted volatile values are like tainted values but still point to sandbox memory. Dereferencing a tainted pointer produces a tainted_volatile. ">tainted_volatile</a> </td></tr>
<tr id="row_0_9_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classrlbox_1_1tainted__volatile.html" target="_self">tainted_volatile</a></td><td class="desc">Tainted volatile values are like tainted values but still point to sandbox memory. Dereferencing a tainted pointer produces a <a class="el" href="classrlbox_1_1tainted__volatile.html" title="Tainted volatile values are like tainted values but still point to sandbox memory....">tainted_volatile</a> </td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</a> 1.8.17
</small></address>
</body>
</html>

0 comments on commit 7fd720f

Please sign in to comment.
You can’t perform that action at this time.