Start background chapter

This commit is contained in:
2026-07-01 23:53:27 +02:00
parent 446f82205a
commit c3a06b4e43
13 changed files with 138 additions and 34 deletions
@@ -6,7 +6,7 @@
\chapter{Introduction}\label{ch:introduction}
As semiconductor node sizes shrink, transient hardware faults pose a growing risk to computing systems, especially in environments where reliability is critical.
\Gls{wasm}, a binary-code format developed for the web, is increasingly used in embedded systems through standalone runtimes such as the \Gls{wamr}~\autocite{wamr}.
\Gls{wasm}, a binary code format developed for the web, is increasingly used in embedded systems through standalone runtimes such as the \Gls{wamr}~\autocite{wamr}.
This thesis investigates \Gls{wamr}'s compatibility with hardening techniques for transient hardware faults through systematic single-bit fault injection on a simulated IA-32 CPU using the \Gls{fail} \gls{fi} framework.
The interpreter and \gls{aot} execution modes of \Gls{wamr} are compared under fault conditions and software-based hardening techniques are evaluated at two levels: (I) the language/application level, by hardening source programs before compilation to \Gls{wasm}, and (II) the runtime level, by hardening \Gls{wamr} itself.
+3 -22
View File
@@ -5,27 +5,8 @@
\chapter{Background}\label{ch:background}
\section{WebAssembly}
\begin{itemize}
\item What is it
\item WebAssembly text format
\item WebAssembly memory, containerization, restricted controlflow
\end{itemize}
\section{WebAssembly Micro Runtime}
\begin{itemize}
\item Memory allocators (pool, usage), linear memory, memory usage
\item Different interpreters + JiTs + AoT (information + tradeoffs)
\end{itemize}
\todo[inline]{Not sure where the Wasm/WAMR separation is}
\section{Fault-Injection Leveraged~\autocite{schirmeierFAILOpenVersatile2015}}
\begin{itemize}
\item FAIL* architecture
\item FAIL*Bochs backend, how does FAIL* inject
\item FAIL*'s generic-experiment
\item How to perform a FAIL* experiment
\end{itemize}
\subfile{03_01_wasm.tex}
\subfile{03_02_wamr.tex}
\subfile{03_03_fail.tex}
\end{document}
+40
View File
@@ -0,0 +1,40 @@
%! TeX program = lualatex
\documentclass[../../thesis.tex]{subfiles}
\begin{document}
\section{\Glsdesc*{wasm}}\label{sec:wasm}
The open \Acrfull{wasm} standard defines a portable virtual instruction set architecture, binary code format and text format for execution inside a virtual (stack) machine~\autocite{wasm3spec}.
It is developed and maintained by the World Wide Web Consortium (W3C)\footnote{\url[2026-07-01]{https://w3.org/}} to support high-performance applications in web-based environments.
While the initial implementations of \Gls{wasm} runtime environments were confined to web browsers\footnote{In 2016, experimental \Gls{wasm} runtimes were implemented in Firefox, Google Chrome and Microsoft Edge: \url[2026-07-01]{https://hacks.mozilla.org/2016/03/a-webassembly-milestone/}}, \Gls{wasm} does not make any web-specific assumptions, so many different standalone runtimes like \textquote{Wasmtime}\footnote{\url[2026-07-01]{https://github.com/bytecodealliance/wasmtime/}} or the \Acrfull{wamr} (see \autoref{sec:wamr}) have emerged since.
Besides instructions or execution behavior, two file formats are defined by the \Gls{wasm} standard: the \Gls{wasm} \textquote{Binary Format} \iffalse{}(see \autoref{lst:wasmexample})\fi for space-efficient representation and fast transmission, and the Lisp-like \Gls{wasm} \textquote{Text Format} for human readability (see \autoref{lst:watexample}).
Both formats are equivalent, they represent the same underlying content differently for alternate purposes.
% \begin{codeblock}[label=lst:wasmexample]{\Gls{wasm} Binary Format}{.wasm}
% \inputminted{hex}{\subfix{listings/wat_example.hex}}
% \end{codeblock}
\begin{codeblock}[label=lst:watexample]{\Gls{wasm} Text Format}{.wat}
\inputminted{wat}{\subfix{listings/wat_example.wat}}
\end{codeblock}
In a typical workflow, a program written in a high-level language like C or Rust gets compiled to the \Gls{wasm} binary format using an LLVM-based toolchain, the binary is then executed in a web-based or standalone runtime environment.
The binaries mainly consist of \textit{values}, \textit{instructions}, \textit{functions} and \textit{memory}, bundled into \textit{modules}.
To execute a program, the module is loaded from its binary format representation, \textit{decoded}, \textit{validated}, \textit{instantiated} and lastly, \textit{invoked}.
During runtime, \Gls{wasm} provides memory safety, control flow integrity and independent execution (sandboxing)\footnote{\url[2026-07-01]{https://webassembly.org/docs/security/}}.
Memory safety is achieved through a bounds-checked linear memory with an inaccessible call stack\footnote{The call stack is not part of \Gls{wasm}'s linear memory but the execution environment: \url[2026-07-01]{https://bytecodealliance.github.io/wamr.dev/blog/the-wamr-memory-model/}}, preventing arbitrary memory accesses and buffer overflows.
Control flow integrity stems from structured control flow: branches target verifiable positions and function calls are index-based and verified against the function table\footnote{\url[2026-07-01]{https://clang.llvm.org/docs/ControlFlowIntegrity.html}}.
Additionally, the running program cannot observe its (immutable) source code to prevent control flow hijacking.
Sandboxing is enforced by isolating each module's state: a module can only interact with the outside world through explicitly imported functions and resources provided by its host runtime.
Its safety features, portability, language/hardware independence and well-definedness make \Gls{wasm} an interesting platform even for resource-constrained and security-critical systems.
% \subsection{\Glsdesc*{wasm} Binary Format}\label{ssec:wasmbinaryformat}
% \subsection{\Glsdesc*{wasm} Text Format}\label{ssec:wasmtextformat}
% \subsection{\Glsdesc*{wasm} Memories}\label{ssec:wasmmemories}
% \subsection{\Glsdesc*{wasm} Control Flow}\label{ssec:wasmcontrolflow}
\end{document}
+13
View File
@@ -0,0 +1,13 @@
%! TeX program = lualatex
\documentclass[../../thesis.tex]{subfiles}
\begin{document}
\section{\Glsdesc*{wamr}}\label{sec:wamr}
\begin{itemize}
\item Memory allocators (pool, usage), linear memory, memory usage
\item Different interpreters + JiTs + AoT (information + tradeoffs)
\end{itemize}
\end{document}
+15
View File
@@ -0,0 +1,15 @@
%! TeX program = lualatex
\documentclass[../../thesis.tex]{subfiles}
\begin{document}
\section{\Glsdesc*{fail}}\label{sec:fail}
\begin{itemize}
\item FAIL*~\autocite{schirmeierFAILOpenVersatile2015} architecture
\item FAIL*Bochs backend, how does FAIL* inject
\item FAIL*'s generic-experiment
\item How to perform a FAIL* experiment
\end{itemize}
\end{document}
@@ -0,0 +1,5 @@
0000000 6100 6d73 0001 0000 0501 6001 0100 037f
0000010 0102 0500 0103 0200 0806 7f01 4101 8880
0000020 0b04 1107 0602 656d 6f6d 7972 0002 6d04
0000030 6961 006e 0a00 0106 0004 2a41 000b
000003d
Binary file not shown.
@@ -0,0 +1,8 @@
(module $wat_example.wasm
(type (;0;) (func (result i32)))
(func $main (type 0) (result i32)
i32.const 42)
(memory (;0;) 2)
(global $__stack_pointer (mut i32) (i32.const 66560))
(export "memory" (memory 0))
(export "main" (func $main)))
+1 -1
View File
@@ -25,7 +25,7 @@ This question compares both modes under identical \gls{fi} campaigns to determin
\subsection{To what extent can source program hardening techniques applied to the source code reduce \gls{sdc}?}
This question evaluates application-level hardening such as software \gls{replication} and \glspl{anbcode} before compilation to \Gls{wasm}.
Techniques include the \Gls{cored}~\autocite{ulbrichEliminatingSinglePoints2012} approach, where programs are executed repeatedly before masking errors using the \gls{anbcode}d majority voter.
Techniques include the \Gls{cored}~\autocite{ulbrichEliminatingSinglePoints2012} approach, where programs are executed repeatedly before masking errors using the \glsdisp{anbcode}{ANB-coded} majority voter.
The effectiveness of the tested methods is measured in terms of \gls{sdc} reduction in comparison to the non-hardened variants.
Further considerations include the difference between detectable and correctable errors and the possibility of combining different hardening techniques.
+2 -2
View File
@@ -55,9 +55,9 @@
\newglossaryentry{cored}{%
name={Combined Redundancy},
first={Combined Redundancy (CoRed)},
description={Hardening technique utilizing \Gls{replication} in combination with an \gls{anbcode}d majority voter},
description={Hardening technique utilizing \Gls{replication} in combination with an \glsdisp{anbcode}{ANB-coded} majority voter},
}
\newglossaryentry{wamrc}{%
name={wamrc},
name={Wamrc},
description={\Gls{wamr}'s \gls{aot} compiler for \Gls{wasm}}
}
+3 -6
View File
@@ -1,7 +1,5 @@
% Language
\usepackage[american]{babel}
% \usepackage[T1]{fontenc} % Silbentrennung bei Sonderzeichen
% \usepackage[utf8]{inputenc}
% Layout
\usepackage[left=3.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry} % Typical margin
@@ -9,7 +7,8 @@
\usepackage{setspace} % Line stretch
% Bibliography
\usepackage[backend=biber,urldate=iso,date=iso,seconds=true]{biblatex}
\usepackage[backend=biber,style=alphabetic,urldate=iso,date=iso,seconds=true]{biblatex}
\setcounter{biburlnumpenalty}{7000} % linebreaks after numbers
\bibliography{references,zotero}
\usepackage[nottoc,notlof,notlot]{tocbibind} % Include bibliography in ToC, nottoc disables the "Contents" entry for the ToC itself
@@ -17,7 +16,6 @@
\usepackage{graphicx} % Required for inserting images
\usepackage[font=small,labelfont=bf,labelsep=endash,margin=1cm,hypcap]{caption}
\usepackage[margin=1cm,hypcap]{subcaption} % Mehrere Figuren in einer
% \usepackage{float} % [H] floating/positioning von Figuren
\usepackage{floatbytocbasic} % float for komascript
% \usepackage[bottom,multiple]{footmisc} % Bottom not below footnote
\usepackage{flafter}
@@ -26,7 +24,6 @@
% Math
\usepackage{amsmath,amsthm} % Don't load amssymb with concmath-otf
\usepackage{mathtools} % Extension of amsmath
% \usepackage{upgreek} % For non italic greek (vectors/matrices)
\usepackage{unicode-math}
\usepackage{lualatex-math}
@@ -117,7 +114,7 @@
% Macros
\let\oldurl\url%
\let\url\undefined%
\newcommand{\url}[2][\PackageError{Thesis}{URL requires 2 arguments: \url[date]{address}, e.g.\ \url[07/27/2024]{https://github.com}}{}]{\oldurl{#2} (visited on #1)}
\newcommand{\url}[2][\PackageError{Thesis}{URL requires 2 arguments: \url[date]{address}, e.g.\ \url[2024-07-27]{https://github.com}}{}]{\oldurl{#2} (visited on #1)}
\let\oldref\ref%
\let\ref\undefined%
+2 -2
View File
@@ -26,7 +26,7 @@
@software{wamr,
title = {{WebAssembly Micro Runtime}},
author = {},
author = {{WAMR Contributors}},
date = {},
organization = {Bytecode Alliance},
url = {https://bytecodealliance.github.io/wamr.dev/},
@@ -35,7 +35,7 @@
@software{bochs,
title = {{Bochs IA-32 Emulator Project}},
author = {Lawton, Kevin and Contributors},
author = {Lawton, Kevin and {BOCHS Contributors}},
date = {},
organization = {},
url = {https://bochs.sourceforge.io/},
+45
View File
@@ -142,6 +142,21 @@
file = {/home/christoph/Notes/Zotero/storage/G9SATNLR/Schirmeier et al. - FAIL Towards a Versatile Fault-Injection Experiment Framework.pdf}
}
@book{slettenWebAssemblyDefinitiveGuide2021,
title = {{{WebAssembly}}: The Definitive Guide: Safe, Fast, and Portable Code},
shorttitle = {{{WebAssembly}}},
author = {Sletten, Brian},
date = {2021},
edition = {First edition},
publisher = {O'Reilly Media},
location = {Sebastopol, CA},
abstract = {"WebAssembly: The Definitive Guide is a thorough and accessible introduction to one of the most transformative technologies hitting our industry. What started as a way to use languages other than JavaScript in the browser has evolved into a comprehensive path toward portability, performance, increased security, and greater code reuse across an impressive collection of deployment targets. Author Brian Sletten introduces elements of this technology incrementally while building to several concrete, code-driven examples of practical, cutting-edge WebAssembly uses. Whether you work with enterprise software or embedded systems, or in entertainment, scientific computing, or startup environments, you'll learn how WebAssembly can have a positive impact on the way you develop software." -- Back cover},
isbn = {978-1-4920-8984-1},
pagetotal = {317},
keywords = {Application software,Assembly languages (Electronic computers),Computer programs,Development,Développement,Développement Logiciels,Guides et manuels,Handbook,Handbooks and manuals,Internet programming,Langage assembleur (Langage de programmation),Logiciels d'application,Programmation Internet,Sites Web,Web site development},
file = {/home/christoph/Notes/Zotero/storage/82VVGKJV/Sletten - 2021 - WebAssembly the definitive guide safe, fast, and portable code.pdf}
}
@article{soloukiDependabilityEmbeddedSystems2024,
title = {Dependability in {{Embedded Systems}}: {{A Survey}} of {{Fault Tolerance Methods}} and {{Software-Based Mitigation Techniques}}},
shorttitle = {Dependability in {{Embedded Systems}}},
@@ -198,3 +213,33 @@
langid = {english},
file = {/home/christoph/Notes/Zotero/storage/VQT3AEQF/Wappler and Fetzer - 2007 - Software Encoded Processing Building Dependable Systems with Commodity Hardware.pdf}
}
@misc{wasm1spec,
title = {{{WebAssembly}} 1.0 {{Specification}}},
author = {{WebAssembly Community Group} and Rossberg, Andreas},
date = {2019-07-20},
url = {https://webassembly.github.io/spec/versions/core/WebAssembly-1.0.pdf},
urldate = {2026-07-01},
langid = {english},
file = {/home/christoph/Notes/Zotero/storage/WQV9G6TQ/WebAssembly Community Group and Rossberg - 2019 - WebAssembly 1.0 Specification.pdf}
}
@misc{wasm2spec,
title = {{{WebAssembly}} 2.0 {{Specification}}},
author = {{WebAssembly Community Group} and Rossberg, Andreas},
date = {2025-09-16},
url = {https://webassembly.github.io/spec/versions/core/WebAssembly-2.0.pdf},
urldate = {2026-07-01},
langid = {english},
file = {/home/christoph/Notes/Zotero/storage/DKNDNCPF/WebAssembly Community Group and Rossberg - 2025 - WebAssembly 2.0 Specification.pdf}
}
@misc{wasm3spec,
title = {{{WebAssembly}} 3.0 {{Specification}} ({{Draft}})},
author = {{WebAssembly Community Group} and Rossberg, Andreas},
date = {2026-06-25},
url = {https://webassembly.github.io/spec/core/_download/WebAssembly.pdf},
urldate = {2026-07-01},
langid = {english},
file = {/home/christoph/Notes/Zotero/storage/8YB9FEXY/WebAssembly Community Group and Rossberg - 2026 - WebAssembly 3.0 Specification (Draft).pdf}
}