Compare commits
No commits in common. "static-code-analysis-kernel-task-memory-safety" and "0.2.0-alpha" have entirely different histories.
static-cod
...
0.2.0-alph
18 changed files with 993 additions and 2904 deletions
|
@ -1,12 +0,0 @@
|
|||
#include "llvm/Support/CommandLine.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
/*
|
||||
* Call with `--help-list-hidden` as argument to get a full list
|
||||
*/
|
||||
int main(int argc, char** argv) {
|
||||
cl::ParseCommandLineOptions(argc, argv, "");
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
g++ arglist.cc -o arglist -std=gnu++11 -lLLVM-4.0.1
|
||||
./arglist --help-list-hidden
|
|
@ -1,7 +1,7 @@
|
|||
TARGET = stack_handling
|
||||
LIBS =
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -fomit-frame-pointer -fstack-check #-fsanitize=address
|
||||
CC = clang
|
||||
CFLAGS = -Wall -fomit-frame-pointer
|
||||
|
||||
.PHONY: default all clean
|
||||
|
||||
|
@ -9,7 +9,7 @@ default: $(TARGET)
|
|||
all: default objdump
|
||||
|
||||
OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c))
|
||||
HEADERS = $(wildcard *.h)GG
|
||||
HEADERS = $(wildcard *.h)
|
||||
|
||||
%.o: %.c $(HEADERS)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
@ -22,6 +22,7 @@ $(TARGET): $(OBJECTS)
|
|||
clean:
|
||||
-rm -f *.o
|
||||
-rm -f $(TARGET)
|
||||
-rm -f objdump
|
||||
|
||||
objdump: $(TARGET)
|
||||
objdump --no-show-raw-insn --disassembler-options=intel-nmemonic -d $(TARGET) > $@
|
|
@ -39,17 +39,9 @@ static void caller(void) {
|
|||
printer(&a, &b);
|
||||
}
|
||||
|
||||
static int *grow_stack(int size) {
|
||||
int a[size];
|
||||
for (int i = 0; i < size; i++) {
|
||||
a[i] = 0;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
static int64_t *large_stack() {
|
||||
uint64_t a[100000000];
|
||||
return a;
|
||||
static void shell() {
|
||||
char *argv[] = {};
|
||||
execve("/bin/sh", argv, NULL);
|
||||
}
|
||||
|
||||
static void simple_printer(void) { fprintf(stderr, "I wonder who called me?"); }
|
||||
|
@ -57,28 +49,17 @@ static void simple_printer(void) { fprintf(stderr, "I wonder who called me?"); }
|
|||
static void modifier(void) {
|
||||
uint64_t *p;
|
||||
// without frame-pointer
|
||||
// *(&p + 1) = (uint64_t *)simple_printer;
|
||||
*(&p + 1) = (uint64_t *)simple_printer;
|
||||
|
||||
// with frame-pointer
|
||||
*(&p + 2) = (uint64_t *)simple_printer;
|
||||
}
|
||||
|
||||
static void modifier_indexed(uint64_t *p) {
|
||||
// without frame-pointer
|
||||
(&p)[1] = (uint64_t *)simple_printer;
|
||||
|
||||
// with frame-pointer
|
||||
(&p)[2] = (uint64_t *)simple_printer;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
// caller();
|
||||
// many_args(0xfffffffffffffff0, 0xfffffffffffffff1, 0xfffffffffffffff3,
|
||||
// 0xfffffffffffffff4, 0xfffffffffffffff5, 0xfffffffffffffff6,
|
||||
// 0xfffffffffffffff7);
|
||||
// modifier_indexed(NULL);
|
||||
// modifier();
|
||||
large_stack();
|
||||
fprintf(stderr, "main exiting");
|
||||
modifier();
|
||||
return 0;
|
||||
}
|
|
@ -7,7 +7,4 @@ build = "build.rs"
|
|||
[dependencies]
|
||||
|
||||
[profile.dev]
|
||||
panic = "abort"
|
||||
|
||||
[profile.release]
|
||||
panic = "abort"
|
|
@ -1,6 +1,3 @@
|
|||
#![feature(naked_functions)]
|
||||
#![deny(unconditional_recursion)]
|
||||
|
||||
// #[derive(Debug)]
|
||||
// struct Stat {
|
||||
// sum: isize,
|
||||
|
@ -79,6 +76,17 @@ fn passthrough(a: isize) -> isize {
|
|||
}
|
||||
|
||||
#[inline(never)]
|
||||
fn r();
|
||||
println!("main exiting")
|
||||
fn caller() {
|
||||
let a = passthrough(1);
|
||||
let b = a * 2;
|
||||
printer(&a, &b);
|
||||
}
|
||||
|
||||
#[inline(never)]
|
||||
fn printer(a: &isize, b: &isize) {
|
||||
println!("2*{}={}", a, b);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
caller();
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
% // vim: set ft=tex:
|
||||
\begin{center}
|
||||
{\Large \textbf{Abstract}}
|
||||
\end{center}
|
||||
|
@ -14,9 +13,9 @@
|
|||
Supervisors: & \supervisorOne \\[.5ex]
|
||||
& \supervisorTwo\\
|
||||
& \\
|
||||
Submission: & \submitdate \\
|
||||
Submition: & \submitdate \\
|
||||
& \\
|
||||
Categories: & \buzzwords \\
|
||||
Buzzwords: & \buzzwords \\
|
||||
& \\
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
|
@ -24,4 +23,4 @@
|
|||
\bigskip
|
||||
|
||||
\noindent
|
||||
\abstract
|
||||
TODO: abstract goes here
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
% // vim: set ft=tex:
|
||||
|
||||
\chapter*{Ehrenwörtliche Erklärung}
|
||||
|
||||
Hiermit erkläre ich, {\authorOne}, geboren am {\authorOneBirthDate} in {\authorOneBirthCity},
|
||||
|
||||
\begin{enumerate}
|
||||
\item{
|
||||
dass ich meine Masterarbeit mit dem Titel:
|
||||
|
||||
{"\topic"}
|
||||
|
||||
in der Fakultät Informatik unter Anleitung von Professor {\supervisorOne} und ohne fremde Hilfe angefertigt habe und keine anderen als die angeführten Hilfen benutzt habe;
|
||||
}
|
||||
\item{
|
||||
dass ich die Übernahme wörtlicher Zitate, von Tabellen, Zeichnungen, Bildern und Programmen aus der Literatur oder anderen Quellen (Internet) sowie die Verwendung der Gedanken anderer Autoren an den entsprechenden Stellen innerhalb der Arbeit gekennzeichnet habe;
|
||||
}
|
||||
\item{
|
||||
dass die eingereichten Abgabe-Exemplare in Papierform und im PDF-Format vollständig übereinstimmen.
|
||||
}
|
||||
\end{enumerate}
|
||||
|
||||
Ich bin mir bewusst, dass eine falsche Erklärung rechtliche Folgen haben wird.
|
||||
|
||||
\vspace{4cm}
|
||||
Konstanz, 29.9.2017\hspace{5cm} \authorOne
|
|
@ -1,26 +0,0 @@
|
|||
\begin{titlepage}
|
||||
|
||||
\vspace*{-1.0cm}
|
||||
|
||||
\begin{centering}
|
||||
\includegraphics[width=\textwidth]{gfx/htwg-logo.pdf}
|
||||
\end{centering}
|
||||
|
||||
\vspace{1.5cm}
|
||||
|
||||
\begin{center}
|
||||
\huge{
|
||||
\textbf{\topic} \\[4cm]
|
||||
}
|
||||
\Large{
|
||||
\textbf{\authorOne}} \\[5.5cm]
|
||||
\large{
|
||||
\textbf{Konstanz, \submitdate} \\[2.3cm]
|
||||
}
|
||||
|
||||
\Huge{
|
||||
\textbf{{\textsf Masterarbeit}}
|
||||
}
|
||||
\end{center}
|
||||
|
||||
\end{titlepage}
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 8.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 32 KiB |
|
@ -11,38 +11,9 @@
|
|||
|
||||
\newglossaryentry{Rust} {
|
||||
name = {Rust},
|
||||
long = {The Rust programming language},
|
||||
long = {the Rust programming language},
|
||||
description = {%
|
||||
Statically typed programming language that uses a new concept of variable ownership and reference tracking. Largely explain in \cref{rnd::rust}.
|
||||
},
|
||||
first = {\glsentrylong{Rust}}
|
||||
}
|
||||
|
||||
\newglossaryentry{rustc}{
|
||||
name = rustc,
|
||||
long = {The Rust compiler},
|
||||
description = {%
|
||||
This program is a compiler for the Rust language (man rustc).
|
||||
},
|
||||
first = {\glsentrylong{rustc}},
|
||||
}
|
||||
|
||||
\newglossaryentry{cargo} {
|
||||
name = {cargo},
|
||||
long = {The Rust package manager},
|
||||
description = {%
|
||||
This program is a package manager for the Rust language (man cargo).
|
||||
It is also a wrapper for the Rust compiler.
|
||||
It is also a management tool for Rust source code projects, and simplifies the initialization of project directories, the build of the source code and the run of the compiled binary.
|
||||
},
|
||||
first = {\glsentrylong{Rust}}
|
||||
}
|
||||
|
||||
\newglossaryentry{xargo} {
|
||||
name = {xcargo},
|
||||
long = {The Cross-Compilation wrapper for cargo},
|
||||
description = {%
|
||||
Wrapper for cargo to simplify cross-compilation.
|
||||
Statically typed programming language that uses a new concept of variable ownership and reference tracking. Largely explain in \cref{context::rust}.
|
||||
},
|
||||
first = {\glsentrylong{Rust}}
|
||||
}
|
||||
|
@ -65,37 +36,6 @@
|
|||
first = {\glsentrylong{compiler}}
|
||||
}
|
||||
|
||||
\newglossaryentry{GCC}{
|
||||
name = GCC,
|
||||
long = {GNU Compiler Collection},
|
||||
description = {%
|
||||
GCC is an integrated distribution of compilers for several major programming languages.
|
||||
These languages currently include C, C++, Objective-C, Objective-C++, Java, Fortran, Ada, and Go.
|
||||
},
|
||||
first = {\glsentrylong{GCC}}
|
||||
}
|
||||
|
||||
\newglossaryentry{llvm}{
|
||||
name = LLVM,
|
||||
long = {Low Level Virtual Machine},
|
||||
description = {%
|
||||
A Virtual Instruction Set and Compilation Framework.
|
||||
The key idea in LLVM is to use a rich virtual instruction set (instead of raw machine code) as the object code representation manipulated by link-time and post-link optimizers and code generators.\cite{Kowshik2002}.
|
||||
},
|
||||
first = {\glsentrylong{clang}}
|
||||
}
|
||||
|
||||
|
||||
\newglossaryentry{clang}{
|
||||
name = Clang,
|
||||
long = {C Language frontendend for LLVM},
|
||||
description = {%
|
||||
The goal of the Clang project is to create a new C based language front-end: C, C++, Objective C/C++, OpenCL C and others for the LLVM compiler. You can get and build the source today.
|
||||
\url{http://clang.llvm.org/}
|
||||
},
|
||||
first = {\glsentrylong{clang}}
|
||||
}
|
||||
|
||||
\newglossaryentry{addrspace}{
|
||||
name = address space,
|
||||
long = bound address range in memory,
|
||||
|
@ -108,6 +48,7 @@
|
|||
\newglossaryentry{stack}{
|
||||
name = stack,
|
||||
description = {%
|
||||
TODO
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -121,6 +62,7 @@
|
|||
\newglossaryentry{heap}{
|
||||
name = heap,
|
||||
description = {%
|
||||
TODO
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -146,36 +88,42 @@
|
|||
\newglossaryentry{fs}{
|
||||
name = filesystem,
|
||||
description = {%
|
||||
TODO
|
||||
},
|
||||
}
|
||||
|
||||
\newglossaryentry{virt}{
|
||||
name = virtualization,
|
||||
description = {%
|
||||
TODO
|
||||
},
|
||||
}
|
||||
|
||||
\newglossaryentry{OSS}{
|
||||
name = Open-Source Software,
|
||||
description = {%
|
||||
TODO
|
||||
},
|
||||
}
|
||||
|
||||
\newglossaryentry{osvirt}{
|
||||
name = Operating System-Level Virtualization,
|
||||
description = {%
|
||||
TODO
|
||||
},
|
||||
}
|
||||
|
||||
\newglossaryentry{hypervisor}{
|
||||
name = Hypervisor,
|
||||
description = {%
|
||||
TODO
|
||||
},
|
||||
}
|
||||
|
||||
\newglossaryentry{VM}{
|
||||
name = Virtual Machine,
|
||||
description = {%
|
||||
TODO
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -188,16 +136,9 @@
|
|||
plural=Linuces
|
||||
}
|
||||
|
||||
\newglossaryentry{microkernel}{
|
||||
name = microkernel,
|
||||
description = {%
|
||||
Kernel design that operates most drivers in userland, and only provides bare minimum functionality in kernel mode for glueing the drivers together.
|
||||
},
|
||||
}
|
||||
|
||||
\newglossaryentry{android}{
|
||||
name = Android,
|
||||
description = {an open-source mobile \gls{os} based on \gls{LX}},
|
||||
description = {a mobile \gls{os} based on \gls{LX}},
|
||||
first = {\glsentryname{android}, \glsentrydesc{android}},
|
||||
}
|
||||
|
||||
|
@ -205,30 +146,35 @@
|
|||
\newglossaryentry{imezzos}{
|
||||
name = intermezzOS,
|
||||
description = {%
|
||||
TODO
|
||||
},
|
||||
}
|
||||
|
||||
\newglossaryentry{redoxos}{
|
||||
name = Redox OS,
|
||||
description = {%
|
||||
TODO
|
||||
},
|
||||
}
|
||||
|
||||
\newglossaryentry{blogos}{
|
||||
name = Blog OS,
|
||||
description = {%
|
||||
TODO
|
||||
},
|
||||
}
|
||||
|
||||
\newglossaryentry{tockos}{
|
||||
name = Tock OS,
|
||||
description = {%
|
||||
TODO
|
||||
},
|
||||
}
|
||||
|
||||
\newglossaryentry{rootfs}{
|
||||
name = RootFS,
|
||||
description = {%
|
||||
% TODO
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -257,6 +203,7 @@
|
|||
\newglossaryentry{BSD}{
|
||||
name = BSD,
|
||||
description = {%
|
||||
TODO
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -273,6 +220,7 @@
|
|||
\newglossaryentry{pm}{
|
||||
name = package manager,
|
||||
description = {%
|
||||
TODO
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -303,6 +251,7 @@
|
|||
\newglossaryentry{LXC}{
|
||||
name = LXC,
|
||||
description = {%
|
||||
TODO
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -316,12 +265,14 @@
|
|||
\newglossaryentry{systemd-nspawn}{
|
||||
name = systemd-nspawn,
|
||||
description = {%
|
||||
TODO
|
||||
}
|
||||
}
|
||||
|
||||
\newglossaryentry{rkt}{
|
||||
name = rkt,
|
||||
description = {%
|
||||
TODO
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -341,10 +292,8 @@
|
|||
|
||||
\newglossaryentry{NVD}{
|
||||
name = {NVD},
|
||||
description = {
|
||||
The NVD is the U.S. government repository of standards based vulnerability management data represented using the Security Content Automation Protocol (SCAP). This data enables automation of vulnerability management, security measurement, and compliance. The NVD includes databases of security checklist references, security related software flaws, misconfigurations, product names, and impact metrics.\cite{NVD}
|
||||
},
|
||||
long = {\citetitle{NVD}},
|
||||
description = {https://nvd.nist.gov/},
|
||||
long = {National Vulnerability Database},
|
||||
first = {\glsentrylong{NVD}}
|
||||
}
|
||||
|
||||
|
@ -365,34 +314,13 @@
|
|||
name = CWE-119,
|
||||
long = {CWE-119: \glsentrydesc{CWE-119}},
|
||||
description = {Improper Restriction of Operations within the Bounds of a Memory Buffer},
|
||||
first = {\glsentrytext{CWE-119}\cite{MITRE-CWE-119}}
|
||||
}
|
||||
|
||||
\newglossaryentry{CWE-635}{
|
||||
name = CWE-635,
|
||||
long = {\glsentrydesc{CWE-635}},
|
||||
description = {\citetitle{MITRE-CWE-635}},
|
||||
first = {\glsentrytext{CWE-635}\cite{MITRE-CWE-635}}
|
||||
}
|
||||
|
||||
\newglossaryentry{CWE-122}{
|
||||
name = CWE-122,
|
||||
long = {\glsentrydesc{CWE-122}},
|
||||
description = {\citetitle{MITRE-CWE-122}},
|
||||
first = {\glsentrytext{CWE-122}\cite{MITRE-CWE-122}}
|
||||
}
|
||||
|
||||
\newglossaryentry{CWE-134}{
|
||||
name = CWE-134,
|
||||
long = {\glsentrydesc{CWE-134}},
|
||||
description = {\citetitle{MITRE-CWE-134}},
|
||||
first = {\glsentrytext{CWE-134}\cite{MITRE-CWE-134}}
|
||||
first = {\glsentrylong{CWE-119}\cite{MITRE-CWE-119}}
|
||||
}
|
||||
|
||||
\newglossaryentry{C}{
|
||||
name = C,
|
||||
, description = {%
|
||||
C programming language,
|
||||
TODO C programming language,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -404,9 +332,9 @@
|
|||
}
|
||||
|
||||
\newglossaryentry{asm}{
|
||||
name = ASM,
|
||||
long = Assembly programming language,
|
||||
name = Assembly programming language,
|
||||
description = {%
|
||||
TODO ASM
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -414,7 +342,7 @@
|
|||
name = AMD64,
|
||||
long = AMD64,
|
||||
description = {%
|
||||
Contemporary Hardware Architecture\cite{AMD64Vol1,AMD64Vol2}
|
||||
TODO AMD64
|
||||
},
|
||||
first = {\glsentrylong{amd64}},
|
||||
}
|
||||
|
@ -423,7 +351,7 @@
|
|||
name = CPU,
|
||||
long = Central Processing Unit,
|
||||
description = {%
|
||||
Central Haddware Unit that executes machine code
|
||||
TODO cpu
|
||||
},
|
||||
first = {\glsentrylong{cpu}},
|
||||
}
|
||||
|
@ -433,37 +361,31 @@
|
|||
name = TLB,
|
||||
long = Translation Lookaside Buffer,
|
||||
description = {%
|
||||
TODO tlb
|
||||
},
|
||||
first = {\glsentrylong{tlb}},
|
||||
}
|
||||
|
||||
\newglossaryentry{mmu}{
|
||||
\newglossaryentry{MMU}{
|
||||
name = MMU,
|
||||
long = Memory Management Unit,
|
||||
description = {%
|
||||
Physical part of the \gls{cpu} equipped for managing the system's memory.
|
||||
TODO MMU
|
||||
},
|
||||
first = {\glsentrylong{MMU}},
|
||||
}
|
||||
|
||||
\newglossaryentry{vaddr}{
|
||||
name = virtual address,
|
||||
plural = virtual addresses,
|
||||
description = {%
|
||||
Memory Addresses that does not reference physical memory directly, but is part of a memory virtualization scheme.
|
||||
},
|
||||
}
|
||||
|
||||
\newglossaryentry{sysadmin}{
|
||||
name = System Administrator
|
||||
, description = {%
|
||||
TODO sysadmin
|
||||
}
|
||||
}
|
||||
|
||||
\newglossaryentry{realtime}{
|
||||
name = realtime
|
||||
, description = {%
|
||||
In computer science realtime refers to guaranateed execution within specified time boundaries.
|
||||
TODO realtime
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -478,7 +400,7 @@
|
|||
name = task
|
||||
, description = {%
|
||||
Generic term for any unit of work to be executed on the.
|
||||
In the context of this study, it may be used for any of \glsentrytext{program}, \glsentrytext{process}, \glsentrytext{thread}.
|
||||
In the context of this thesis, it may be used for any of \glsentrytext{program}, \glsentrytext{process}, \glsentrytext{thread}.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,246 +1,174 @@
|
|||
% // vim: set ft=tex:
|
||||
\chapter{Evaluation}
|
||||
This chapter summarizes the findings of the previous parts.
|
||||
The summary is then evaluated against the hypothesis, to create the foundation of a concise conclusion.
|
||||
|
||||
\section{Summary}
|
||||
After defining an exact definition for memory-safety within the OS was found in \cref{context::introduction::memory-safety::def}, various aspects of software vulnerability origin were discussed.
|
||||
The human was identified to be an error prone weak spot in the process of OS development.
|
||||
It was found that technical solutions that can detect these errors are to be used as early in the development process as possible.
|
||||
This point in time was declared the time of software compilation.
|
||||
\section{Premised Trust In Hardware}
|
||||
Memory management mechanisms are partially implemented in the target system's hardware which can't be verified by at time of development.
|
||||
|
||||
OS development concepts were introduced to for the AMD64 architecture, to lay out the knowledge that to allow an understanding and implementation of OS concepts on AMD64, which was set out for the development process.
|
||||
\section{Safety Of Low-Level Code in Rust}
|
||||
% TODO: Is the static analysis of hardware specific assembly code possible and useful at all?
|
||||
% TODO: LLVM knows about the target and can potentially give hints about hardware specific instructions
|
||||
|
||||
Common Weaknesses in software were identified, and demonstrated how these lead to concrete vulnerabilities.
|
||||
The stack clash was explained as an architectural and design issue, which requires changes in stack overflow detection in userspace software.
|
||||
The origin of many of the weaknesses was identified to be based on weak languages, and Rust was verified to be a good alternative to C.
|
||||
Research was conducted on these common weaknesses through other scientific studies.
|
||||
This found weaknesses based on
|
||||
\begin{itemize}
|
||||
\item use-after-free
|
||||
\item indexing out of bounds
|
||||
\item iterator invalidation
|
||||
\item data races
|
||||
\end{itemize}
|
||||
to be prevented by Rust's ownership system\cite{Beingessner2015}.
|
||||
Stack protection experiments were conducted and found Rust to be less vulnerable to return address manipulation.
|
||||
These were found to be effectively prevented by static analysis under normal circumstances, since it required multiple explicit features to intentionally force the manipulation to succeed.
|
||||
Stack overflow could not be statically detected by trying various tweaks to the compiler.
|
||||
Information that would be required for this static detection was evaluated, and was found to be not completely available in the present compiler architecture.
|
||||
\section{Protecting \textit{'static}ally allocated Resources}
|
||||
|
||||
A practical introduction to Rust was given, overviewing the encountered language features and the ones that were explicitly investigated.
|
||||
Rust was found to have extension features only limited by the complexity of its usage, demonstrated by an implementation of pure-software information flow control.
|
||||
\section{The Necessary Evils of \textit{unsafe}}
|
||||
|
||||
Existing OS development efforts were investigated to serve as a codebase for the development and to evaluate their usage of Rust for achieving memory-safety.
|
||||
Redox OS was found to not be vulnerable to the Stack Clash due to design decisions in the OS.
|
||||
Blog OS was found to demonstrate extensive usage of Rust's type system to model underlying hardware and prevent mistakes in the paging implementation.
|
||||
\section{Extending Rust For Safe OS Development}
|
||||
|
||||
Implementation of preemptive multitasking was chosen to be based on intermezzOS for its simplicity.
|
||||
After initial problems with the build and debugging tools were solved, the development could proceed quickly.
|
||||
Based on the state of intermezzOS that allowed the system to boot, a working preemptive multitasking was implemented successfully.
|
||||
The implementation only supports static memory allocation and no dynamic memory management.
|
||||
Writing a hardware-driver for the Programmable-Interrupt-Timer was well supported by the module and type system, which allowed an accurate modeling of the underlying hardware.
|
||||
Global OS state variables can be protected by requiring Rust's unsafe keyword and disallowing the same within additional defined tasks.
|
||||
Extensive usage of the unsafe keyword was required to perform raw hardware access, but could be limited to well-defined functions.
|
||||
Inline machine-instructions were found to be well designed and in-line with the rest of the language.
|
||||
One occurrence of a cast from an untyped pointer was necessary, within the context-switching interrupt handler, to manipulate data on the stack.
|
||||
A stack overflow on user defined tasks could not be prevented by static analysis, only detected by the OS at runtime.
|
||||
\chapter{Summary}
|
||||
|
||||
\subsection{Thesis Evaluation}
|
||||
Rust's static analysis lacks the ability of static stack overflow detection, which is a significant counter-indication to the hypothesis.
|
||||
Using Rust's static memory analysis does not fully guarantee In-Kernel memory-safe.
|
||||
\chapter{Final Conclusion}
|
||||
Safety - or security for this matter - is not something that can be achieved absolutely.
|
||||
It grows successively and gives the \gls{os} developers and the end-users a \emph{feeling} of safety, until another vulnerability is found and disclosed.
|
||||
|
||||
\chapter{Conclusions}
|
||||
While hypothesis was not proven, Rust is still considered to be a significant improvement over C for OS development purposes.
|
||||
% TODO: repeat that rust *can* be used to increase safety in the OS,
|
||||
% TODO: how?
|
||||
% but it doesn't guarantee it per-se
|
||||
|
||||
\paragraph{Rust detects many errors early}
|
||||
It prevents many errors at compile-time where, they are harmless.
|
||||
The language is fully extendable via language extensions that allow the insertion of new language features that can be hooked into the static analysis.
|
||||
The process of making Rust suitable for OS development is driven by many hobby and a few production intended projects.
|
||||
\chapter{Scratchpad}
|
||||
|
||||
\section{Hardware is still hard, but Rust is worth learning}
|
||||
Even though Rust is understood as a memory-safe language, following the hardware specification is still a memory-safety critical requirement.
|
||||
OS developers must use the unsafe keyword when performing raw hardware access, which is designed to make them think twice when using it.
|
||||
If the chance is presented, Rust should be chosen any time over C for implementing software that is close to hardware.
|
||||
This might be difficult in the first place, but should pay off long-term, as less vulnerabilities will be detected throughout the extended life-cycle of the software.
|
||||
|
||||
\section{Next Step}
|
||||
Further investigation is required to propose a solution for the lack of static stack size estimation in \gls{Rust}.
|
||||
The immediate next step is to bring this issue up for a discussion in the Rust community.
|
||||
\begin{figure}[h!]
|
||||
\centering
|
||||
\begin{subfigure}[T]{0.50\textwidth}
|
||||
\tikzmarkcountprep{callee}
|
||||
\begin{compactminted}[
|
||||
escapeinside=??,linenos,autogobble,highlightlines={}
|
||||
]{nasm}
|
||||
mov rax,QWORD PTR [rbp-0x48]?\tikzmarkcount?
|
||||
add rsp,0x50?\tikzmarkcount?
|
||||
pop rbp?\tikzmarkcount?
|
||||
ret?\tikzmarkcount?
|
||||
\end{compactminted}
|
||||
\tikzmarkdrawcircles
|
||||
\caption{Subfig A}
|
||||
\end{subfigure}
|
||||
\begin{subfigure}[T]{0.45\textwidth}
|
||||
\foreach \x/\xtext in {
|
||||
1/{
|
||||
this is going to be a really long sentence with line wraps
|
||||
},
|
||||
2/{
|
||||
second
|
||||
}
|
||||
} {\tikzmarkcircle{\x}\xtext\\}
|
||||
\caption{Subfig B}
|
||||
\end{subfigure}
|
||||
\caption{Whadup}
|
||||
\label{Whadup}
|
||||
\end{figure}
|
||||
|
||||
% \chapter{Scratchpad}
|
||||
%
|
||||
% \begin{figure}[ht!]
|
||||
% \centering
|
||||
% \begin{subfigure}[T]{0.50\textwidth}
|
||||
% \tikzmarkcountprep{callee}
|
||||
% \begin{compactminted}[
|
||||
% escapeinside=??,linenos,autogobble,highlightlines={}
|
||||
% ]{nasm}
|
||||
% mov rax,QWORD PTR [rbp-0x48]?\tikzmarkcount?
|
||||
% add rsp,0x50?\tikzmarkcount?
|
||||
% pop rbp?\tikzmarkcount?
|
||||
% ret?\tikzmarkcount?
|
||||
% \end{compactminted}
|
||||
% \tikzmarkdrawcircles
|
||||
% \caption{Subfig A}
|
||||
% \end{subfigure}
|
||||
% \begin{subfigure}[T]{0.45\textwidth}
|
||||
% \foreach \x/\xtext in {
|
||||
% 1/{
|
||||
% this is going to be a really long sentence with line wraps
|
||||
% },
|
||||
% 2/{
|
||||
% second
|
||||
% }
|
||||
% } {\tikzmarkcircle{\x}\xtext\\}
|
||||
% \caption{Subfig B}
|
||||
% \end{subfigure}
|
||||
% \caption{Whadup}
|
||||
% \label{Whadup}
|
||||
% \end{figure}
|
||||
%
|
||||
% \begin{listing}
|
||||
% \tikzmarkcountprep{example1}
|
||||
% \begin{minted}[
|
||||
% label=example1,labelposition=all,escapeinside=??,linenos,autogobble,highlightlines={}
|
||||
% ]{nasm}
|
||||
% mov rax,QWORD PTR [rbp-0x48]?\tikzmarkcount? ?\tikzmark{brace1upper}?
|
||||
% add rsp,0x50?\tikzmarkcount?
|
||||
% pop rbp?\tikzmarkcount?
|
||||
% ret?\tikzmarkcount? ?\tikzmark{brace1lower}?
|
||||
% \end{minted}
|
||||
% \begin{minted}[
|
||||
% escapeinside=??,linenos,autogobble,highlightlines={}
|
||||
% ]{nasm}
|
||||
% mov rax,QWORD PTR [rbp-0x48]?\tikzmarkcount?
|
||||
% add rsp,0x50 ?\tikzmarkcount?
|
||||
% pop rbp ?\tikzmarkcount?
|
||||
% ret ?\tikzmarkcount?
|
||||
% \end{minted}
|
||||
% \begin{tikzpicture}[remember picture,overlay]
|
||||
% \draw[thick,decorate,decoration={brace,raise=1ex}]
|
||||
% (pic cs:brace1upper)+(0,1.5ex) -- node[shape=coordinate][right=1.5ex] (a) {} (pic cs:brace1lower);
|
||||
% \fill (a)+(2ex,0) circle[opacity=1,radius=1.1ex] node[white,font=\small]{a};
|
||||
% \end{tikzpicture}
|
||||
% \tikzmarkdrawcircles
|
||||
% \caption{Minted Listing A}
|
||||
% %
|
||||
% \foreach \x/\xtext in {
|
||||
% 1/{
|
||||
% this is going to be a really long sentence with line wraps
|
||||
% \\}
|
||||
% ,2/{
|
||||
% second
|
||||
% \\}
|
||||
% ,5/{},6/{
|
||||
% hi
|
||||
% \\}
|
||||
% ,a/{
|
||||
% hi
|
||||
% \\}
|
||||
% } {\tikzmarkcircle{\x}\xtext}
|
||||
% %
|
||||
% \end{listing}
|
||||
% \FloatBarrier
|
||||
%
|
||||
% \begin{listing}
|
||||
% \tikzset{/minted/basename=example}
|
||||
% \begin{minted}[label=caller,labelposition=topline,escapeinside=??,highlightlines={},autogobble,linenos,breaklines=true]{nasm}
|
||||
% mov rcx,QWORD PTR [rbp-0x40] ; copy 1st arg to rcx
|
||||
% mov rsi,QWORD PTR [rbp-0x38] ; copy 2nd arg to rsi
|
||||
% mov rdx,QWORD PTR [rbp-0x30] ; copy 3rd arg to rdx
|
||||
% mov QWORD PTR [rbp-0x60],rdi ; save rdi to make it available
|
||||
% mov rdi,rcx ; copy 1st arg to rdi
|
||||
% mov QWORD PTR [rbp-0x68],rax ; save rax to make it available
|
||||
% call 7490?\tikzmark{exampleprecallfrom}? <_ZN14stack_handling3sum17h8f12d2383e075691E> ; push '756e' onto the stack and jump to the first instruction of sum
|
||||
% mov QWORD PTR [rbp-0x28],rax ; save return value
|
||||
% \end{minted}
|
||||
% \caption{Function Call with Three Arguments}
|
||||
% \begin{tikzpicture}[remember picture,overlay]
|
||||
% \draw[red,thick] (pic cs:exampleprecallfrom) ellipse (0.7cm and 12pt) node { \textbf{1} };
|
||||
% \fill[blue] (pic cs:example1) circle (0.1cm);
|
||||
% \fill[yellow] (pic cs:example2) circle (0.1cm);
|
||||
% \end{tikzpicture}
|
||||
% \end{listing}
|
||||
%
|
||||
% \begin{tikzpicture}[node distance=2cm,
|
||||
% startstop/.style={rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30},
|
||||
% io/.style = {trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30},
|
||||
% process/.style = {rectangle, minimum width=1cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30},
|
||||
% decision/.style = {diamond, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=green!30},
|
||||
% arrow/.style = {thick,->,>=stealth}
|
||||
% ]
|
||||
%
|
||||
% %\node (start) [startstop] {Start};
|
||||
% %\node (in1) [io, below of=start] {Input};
|
||||
% %\node (pro1) [process, below of=in1] {Process 1};
|
||||
% %\node (dec1) [decision, below of=pro1, yshift=-0.5cm] {Decision 1};
|
||||
% %\node (pro2a) [process, below of=dec1, yshift=-0.5cm] {Process 2a text text text text text text text text text text};
|
||||
% %\node (pro2b) [process, right of=dec1, xshift=2cm] {Process 2b};
|
||||
% %\node (out1) [io, below of=pro2a] {Output};
|
||||
% %\node (stop) [startstop, below of=out1] {Stop};
|
||||
% %
|
||||
% %\draw [arrow] (start) -- (in1);
|
||||
% %\draw [arrow] (in1) -- (pro1);
|
||||
% %\draw [arrow] (pro1) -- (dec1);
|
||||
% %\draw [arrow] (dec1) -- node[anchor=east] {yes} (pro2a);
|
||||
% %\draw [arrow] (dec1) -- node[anchor=south] {no} (pro2b);
|
||||
% %\draw [arrow] (pro2b) |- (pro1);
|
||||
% %\draw [arrow] (pro2a) -- (out1);
|
||||
% %\draw [arrow] (out1) -- (stop);
|
||||
%
|
||||
% \node[process,xshift=0ex,yshift=-0ex] (ua_back) {User Applications};
|
||||
% \node[process,xshift=0ex,yshift=-1ex] at (ua_back) {User Applications};
|
||||
% \node[process,xshift=0ex,yshift=-2ex] (ua) at (ua_back) {User Applications};
|
||||
%
|
||||
% \node[process,xshift=0ex,yshift=-0ex,below of=ua] (sl_back) {System Libraries};
|
||||
% \node[process,xshift=0ex,yshift=-1ex] at (sl_back) {System Libraries};
|
||||
% \node[process,xshift=0ex,yshift=-2ex] (sl) at (sl_back) {System Libraries};
|
||||
%
|
||||
% \node[process,xshift=0ex,yshift=-0ex,below of=sl] (os_back) {OS};
|
||||
% \node[process,xshift=0ex,yshift=-1ex] at (os_back) {OS API};
|
||||
% \node[process,xshift=0ex,yshift=-2ex] (os) at (os_back) {OS};
|
||||
%
|
||||
% \node[process,xshift=0ex,yshift=-0ex,left of=mem, below of=os] (cpu) {CPU};
|
||||
% \node[process,xshift=0ex,yshift=-0ex,right of=cpu] (mem) {Memory};
|
||||
% \node[process,xshift=0ex,yshift=-0ex,right of=mem] (otherhw) {Other HW};
|
||||
%
|
||||
% \draw [arrow] (ua) -- (sl);
|
||||
% \draw [arrow] (sl) -- (os);
|
||||
% \draw [arrow] (os) -- (cpu);
|
||||
% \draw [arrow] (os) -- (mem);
|
||||
% \draw [arrow] (os) -- (otherhw);
|
||||
%
|
||||
% TODO: improve
|
||||
%
|
||||
% \end{tikzpicture}
|
||||
%
|
||||
% \begin{markdown}
|
||||
% # Flow of Reasoning
|
||||
% * How to mitigate distributed weaknesses
|
||||
% - Don't distribute vulnerable software
|
||||
% - Produce less vulnerabilities
|
||||
% OR
|
||||
% - Detect vulnerabilities
|
||||
% * How to prevent vulnerabilities distribution?
|
||||
% - Human to make less mistakes; NOT VIABLE, see human aspect.
|
||||
% - Detect them before the \gls{app} is installed; see time aspect
|
||||
% * How to detect vulnerabilities
|
||||
% - Write runtime tests for the program
|
||||
% - Analyze the source code
|
||||
% * Runtime Tests
|
||||
% - Runs on every execution, thus wastes \gls{cpu} resources
|
||||
% - Program needs to handle it
|
||||
% -> Slow and too late in the software life cycle!
|
||||
% * Source Code Analysis
|
||||
% - Difficult for low-level code, would require hardware knowledge
|
||||
% - Compilers are source code analysers by nature
|
||||
% - Additional tools can help, but this takes more effort
|
||||
% -> chose a compiler with high analysis standards
|
||||
% * Choice of Compiler: Language Dependent
|
||||
% - C: Safe C, Cyclone, etc.: define sub language that is analyzable. MEH
|
||||
% - Rust: designed to be analyzable. WIN!
|
||||
% * Rust
|
||||
% - Can the analyzes be extended to suite OS dev?
|
||||
% \end{markdown}
|
||||
\begin{listing}
|
||||
\tikzmarkcountprep{example1}
|
||||
\begin{minted}[
|
||||
label=example1,labelposition=all,escapeinside=??,linenos,autogobble,highlightlines={}
|
||||
]{nasm}
|
||||
mov rax,QWORD PTR [rbp-0x48]?\tikzmarkcount? ?\tikzmark{brace1upper}?
|
||||
add rsp,0x50?\tikzmarkcount?
|
||||
pop rbp?\tikzmarkcount?
|
||||
ret?\tikzmarkcount? ?\tikzmark{brace1lower}?
|
||||
\end{minted}
|
||||
\begin{minted}[
|
||||
escapeinside=??,linenos,autogobble,highlightlines={}
|
||||
]{nasm}
|
||||
mov rax,QWORD PTR [rbp-0x48]?\tikzmarkcount?
|
||||
add rsp,0x50 ?\tikzmarkcount?
|
||||
pop rbp ?\tikzmarkcount?
|
||||
ret ?\tikzmarkcount?
|
||||
\end{minted}
|
||||
\begin{tikzpicture}[remember picture,overlay]
|
||||
\draw[thick,decorate,decoration={brace,raise=1ex}]
|
||||
(pic cs:brace1upper)+(0,1.5ex) -- node[shape=coordinate][right=1.5ex] (a) {} (pic cs:brace1lower);
|
||||
\fill (a)+(2ex,0) circle[opacity=1,radius=1.1ex] node[white,font=\small]{a};
|
||||
\end{tikzpicture}
|
||||
\tikzmarkdrawcircles
|
||||
\caption{Minted Listing A}
|
||||
%
|
||||
\foreach \x/\xtext in {
|
||||
1/{
|
||||
this is going to be a really long sentence with line wraps
|
||||
\\}
|
||||
,2/{
|
||||
second
|
||||
\\}
|
||||
,5/{},6/{
|
||||
hi
|
||||
\\}
|
||||
,a/{
|
||||
hi
|
||||
\\}
|
||||
} {\tikzmarkcircle{\x}\xtext}
|
||||
%
|
||||
\end{listing}
|
||||
\FloatBarrier
|
||||
|
||||
\begin{listing}
|
||||
\tikzset{/minted/basename=example}
|
||||
\begin{minted}[label=caller,labelposition=topline,escapeinside=??,highlightlines={},autogobble,linenos,breaklines=true]{nasm}
|
||||
mov rcx,QWORD PTR [rbp-0x40] ; copy 1st arg to rcx
|
||||
mov rsi,QWORD PTR [rbp-0x38] ; copy 2nd arg to rsi
|
||||
mov rdx,QWORD PTR [rbp-0x30] ; copy 3rd arg to rdx
|
||||
mov QWORD PTR [rbp-0x60],rdi ; save rdi to make it available
|
||||
mov rdi,rcx ; copy 1st arg to rdi
|
||||
mov QWORD PTR [rbp-0x68],rax ; save rax to make it available
|
||||
call 7490?\tikzmark{exampleprecallfrom}? <_ZN14stack_handling3sum17h8f12d2383e075691E> ; push '756e' onto the stack and jump to the first instruction of sum
|
||||
mov QWORD PTR [rbp-0x28],rax ; save return value
|
||||
\end{minted}
|
||||
\caption{Function Call with Three Arguments}
|
||||
\begin{tikzpicture}[remember picture,overlay]
|
||||
\draw[red,thick] (pic cs:exampleprecallfrom) ellipse (0.7cm and 12pt) node { \textbf{1} };
|
||||
\fill[blue] (pic cs:example1) circle (0.1cm);
|
||||
\fill[yellow] (pic cs:example2) circle (0.1cm);
|
||||
\end{tikzpicture}
|
||||
\end{listing}
|
||||
|
||||
\begin{tikzpicture}[node distance=2cm,
|
||||
startstop/.style={rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30},
|
||||
io/.style = {trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30},
|
||||
process/.style = {rectangle, minimum width=1cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30},
|
||||
decision/.style = {diamond, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=green!30},
|
||||
arrow/.style = {thick,->,>=stealth}
|
||||
]
|
||||
|
||||
%\node (start) [startstop] {Start};
|
||||
%\node (in1) [io, below of=start] {Input};
|
||||
%\node (pro1) [process, below of=in1] {Process 1};
|
||||
%\node (dec1) [decision, below of=pro1, yshift=-0.5cm] {Decision 1};
|
||||
%\node (pro2a) [process, below of=dec1, yshift=-0.5cm] {Process 2a text text text text text text text text text text};
|
||||
%\node (pro2b) [process, right of=dec1, xshift=2cm] {Process 2b};
|
||||
%\node (out1) [io, below of=pro2a] {Output};
|
||||
%\node (stop) [startstop, below of=out1] {Stop};
|
||||
%
|
||||
%\draw [arrow] (start) -- (in1);
|
||||
%\draw [arrow] (in1) -- (pro1);
|
||||
%\draw [arrow] (pro1) -- (dec1);
|
||||
%\draw [arrow] (dec1) -- node[anchor=east] {yes} (pro2a);
|
||||
%\draw [arrow] (dec1) -- node[anchor=south] {no} (pro2b);
|
||||
%\draw [arrow] (pro2b) |- (pro1);
|
||||
%\draw [arrow] (pro2a) -- (out1);
|
||||
%\draw [arrow] (out1) -- (stop);
|
||||
|
||||
\node[process,xshift=0ex,yshift=-0ex] (ua_back) {User Applications};
|
||||
\node[process,xshift=0ex,yshift=-1ex] at (ua_back) {User Applications};
|
||||
\node[process,xshift=0ex,yshift=-2ex] (ua) at (ua_back) {User Applications};
|
||||
|
||||
\node[process,xshift=0ex,yshift=-0ex,below of=ua] (sl_back) {System Libraries};
|
||||
\node[process,xshift=0ex,yshift=-1ex] at (sl_back) {System Libraries};
|
||||
\node[process,xshift=0ex,yshift=-2ex] (sl) at (sl_back) {System Libraries};
|
||||
|
||||
\node[process,xshift=0ex,yshift=-0ex,below of=sl] (os_back) {OS};
|
||||
\node[process,xshift=0ex,yshift=-1ex] at (os_back) {OS API};
|
||||
\node[process,xshift=0ex,yshift=-2ex] (os) at (os_back) {OS};
|
||||
|
||||
\node[process,xshift=0ex,yshift=-0ex,left of=mem, below of=os] (cpu) {CPU};
|
||||
\node[process,xshift=0ex,yshift=-0ex,right of=cpu] (mem) {Memory};
|
||||
\node[process,xshift=0ex,yshift=-0ex,right of=mem] (otherhw) {Other HW};
|
||||
|
||||
\draw [arrow] (ua) -- (sl);
|
||||
\draw [arrow] (sl) -- (os);
|
||||
\draw [arrow] (os) -- (cpu);
|
||||
\draw [arrow] (os) -- (mem);
|
||||
\draw [arrow] (os) -- (otherhw);
|
||||
|
||||
TODO: improve
|
||||
|
||||
\end{tikzpicture}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,198 +3,11 @@ Any changes to this file will be lost if it is regenerated by Mendeley.
|
|||
|
||||
BibTeX export options can be customized via Options -> BibTeX in Mendeley Desktop
|
||||
|
||||
@article{Beingessner2015,
|
||||
author = {Beingessner, Alexis},
|
||||
file = {:home/steveej/src/steveej/msc-thesis/docs/You can't spell trust without Rust.pdf:pdf},
|
||||
title = {{YOU CAN'T SPELL TRUST WITHOUT RUST}},
|
||||
year = {2015}
|
||||
}
|
||||
@misc{OsPhilOpp,
|
||||
author = {Oppermann, Philipp},
|
||||
title = {{Writing an OS in Rust}},
|
||||
url = {https://os.phil-opp.com/}
|
||||
}
|
||||
@article{Balasubramanian2017,
|
||||
abstract = {Rust is a new system programming language that offers a practical and safe alternative to C. Rust is unique in that it enforces safety without runtime overhead, most importantly, without the overhead of garbage collection. While zero-cost safety is remarkable on its own, we argue that the super-powers of Rust go beyond safety. In particular, Rust's linear type system enables capabilities that cannot be implemented efficiently in traditional languages, both safe and unsafe, and that dramatically improve security and reliability of system software. We show three examples of such capabilities: zero-copy software fault isolation, efficient static information flow analysis, and automatic checkpointing. While these capabilities have been in the spotlight of systems research for a long time, their practical use is hindered by high cost and complexity. We argue that with the adoption of Rust these mechanisms will become commoditized.},
|
||||
author = {Balasubramanian, Abhiram and Baranowski, Marek S and Burtsev, Anton and Irvine, Uc and Rakamari, Zvonimir and Ryzhyk, Leonid and Research, Vmware},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/DRAFT$\backslash$: System Programming in Rust$\backslash$: Beyond Safety.pdf:pdf},
|
||||
title = {{DRAFT: System Programming in Rust: Beyond Safety}},
|
||||
year = {2017}
|
||||
}
|
||||
@inproceedings{Ma2013,
|
||||
abstract = {—Aiming at the problem of higher memory consumption and lower execution efficiency during the dynamic detecting to C/C++ programs memory vulnerabilities, this paper presents a dynamic detection method called ISC. The ISC improves the Safe-C using pointer analysis technology. Firstly, the ISC defines a simple and efficient fat pointer representation instead of the safe pointer in the Safe-C. Furthermore, the ISC uses the unification-based analysis algorithm with one level flow static pointer. This identification reduces the number of pointers that need to be converted to fat pointers. Then in the process of program running, the ISC detects memory vulnerabilities through constantly inspecting the attributes of fat pointers. Experimental results indicate that the ISC could detect memory vulnerabilities such as buffer overflows and dangling pointers. Comparing with the Safe-C, the ISC dramatically reduces the memory consumption and lightly improves the execution efficiency.},
|
||||
author = {Ma, Rui and Chen, Lingkui and Hu, Changzhen and Xue, Jingfeng and Zhao, Xiaolin},
|
||||
booktitle = {Proceedings - 2013 IEEE 11th International Conference on Dependable, Autonomic and Secure Computing, DASC 2013},
|
||||
doi = {10.1109/DASC.2013.37},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/A Dynamic Detection Method to C-C++ Programs Memory Vulnerabilities Based on Pointer Analysis.pdf:pdf},
|
||||
isbn = {9781479933815},
|
||||
keywords = {dynamic detecting,fat pointer,improved Safe-C,memory vulnerability,pointer analysis},
|
||||
pages = {52--57},
|
||||
title = {{A dynamic detection method to C/C++ programs memory vulnerabilities based on pointer analysis}},
|
||||
year = {2013}
|
||||
}
|
||||
@article{Dhurjati2003,
|
||||
abstract = {Traditional approaches to enforcing memory safety of programs rely heavily on runtime checks of memory accesses and on garbage collection, both of which are unattractive for embedded applications. The long-term goal of our work is to enable 100{\%} static enforcement of memory safety for embedded programs through advanced compiler techniques and minimal semantic restrictions on programs. The key result of this paper is a compiler technique that ensures memory safety of dynamically allocated memory without programmer annotations, runtime checks, or garbage collection, and works for a large subclass of type-safe C programs. The technique is based on a fully automatic pool allocation (i.e., region-inference) algorithm for C programs we developed previously, and it ensures safety of dynamically allocated memory while retaining explicit deallocation of individual objects within regions (to avoid garbage collection). For a diverse set of embedded C programs (and using a previous technique to avoid null pointer checks), we show that we are able to statically ensure the safety of pointer and dynamic memory usage in all these programs. We also describe some improvements over our previous work in static checking of array accesses. Overall, we achieve 100{\%} static enforcement of memory safety without new language syntax for a significant subclass of embedded C programs, and the subclass is much broader if array bounds checks are ignored.},
|
||||
author = {Dhurjati, D and Kowshik, S and Adve, V and Lattner, C},
|
||||
doi = {10.1145/780742.780743},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/Memory Safety Without Runtime Checks or Garbage.pdf:pdf},
|
||||
isbn = {0362-1340},
|
||||
issn = {03621340},
|
||||
journal = {Acm Sigplan Notices},
|
||||
keywords = {automatic pool allocation,compilers,embedded systems,languages,programming languages,region management,security,static analysis},
|
||||
number = {7},
|
||||
pages = {69--80},
|
||||
title = {{Memory safety without runtime checks or garbage collection}},
|
||||
volume = {38},
|
||||
year = {2003}
|
||||
}
|
||||
@article{Junker,
|
||||
author = {Junker, Stefan},
|
||||
file = {:home/steveej/src/steveej/msc-thesis/src/docs/thesis.pdf:pdf},
|
||||
title = {{Guarantees On In-Kernel Memory-Safety Using Rust's Static Code Analysis}}
|
||||
}
|
||||
@misc{Endler,
|
||||
author = {Endler, Matthias},
|
||||
title = {{A curated list of static analysis tools, linters and code quality checkers for various programming languages}},
|
||||
url = {https://github.com/mre/awesome-static-analysis}
|
||||
}
|
||||
@article{Corporation2011,
|
||||
abstract = {The Intel{\{}$\backslash$textregistered{\}} 64 and IA-32 Architectures Software Developer's Manual, Volume 1, describes the basic architecture and programming environment of Intel 64 and IA-32 processors. The Intel{\{}$\backslash$textregistered{\}} 64 and IA-32 Architectures Software Developer's Manual, Volumes 2A {\&} 2B, describe the instruction set of the processor and the opcode struc- ture. These volumes apply to application programmers and to programmers who write operating systems or executives. The Intel{\{}$\backslash$textregistered{\}} 64 and IA-32 Architectures Software Developer's Manual, Volumes 3A {\&} 3B, describe the operating-system support environment of Intel 64 and IA-32 processors. These volumes target operating- system and BIOS designers. In addition, the Intel{\{}$\backslash$textregistered{\}} 64 and IA-32 Architectures Software Developer's Manual, Volume 3B, addresses the programming environment for classes of software that host operating systems.},
|
||||
author = {Corporation, Intel},
|
||||
doi = {10.1109/MAHC.2010.22},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/64-ia-32-architectures-software-developer-system-programming-manual-325384.pdf:pdf},
|
||||
isbn = {253665-057US},
|
||||
issn = {15222594},
|
||||
journal = {System},
|
||||
keywords = {253665,IA-32 architecture,Intel 64},
|
||||
number = {253665},
|
||||
title = {{Intel {\textregistered} 64 and IA-32 Architectures Software Developer ' s Manual Volume 3}},
|
||||
volume = {3},
|
||||
year = {2011}
|
||||
}
|
||||
@article{Matz2009,
|
||||
author = {Matz, M and Hubicka, J and Jaeger, a and Mitchell, M},
|
||||
file = {:home/steveej/src/steveej/msc-thesis/docs/System V Application Binary Interface AMD64 Architecture Processor Supplement Draft Version 0.99.7.pdf:pdf},
|
||||
isbn = {013877630X},
|
||||
pages = {1--128},
|
||||
pmid = {2477614},
|
||||
title = {{System V Application Binary Interface AMD64 Architecture Processor Supplement}},
|
||||
url = {papers2://publication/uuid/CD8D5668-B1F5-4FE3-BAD8-25F1E589A9E5},
|
||||
year = {2009}
|
||||
}
|
||||
@misc{MITRE-CWE-134,
|
||||
author = {MITRE},
|
||||
title = {{CWE-134: Use of Externally-Controlled Format String}},
|
||||
url = {http://cwe.mitre.org/data/definitions/134.html},
|
||||
urldate = {2017-09-20}
|
||||
}
|
||||
@article{Seri2017,
|
||||
abstract = {The dangers of Bluetooth implementations: Unveiling zero day vulnerabilities and security flaws in modern Bluetooth stacks.},
|
||||
author = {Seri, Ben and Vishnepolsky, Gregory},
|
||||
file = {:home/steveej/src/steveej/msc-thesis/docs/BlueBorne Technical White Paper.pdf:pdf},
|
||||
title = {{BlueBorne}},
|
||||
url = {http://go.armis.com/blueborne-technical-paper},
|
||||
year = {2017}
|
||||
}
|
||||
@article{Reed2015,
|
||||
abstract = {Rust is a new systems language that uses some advanced type system features, specifically affine types and regions, to statically guarantee memory safety and eliminate the need for a garbage collector. While each individual addition to the type system is well understood in isolation and are known to be sound, the combined system is not known to be sound. Furthermore, Rust uses a novel checking scheme for its regions, known as the Borrow Checker, that is not known to be correct. Since Rust's goal is to be a safer alternative to C/C++, we should ensure that this safety scheme actually works. We present a formal semantics that captures the key features relevant to memory safety, unique pointers and borrowed references, specifies how they guarantee memory safety, and describes the operation of the Borrow Checker. We use this model to prove the soudness of some core operations and justify the conjecture that the model, as a whole, is sound. Additionally, our model provides a syntactic version of the Borrow Checker, which may be more understandable than the non-syntactic version in Rust.},
|
||||
author = {Reed, Eric},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/Patina$\backslash$: A Formalization of the Rust Programming Language.pdf:pdf},
|
||||
number = {February},
|
||||
pages = {1--37},
|
||||
title = {{Patina: A Formalization of the Rust Programming Language}},
|
||||
year = {2015}
|
||||
}
|
||||
@misc{IEEEspectrum-proglangs,
|
||||
author = {IEEE},
|
||||
title = {{Interactive: The Top Programming Languages 2017}},
|
||||
url = {https://spectrum.ieee.org/static/interactive-the-top-programming-languages-2017},
|
||||
urldate = {2017-09-08},
|
||||
year = {2017}
|
||||
}
|
||||
@article{Mailloux1969,
|
||||
author = {Mailloux, B. J. and Peck, J. E L and Koster, C. H A},
|
||||
doi = {10.1007/BF02163002},
|
||||
file = {:home/steveej/src/steveej/msc-thesis/docs/Algol68-RevisedReport.pdf:pdf},
|
||||
isbn = {978-3-662-38646-0},
|
||||
issn = {0029599X},
|
||||
journal = {Numerische Mathematik},
|
||||
number = {2},
|
||||
pages = {79--218},
|
||||
title = {{Report on the Algorithmic Language ALGOL 68}},
|
||||
volume = {14},
|
||||
year = {1969}
|
||||
}
|
||||
@misc{TockOS,
|
||||
title = {{Tock OS}},
|
||||
url = {https://www.tockos.org/},
|
||||
urldate = {2017-09-22}
|
||||
}
|
||||
@article{Xu2015,
|
||||
abstract = {Since vulnerabilities in Linux kernel are on the increase, attackers have turned their interests into related exploitation techniques. However, compared with numerous researches on exploiting use-after-free vulnerabilities in the user applications, few efforts studied how to exploit use-after-free vulnerabilities in Linux kernel due to the difficulties that mainly come from the uncertainty of the kernel memory layout. Without specific information leakage, attackers could only conduct a blind memory overwriting strategy trying to corrupt the critical part of the kernel, for which the success rate is negligible. In this work, we present a novel memory collision strategy to exploit the use-after-free vulnerabilities in Linux kernel reliably. The insight of our exploit strategy is that a probabilistic memory collision can be constructed according to the widely deployed kernel memory reuse mechanisms, which significantly increases the success rate of the attack. Based on this insight, we present two practical memory collision attacks: An object-based attack that leverages the memory recycling mechanism of the kernel allocator to achieve freed vulnerable object covering, and a physmap-based attack that takes advantage of the overlap between the physmap and the SLAB caches to achieve a more flexible memory manipulation. Our proposed attacks are universal for various Linux kernels of different architectures and could successfully exploit systems with use-after-free vulnerabilities in kernel. Particularly, we achieve privilege escalation on various popular Android devices (kernel version{\textgreater}=4.3) including those with 64-bit processors by exploiting the CVE-2015-3636 use-after-free vulnerability in Linux kernel. To our knowledge, this is the first generic kernel exploit for the latest version of Android. Finally, to defend this kind of memory collision, we propose two corresponding mitigation schemes.},
|
||||
author = {Xu, Wen and Li, Juanru and Shu, Junliang and Yang, Wenbo and Xie, Tianyi and Zhang, Yuanyuan and Gu, Dawu},
|
||||
doi = {10.1145/2810103.2813637},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/From Collision To Exploitation$\backslash$: Unleashing Use-After-Free Vulnerabilities in Linux Kernel.pdf:pdf},
|
||||
isbn = {978-1-4503-3832-5},
|
||||
issn = {15437221},
|
||||
journal = {Ccs},
|
||||
keywords = {linux kernel exploit,memory collision,user-after-free vulnerability},
|
||||
pages = {414--425},
|
||||
title = {{From Collision To Exploitation: Unleashing Use-After-Free Vulnerabilities in Linux Kernel}},
|
||||
url = {http://dl.acm.org/citation.cfm?doid=2810103.2813637},
|
||||
year = {2015}
|
||||
}
|
||||
@misc{MITRE-CWE-635,
|
||||
author = {MITRE},
|
||||
title = {{CWE-635: Weaknesses Used by NVD}},
|
||||
url = {http://cwe.mitre.org/data/definitions/635.html},
|
||||
urldate = {2017-08-05}
|
||||
}
|
||||
@misc{NVD,
|
||||
title = {{National Vulnerability Database}},
|
||||
url = {https://nvd.nist.gov/},
|
||||
urldate = {2017-08-05}
|
||||
}
|
||||
@article{Jim2002,
|
||||
abstract = {Cyclone is a safe dialect of C. It has been designed from the ground up to prevent the buer overflows, format string attacks, and memory management errors that are common in C programs, while retaining C's syntax and semantics. This paper examines safety violations enabled by C's design, and shows how Cyclone avoids them, without giving up C's hallmark control over low-level details such as data representation and memory management.},
|
||||
author = {Jim, Trevor and Morrisett, Greg and Grossman, Dan and Hicks, Michael and Cheney, James and Wang, Yanling},
|
||||
isbn = {1-880446-00-6},
|
||||
journal = {USENIX Annual Technical Conference},
|
||||
pages = {275--288},
|
||||
title = {{Cyclone: A safe dialect of C}},
|
||||
url = {http://www.usenix.org/events/usenix02/full{\_}papers/jim/jim{\_}html/},
|
||||
year = {2002}
|
||||
}
|
||||
@misc{MITRE-CWE-633,
|
||||
author = {MITRE},
|
||||
title = {{CWE-633: Weaknesses that Affect Memory}},
|
||||
url = {http://cwe.mitre.org/data/definitions/633.html},
|
||||
urldate = {2017-08-31},
|
||||
year = {2017}
|
||||
}
|
||||
@misc{MITRE-CWE-119,
|
||||
author = {MITRE},
|
||||
booktitle = {2.11},
|
||||
title = {{CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer}},
|
||||
url = {http://cwe.mitre.org/data/definitions/119.html},
|
||||
urldate = {2017-08-31},
|
||||
year = {2017}
|
||||
}
|
||||
@misc{MITRE-CWE-122,
|
||||
author = {MITRE},
|
||||
title = {{CWE-122: Heap-based Buffer Overflow}},
|
||||
url = {http://cwe.mitre.org/data/definitions/122.html},
|
||||
urldate = {2017-09-26}
|
||||
}
|
||||
@inproceedings{Kuznetsov2014,
|
||||
abstract = {Systems code is often written in low-level languages like C/C++, which offer many benefits but also dele- gate memory management to programmers. This invites memory safety bugs that attackers can exploit to divert control flow and compromise the system. Deployed de- fense mechanisms (e.g., ASLR, DEP) are incomplete, and stronger defense mechanisms (e.g., CFI) often have high overhead and limited guarantees [19, 15, 9]. We introduce code-pointer integrity (CPI), a new de- sign point that guarantees the integrity of all code point- ers in a program (e.g., function pointers, saved return ad- dresses) and thereby prevents all control-flow hijack at- tacks, including return-oriented programming. We also introduce code-pointer separation (CPS), a relaxation of CPI with better performance properties. CPI and CPS offer substantially better security-to-overhead ratios than the state of the art, they are practical (we protect a complete FreeBSD system and over 100 packages like apache and postgresql), effective (prevent all attacks in the RIPE benchmark), and efficient: on SPEC CPU2006, CPS averages 1.2{\%} overhead for C and 1.9{\%} for C/C++, while CPI's overhead is 2.9{\%} for C and 8.4{\%} for C/C++. A prototype implementation of CPI and CPS can be obtained from http://levee.epfl.ch. 1},
|
||||
author = {Kuznetsov, Volodymyr and Szekeres, L{\'{a}}szl{\'{o}} and Payer, Mathias},
|
||||
booktitle = {Proceedings of the 11th USENIX Symposium on Operating Systems Design and Implementation},
|
||||
isbn = {9781931971164},
|
||||
pages = {147--163},
|
||||
title = {{Code-pointer integrity}},
|
||||
url = {https://www.usenix.org/conference/osdi14/technical-sessions/presentation/kuznetsov{\%}5Cnhttps://www.usenix.org/system/files/conference/osdi14/osdi14-paper-kuznetsov.pdf?utm{\_}source=dlvr.it{\&}utm{\_}medium=tumblr},
|
||||
year = {2014}
|
||||
@misc{TheStackClash,
|
||||
author = {Advisory, Qualys Security},
|
||||
file = {:home/steveej/src/steveej/msc-thesis/docs/stack-clash.txt:txt},
|
||||
title = {{The Stack Clash}},
|
||||
url = {https://www.qualys.com/2017/06/19/stack-clash/stack-clash.txt}
|
||||
}
|
||||
@article{Lattner2005,
|
||||
abstract = {The LLVM Compiler Infrastructure (http://llvm.cs. uiuc.edu) is a$\backslash$nrobust system that is well suited for a wide variety of research$\backslash$nand development work. This brief paper introduces the LLVM system$\backslash$nand provides pointers to more extensive documentation, complementing$\backslash$nthe tutorial presented at LCPC.},
|
||||
|
@ -214,124 +27,6 @@ title = {{The LLVM Compiler Framework and Infrastructure Tutorial}},
|
|||
url = {http://dx.doi.org/10.1007/11532378{\_}2},
|
||||
year = {2005}
|
||||
}
|
||||
@article{Nilsson2017,
|
||||
author = {Nilsson, Fredrik},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/A Rust-based Runtime for the Internet of Things.pdf:pdf},
|
||||
title = {{A Rust-based Runtime for the Internet of Things}},
|
||||
year = {2017}
|
||||
}
|
||||
@misc{MITRE-CWE,
|
||||
author = {MITRE},
|
||||
title = {{CWE - Common Weakness Enumeration}},
|
||||
url = {http://cwe.mitre.org},
|
||||
urldate = {2017-08-31},
|
||||
year = {2017}
|
||||
}
|
||||
@article{Szekeres2013,
|
||||
abstract = {Memory corruption bugs in software written in low-level languages like C or C++ are one of the oldest problems in computer security. The lack of safety in these languages allows attackers to alter the program's behavior or take full control over it by hijacking its control flow. This problem has existed for more than 30 years and a vast number of potential solutions have been proposed, yet memory corruption attacks continue to pose a serious threat. Real world exploits show that all currently deployed protections can be defeated. This paper sheds light on the primary reasons for this by describing attacks that succeed on today's systems. We systematize the current knowledge about various protection techniques by setting up a general model for memory corrup- tion attacks. Using this model we show what policies can stop which attacks. The model identifies weaknesses of currently deployed techniques, as well as other proposed protections enforcing stricter policies. We analyze the reasons why protection mechanisms imple- menting stricter polices are not deployed. To achieve wide adoption, protection mechanisms must support a multitude of features and must satisfy a host of requirements. Especially important is performance, as experience shows that only solutions whose overhead is in reasonable bounds get deployed. A comparison of different enforceable policies helps de- signers of new protection mechanisms in finding the balance between effectiveness (security) and efficiency.We identify some open research problems, and provide suggestions on improving the adoption of newer techniques.},
|
||||
author = {Szekeres, L??szl?? and Payer, Mathias and Wei, Tao and Song, Dawn},
|
||||
doi = {10.1109/SP.2013.13},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/SoK$\backslash$: Eternal War in Memory.pdf:pdf},
|
||||
isbn = {9780769549774},
|
||||
issn = {10816011},
|
||||
journal = {Proceedings - IEEE Symposium on Security and Privacy},
|
||||
pages = {48--62},
|
||||
title = {{SoK: Eternal war in memory}},
|
||||
year = {2013}
|
||||
}
|
||||
@article{Arpaci-Dusseau2015,
|
||||
abstract = {A book covering the fundamentals of operating systems, including virtualization of the CPU and memory, threads and concurrency, and file and storage systems. Written by professors active in the field for 20 years, this text has been developed in the classrooms of the University of Wisconsin-Madison, and has been used in the instruction of thousands of students.},
|
||||
author = {{Arpaci-Dusseau Remzi}, Arpaci-Dusseau Andrea},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/operating{\_}systems{\_}{\_}three{\_}easy{\_}pieces{\_}{\_}electronic{\_}version{\_}0{\_}91{\_}.pdf:pdf},
|
||||
journal = {Arpaci-Dusseau},
|
||||
number = {0.91},
|
||||
pages = {665},
|
||||
title = {{Operating Systems: Three Easy Pieces}},
|
||||
volume = {Electronic},
|
||||
year = {2015}
|
||||
}
|
||||
@article{Kowshik2002,
|
||||
abstract = {This paper considers the problem of providing safe programming support and enabling secure online software upgrades for control software in real-time control systems. In such systems, offline techniques for ensuring code safety are greatly preferable to online techniques. We propose a language called Control-C that is essentially a subset of C, but with key restrictions designed to ensure that memory safety of code can be verified entirely by static checking, under certain system assumptions. The language permits pointer-based data structures, restricted dynamic memory allocation, and restricted array operations, without requiring any runtime checks on memory operations and without garbage collection. The language restrictions have been chosen based on an understanding of both compiler technology and the needs of real-time control systems. The paper describes the language design and a compiler implementation for Control-C. We use control codes from three different experimental control systems to evaluate the suitability of the language for these codes, the effort required to port them to Control-C, and the effectiveness of the compiler in detecting a wide range of potential security violations for one of the systems.},
|
||||
author = {Kowshik, Sumant and Dhurjati, Dinakar and Adve, Vikram},
|
||||
doi = {10.1145/581677.581678},
|
||||
file = {:home/steveej/src/steveej/msc-thesis/docs/Ensuring Code Safety Without Runtime Checks for Real-Time Control Systems.pdf:pdf},
|
||||
isbn = {1581135750},
|
||||
journal = {Proceedings of the international conference on Compilers, architecture, and synthesis for embedded systems - CASES '02},
|
||||
keywords = {compiler,control,programming language,real-time,static analy-},
|
||||
pages = {288},
|
||||
title = {{Ensuring code safety without runtime checks for real-time control systems}},
|
||||
url = {http://portal.acm.org/citation.cfm?doid=581630.581678},
|
||||
year = {2002}
|
||||
}
|
||||
@misc{TheStackClash,
|
||||
author = {Advisory, Qualys Security},
|
||||
file = {:home/steveej/src/steveej/msc-thesis/docs/stack-clash.txt:txt},
|
||||
title = {{The Stack Clash}},
|
||||
url = {https://www.qualys.com/2017/06/19/stack-clash/stack-clash.txt}
|
||||
}
|
||||
@book{AMD64Vol1,
|
||||
author = {AMD},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/AMD64 Architecture Programmer's Manual Volume 1$\backslash$: Application Programming.pdf:pdf},
|
||||
keywords = {AMD64,SIMD,extended media instructions,legacy m},
|
||||
number = {26568},
|
||||
title = {{AMD64 Architecture Programmer's Manual Volume 1: Application Programming}},
|
||||
volume = {4},
|
||||
year = {2012}
|
||||
}
|
||||
@article{Chisnall2015,
|
||||
abstract = {We propose a new memory-safe interpretation of the C ab-stract machine that provides stronger protection to benefit security and debugging. Despite ambiguities in the specifi-cation intended to provide implementation flexibility, con-temporary implementations of C have converged on a mem-ory model similar to the PDP-11, the original target for C. This model lacks support for memory safety despite well-documented impacts on security and reliability. Attempts to change this model are often hampered by as-sumptions embedded in a large body of existing C code, dat-ing back to the memory model exposed by the original C compiler for the PDP-11. Our experience with attempting to implement a memory-safe variant of C on the CHERI ex-perimental microprocessor led us to identify a number of problematic idioms. We describe these as well as their in-teraction with existing memory safety schemes and the as-sumptions that they make beyond the requirements of the C specification. Finally, we refine the CHERI ISA and abstract model for C, by combining elements of the CHERI capabil-ity model and fat pointers, and present a softcore CPU that implements a C abstract machine that can run legacy C code with strong memory protection guarantees.},
|
||||
author = {Chisnall, David and Rothwell, Colin and Watson, Robert N M and Woodruff, Jonathan and Vadera, Munraj and Moore, Simon W and Roe, Michael and Davis, Brooks and Neumann, Peter G},
|
||||
doi = {10.1145/2694344.2694367},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/Beyond the PDP-11$\backslash$: Architectural support for a memory-safe C abstract machine.pdf:pdf},
|
||||
isbn = {9781450328357},
|
||||
issn = {01635964},
|
||||
journal = {Proceedings of the Twentieth International Conference on Architectural Support for Programming Languages and Operating Systems},
|
||||
pages = {117--130},
|
||||
title = {{Beyond the PDP-11 : Architectural support for a memory-safe C abstract machine}},
|
||||
url = {http://www.cl.cam.ac.uk/research/security/ctsrd/pdfs/201503-asplos2015-cheri-cmachine.pdf},
|
||||
year = {2015}
|
||||
}
|
||||
@article{GCC540,
|
||||
abstract = {This manual documents how to use the GNU compilers, as well as their features and incom- patibilities, and how to report bugs. It corresponds to the compilers (GCC) version 5.4.0. The internals of the GNU compilers, including how to port them to new targets and some information about how to write front ends for new languages, are documented in a separate manual. See Section Introduction in GNU Compiler Collection (GCC) Internals.},
|
||||
author = {Stallman, Richard M},
|
||||
file = {:home/steveej/src/steveej/msc-thesis/docs/gcc-5.4.0.pdf:pdf},
|
||||
isbn = {188211437X},
|
||||
journal = {Development},
|
||||
title = {{Using the GNU Compiler Collection}},
|
||||
url = {https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gcc.pdf}
|
||||
}
|
||||
@article{Getreu2016,
|
||||
annote = {- runtime checkis are expensive
|
||||
|
||||
- critical with energy restriction on the target device},
|
||||
author = {Getreu, Jens},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/Embedded System Security with Rust - Case Study of Heartbleed.pdf:pdf},
|
||||
pages = {1--24},
|
||||
title = {{Embedded System Security with Rust}},
|
||||
year = {2016}
|
||||
}
|
||||
@book{AMD64Vol2,
|
||||
author = {AMD},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/AMD64 Architecture Programmer's Manual Volume 2$\backslash$: System Programming.pdf:pdf},
|
||||
keywords = {24593,AMD64 Architecture Programmer's Manual Volume 2: S},
|
||||
number = {24592},
|
||||
title = {{AMD64 Architecture Programmer's Manual Volume 2: System Programming}},
|
||||
volume = {1},
|
||||
year = {2012}
|
||||
}
|
||||
@article{Caballero2012,
|
||||
abstract = {Use-after-free vulnerabilities are rapidly growing in popularity, especially for exploiting web browsers. Use-after-free (and double-free) vulnerabilities are caused by a program operating on a dangling pointer. In this work we propose early detection, a novel runtime approach for finding and diagnosing use-after-free and double-free vulnerabilities. While previous work focuses on the creation of the vulnerability (i.e., the use of a dangling pointer), early detection shifts the focus to the creation of the dangling pointer(s) at the root of the vulnerability. Early detection increases the effectiveness of testing by identifying unsafe dangling pointers in executions where they are created but not used. It also accelerates vulnerability analysis and minimizes the risk of incomplete fixes, by automatically collecting information about all dangling pointers involved in the vulnerability. We implement our early detection technique in a tool called Undangle. We evaluate Undangle for vulnerability analysis on 8 real-world vulnerabilities. The analysis uncovers that two separate vulnerabilities in Firefox had a common root cause and that their patches did not completely fix the underlying bug. We also evaluate Undangle for testing on the Firefox web browser identifying a potential vulnerability.},
|
||||
author = {Caballero, Juan and Grieco, Gustavo and Marron, Mark and Nappa, Antonio},
|
||||
doi = {10.1145/2338965.2336769},
|
||||
isbn = {9781450314541},
|
||||
issn = {1450314546},
|
||||
journal = {ISSTA},
|
||||
keywords = {automated testing,binary analysis,debugging,dynamic analysis},
|
||||
pages = {133},
|
||||
title = {{Undangle: early detection of dangling pointers in use-after-free and double-free vulnerabilities}},
|
||||
url = {http://dl.acm.org/citation.cfm?doid=2338965.2336769},
|
||||
year = {2012}
|
||||
}
|
||||
@article{Levy2015a,
|
||||
abstract = {Rust, a new systems programming language, provides compile-time memory safety checks to help eliminate runtime bugs that manifest from improper memory management. This feature is advantageous for operating system development, and especially for embedded OS development, where recovery and debugging are particularly challenging. However, embedded platforms are highly event-based, and Rust's memory safety mechanisms largely presume threads. In our experience developing an operating system for embedded systems in Rust, we have found that Rust's ownership model prevents otherwise safe resource sharing common in the embedded domain, conflicts with the reality of hardware resources, and hinders using closures for programming asynchronously. We describe these experiences and how they relate to memory safety as well as illustrate our workarounds that preserve the safety guarantees to the largest extent possible. In addition, we draw from our experience to propose a new language extension to Rust that would enable it to provide better memory safety tools for event-driven platforms.},
|
||||
author = {Levy, Amit and Andersen, Michael P. and Campbell, Bradford and Culler, David and Dutta, Prabal and Ghena, Branden and Levis, Philip and Pannuto, Pat},
|
||||
|
@ -359,3 +54,235 @@ title = {{Intel {\textregistered} 64 and IA-32 Architectures Software Developer
|
|||
volume = {1},
|
||||
year = {2011}
|
||||
}
|
||||
@misc{IEEEspectrum-proglangs,
|
||||
author = {IEEE},
|
||||
title = {{Interactive: The Top Programming Languages 2017}},
|
||||
url = {https://spectrum.ieee.org/static/interactive-the-top-programming-languages-2017},
|
||||
urldate = {2017-09-08},
|
||||
year = {2017}
|
||||
}
|
||||
@article{Xu2015,
|
||||
abstract = {Since vulnerabilities in Linux kernel are on the increase, attackers have turned their interests into related exploitation techniques. However, compared with numerous researches on exploiting use-after-free vulnerabilities in the user applications, few efforts studied how to exploit use-after-free vulnerabilities in Linux kernel due to the difficulties that mainly come from the uncertainty of the kernel memory layout. Without specific information leakage, attackers could only conduct a blind memory overwriting strategy trying to corrupt the critical part of the kernel, for which the success rate is negligible. In this work, we present a novel memory collision strategy to exploit the use-after-free vulnerabilities in Linux kernel reliably. The insight of our exploit strategy is that a probabilistic memory collision can be constructed according to the widely deployed kernel memory reuse mechanisms, which significantly increases the success rate of the attack. Based on this insight, we present two practical memory collision attacks: An object-based attack that leverages the memory recycling mechanism of the kernel allocator to achieve freed vulnerable object covering, and a physmap-based attack that takes advantage of the overlap between the physmap and the SLAB caches to achieve a more flexible memory manipulation. Our proposed attacks are universal for various Linux kernels of different architectures and could successfully exploit systems with use-after-free vulnerabilities in kernel. Particularly, we achieve privilege escalation on various popular Android devices (kernel version{\textgreater}=4.3) including those with 64-bit processors by exploiting the CVE-2015-3636 use-after-free vulnerability in Linux kernel. To our knowledge, this is the first generic kernel exploit for the latest version of Android. Finally, to defend this kind of memory collision, we propose two corresponding mitigation schemes.},
|
||||
author = {Xu, Wen and Li, Juanru and Shu, Junliang and Yang, Wenbo and Xie, Tianyi and Zhang, Yuanyuan and Gu, Dawu},
|
||||
doi = {10.1145/2810103.2813637},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/From Collision To Exploitation$\backslash$: Unleashing Use-After-Free Vulnerabilities in Linux Kernel.pdf:pdf},
|
||||
isbn = {978-1-4503-3832-5},
|
||||
issn = {15437221},
|
||||
journal = {Ccs},
|
||||
keywords = {linux kernel exploit,memory collision,user-after-free vulnerability},
|
||||
pages = {414--425},
|
||||
title = {{From Collision To Exploitation: Unleashing Use-After-Free Vulnerabilities in Linux Kernel}},
|
||||
url = {http://dl.acm.org/citation.cfm?doid=2810103.2813637},
|
||||
year = {2015}
|
||||
}
|
||||
@inproceedings{Ma2013,
|
||||
abstract = {—Aiming at the problem of higher memory consumption and lower execution efficiency during the dynamic detecting to C/C++ programs memory vulnerabilities, this paper presents a dynamic detection method called ISC. The ISC improves the Safe-C using pointer analysis technology. Firstly, the ISC defines a simple and efficient fat pointer representation instead of the safe pointer in the Safe-C. Furthermore, the ISC uses the unification-based analysis algorithm with one level flow static pointer. This identification reduces the number of pointers that need to be converted to fat pointers. Then in the process of program running, the ISC detects memory vulnerabilities through constantly inspecting the attributes of fat pointers. Experimental results indicate that the ISC could detect memory vulnerabilities such as buffer overflows and dangling pointers. Comparing with the Safe-C, the ISC dramatically reduces the memory consumption and lightly improves the execution efficiency.},
|
||||
author = {Ma, Rui and Chen, Lingkui and Hu, Changzhen and Xue, Jingfeng and Zhao, Xiaolin},
|
||||
booktitle = {Proceedings - 2013 IEEE 11th International Conference on Dependable, Autonomic and Secure Computing, DASC 2013},
|
||||
doi = {10.1109/DASC.2013.37},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/A Dynamic Detection Method to C-C++ Programs Memory Vulnerabilities Based on Pointer Analysis.pdf:pdf},
|
||||
isbn = {9781479933815},
|
||||
keywords = {dynamic detecting,fat pointer,improved Safe-C,memory vulnerability,pointer analysis},
|
||||
pages = {52--57},
|
||||
title = {{A dynamic detection method to C/C++ programs memory vulnerabilities based on pointer analysis}},
|
||||
year = {2013}
|
||||
}
|
||||
@article{Mailloux1969,
|
||||
author = {Mailloux, B. J. and Peck, J. E L and Koster, C. H A},
|
||||
doi = {10.1007/BF02163002},
|
||||
file = {:home/steveej/src/steveej/msc-thesis/docs/Algol68-RevisedReport.pdf:pdf},
|
||||
isbn = {978-3-662-38646-0},
|
||||
issn = {0029599X},
|
||||
journal = {Numerische Mathematik},
|
||||
number = {2},
|
||||
pages = {79--218},
|
||||
title = {{Report on the Algorithmic Language ALGOL 68}},
|
||||
volume = {14},
|
||||
year = {1969}
|
||||
}
|
||||
@article{Corporation2011,
|
||||
abstract = {The Intel{\{}$\backslash$textregistered{\}} 64 and IA-32 Architectures Software Developer's Manual, Volume 1, describes the basic architecture and programming environment of Intel 64 and IA-32 processors. The Intel{\{}$\backslash$textregistered{\}} 64 and IA-32 Architectures Software Developer's Manual, Volumes 2A {\&} 2B, describe the instruction set of the processor and the opcode struc- ture. These volumes apply to application programmers and to programmers who write operating systems or executives. The Intel{\{}$\backslash$textregistered{\}} 64 and IA-32 Architectures Software Developer's Manual, Volumes 3A {\&} 3B, describe the operating-system support environment of Intel 64 and IA-32 processors. These volumes target operating- system and BIOS designers. In addition, the Intel{\{}$\backslash$textregistered{\}} 64 and IA-32 Architectures Software Developer's Manual, Volume 3B, addresses the programming environment for classes of software that host operating systems.},
|
||||
author = {Corporation, Intel},
|
||||
doi = {10.1109/MAHC.2010.22},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/64-ia-32-architectures-software-developer-system-programming-manual-325384.pdf:pdf},
|
||||
isbn = {253665-057US},
|
||||
issn = {15222594},
|
||||
journal = {System},
|
||||
keywords = {253665,IA-32 architecture,Intel 64},
|
||||
number = {253665},
|
||||
title = {{Intel {\textregistered} 64 and IA-32 Architectures Software Developer ' s Manual Volume 3}},
|
||||
volume = {3},
|
||||
year = {2011}
|
||||
}
|
||||
@article{Balasubramanian2017,
|
||||
abstract = {Rust is a new system programming language that offers a practical and safe alternative to C. Rust is unique in that it enforces safety without runtime overhead, most importantly, without the overhead of garbage collection. While zero-cost safety is remarkable on its own, we argue that the super-powers of Rust go beyond safety. In particular, Rust's linear type system enables capabilities that cannot be implemented efficiently in traditional languages, both safe and unsafe, and that dramatically improve security and reliability of system software. We show three examples of such capabilities: zero-copy software fault isolation, efficient static information flow analysis, and automatic checkpointing. While these capabilities have been in the spotlight of systems research for a long time, their practical use is hindered by high cost and complexity. We argue that with the adoption of Rust these mechanisms will become commoditized.},
|
||||
author = {Balasubramanian, Abhiram and Baranowski, Marek S and Burtsev, Anton and Irvine, Uc and Rakamari, Zvonimir and Ryzhyk, Leonid and Research, Vmware},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/DRAFT$\backslash$: System Programming in Rust$\backslash$: Beyond Safety.pdf:pdf},
|
||||
title = {{DRAFT: System Programming in Rust: Beyond Safety}},
|
||||
year = {2017}
|
||||
}
|
||||
@article{Matz2009,
|
||||
author = {Matz, M and Hubicka, J and Jaeger, a and Mitchell, M},
|
||||
file = {:home/steveej/src/steveej/msc-thesis/docs/System V Application Binary Interface AMD64 Architecture Processor Supplement Draft Version 0.99.7.pdf:pdf},
|
||||
isbn = {013877630X},
|
||||
pages = {1--128},
|
||||
pmid = {2477614},
|
||||
title = {{System V Application Binary Interface AMD64 Architecture Processor Supplement}},
|
||||
url = {papers2://publication/uuid/CD8D5668-B1F5-4FE3-BAD8-25F1E589A9E5},
|
||||
year = {2009}
|
||||
}
|
||||
@article{Chisnall2015,
|
||||
abstract = {We propose a new memory-safe interpretation of the C ab-stract machine that provides stronger protection to benefit security and debugging. Despite ambiguities in the specifi-cation intended to provide implementation flexibility, con-temporary implementations of C have converged on a mem-ory model similar to the PDP-11, the original target for C. This model lacks support for memory safety despite well-documented impacts on security and reliability. Attempts to change this model are often hampered by as-sumptions embedded in a large body of existing C code, dat-ing back to the memory model exposed by the original C compiler for the PDP-11. Our experience with attempting to implement a memory-safe variant of C on the CHERI ex-perimental microprocessor led us to identify a number of problematic idioms. We describe these as well as their in-teraction with existing memory safety schemes and the as-sumptions that they make beyond the requirements of the C specification. Finally, we refine the CHERI ISA and abstract model for C, by combining elements of the CHERI capabil-ity model and fat pointers, and present a softcore CPU that implements a C abstract machine that can run legacy C code with strong memory protection guarantees.},
|
||||
author = {Chisnall, David and Rothwell, Colin and Watson, Robert N M and Woodruff, Jonathan and Vadera, Munraj and Moore, Simon W and Roe, Michael and Davis, Brooks and Neumann, Peter G},
|
||||
doi = {10.1145/2694344.2694367},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/Beyond the PDP-11$\backslash$: Architectural support for a memory-safe C abstract machine.pdf:pdf},
|
||||
isbn = {9781450328357},
|
||||
issn = {01635964},
|
||||
journal = {Proceedings of the Twentieth International Conference on Architectural Support for Programming Languages and Operating Systems},
|
||||
pages = {117--130},
|
||||
title = {{Beyond the PDP-11 : Architectural support for a memory-safe C abstract machine}},
|
||||
url = {http://www.cl.cam.ac.uk/research/security/ctsrd/pdfs/201503-asplos2015-cheri-cmachine.pdf},
|
||||
year = {2015}
|
||||
}
|
||||
@article{Dhurjati2003,
|
||||
abstract = {Traditional approaches to enforcing memory safety of programs rely heavily on runtime checks of memory accesses and on garbage collection, both of which are unattractive for embedded applications. The long-term goal of our work is to enable 100{\%} static enforcement of memory safety for embedded programs through advanced compiler techniques and minimal semantic restrictions on programs. The key result of this paper is a compiler technique that ensures memory safety of dynamically allocated memory without programmer annotations, runtime checks, or garbage collection, and works for a large subclass of type-safe C programs. The technique is based on a fully automatic pool allocation (i.e., region-inference) algorithm for C programs we developed previously, and it ensures safety of dynamically allocated memory while retaining explicit deallocation of individual objects within regions (to avoid garbage collection). For a diverse set of embedded C programs (and using a previous technique to avoid null pointer checks), we show that we are able to statically ensure the safety of pointer and dynamic memory usage in all these programs. We also describe some improvements over our previous work in static checking of array accesses. Overall, we achieve 100{\%} static enforcement of memory safety without new language syntax for a significant subclass of embedded C programs, and the subclass is much broader if array bounds checks are ignored.},
|
||||
author = {Dhurjati, D and Kowshik, S and Adve, V and Lattner, C},
|
||||
doi = {10.1145/780742.780743},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/Memory Safety Without Runtime Checks or Garbage.pdf:pdf},
|
||||
isbn = {0362-1340},
|
||||
issn = {03621340},
|
||||
journal = {Acm Sigplan Notices},
|
||||
keywords = {automatic pool allocation,compilers,embedded systems,languages,programming languages,region management,security,static analysis},
|
||||
number = {7},
|
||||
pages = {69--80},
|
||||
title = {{Memory safety without runtime checks or garbage collection}},
|
||||
volume = {38},
|
||||
year = {2003}
|
||||
}
|
||||
@misc{MITRE-CWE,
|
||||
author = {MITRE},
|
||||
title = {{CWE - Common Weakness Enumeration}},
|
||||
url = {http://cwe.mitre.org},
|
||||
urldate = {2017-08-31},
|
||||
year = {2017}
|
||||
}
|
||||
@article{Affairs2015,
|
||||
author = {Affairs, Post Doctoral},
|
||||
file = {:home/steveej/src/steveej/msc-thesis/docs/You can't spell trust without Rust.pdf:pdf},
|
||||
title = {{YOU CAN ' T SPELL TRUST WITHOUT RUST alexis beingessner Master ' s in Computer Science Carleton University}},
|
||||
year = {2015}
|
||||
}
|
||||
@inproceedings{Kuznetsov2014,
|
||||
abstract = {Systems code is often written in low-level languages like C/C++, which offer many benefits but also dele- gate memory management to programmers. This invites memory safety bugs that attackers can exploit to divert control flow and compromise the system. Deployed de- fense mechanisms (e.g., ASLR, DEP) are incomplete, and stronger defense mechanisms (e.g., CFI) often have high overhead and limited guarantees [19, 15, 9]. We introduce code-pointer integrity (CPI), a new de- sign point that guarantees the integrity of all code point- ers in a program (e.g., function pointers, saved return ad- dresses) and thereby prevents all control-flow hijack at- tacks, including return-oriented programming. We also introduce code-pointer separation (CPS), a relaxation of CPI with better performance properties. CPI and CPS offer substantially better security-to-overhead ratios than the state of the art, they are practical (we protect a complete FreeBSD system and over 100 packages like apache and postgresql), effective (prevent all attacks in the RIPE benchmark), and efficient: on SPEC CPU2006, CPS averages 1.2{\%} overhead for C and 1.9{\%} for C/C++, while CPI's overhead is 2.9{\%} for C and 8.4{\%} for C/C++. A prototype implementation of CPI and CPS can be obtained from http://levee.epfl.ch. 1},
|
||||
author = {Kuznetsov, Volodymyr and Szekeres, L{\'{a}}szl{\'{o}} and Payer, Mathias},
|
||||
booktitle = {Proceedings of the 11th USENIX Symposium on Operating Systems Design and Implementation},
|
||||
isbn = {9781931971164},
|
||||
pages = {147--163},
|
||||
title = {{Code-pointer integrity}},
|
||||
url = {https://www.usenix.org/conference/osdi14/technical-sessions/presentation/kuznetsov{\%}5Cnhttps://www.usenix.org/system/files/conference/osdi14/osdi14-paper-kuznetsov.pdf?utm{\_}source=dlvr.it{\&}utm{\_}medium=tumblr},
|
||||
year = {2014}
|
||||
}
|
||||
@article{Caballero2012,
|
||||
abstract = {Use-after-free vulnerabilities are rapidly growing in popularity, especially for exploiting web browsers. Use-after-free (and double-free) vulnerabilities are caused by a program operating on a dangling pointer. In this work we propose early detection, a novel runtime approach for finding and diagnosing use-after-free and double-free vulnerabilities. While previous work focuses on the creation of the vulnerability (i.e., the use of a dangling pointer), early detection shifts the focus to the creation of the dangling pointer(s) at the root of the vulnerability. Early detection increases the effectiveness of testing by identifying unsafe dangling pointers in executions where they are created but not used. It also accelerates vulnerability analysis and minimizes the risk of incomplete fixes, by automatically collecting information about all dangling pointers involved in the vulnerability. We implement our early detection technique in a tool called Undangle. We evaluate Undangle for vulnerability analysis on 8 real-world vulnerabilities. The analysis uncovers that two separate vulnerabilities in Firefox had a common root cause and that their patches did not completely fix the underlying bug. We also evaluate Undangle for testing on the Firefox web browser identifying a potential vulnerability.},
|
||||
author = {Caballero, Juan and Grieco, Gustavo and Marron, Mark and Nappa, Antonio},
|
||||
doi = {10.1145/2338965.2336769},
|
||||
isbn = {9781450314541},
|
||||
issn = {1450314546},
|
||||
journal = {ISSTA},
|
||||
keywords = {automated testing,binary analysis,debugging,dynamic analysis},
|
||||
pages = {133},
|
||||
title = {{Undangle: early detection of dangling pointers in use-after-free and double-free vulnerabilities}},
|
||||
url = {http://dl.acm.org/citation.cfm?doid=2338965.2336769},
|
||||
year = {2012}
|
||||
}
|
||||
@book{AMD64Vol2,
|
||||
author = {AMD},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/AMD64 Architecture Programmer's Manual Volume 2$\backslash$: System Programming.pdf:pdf},
|
||||
keywords = {24593,AMD64 Architecture Programmer's Manual Volume 2: S},
|
||||
number = {24592},
|
||||
title = {{AMD64 Architecture Programmer's Manual Volume 2: System Programming}},
|
||||
volume = {1},
|
||||
year = {2012}
|
||||
}
|
||||
@article{Junker,
|
||||
author = {Junker, Stefan},
|
||||
file = {:home/steveej/src/steveej/msc-thesis/src/docs/thesis.pdf:pdf},
|
||||
title = {{Guarantees On In-Kernel Memory-Safety Using Rust's Static Code Analysis}}
|
||||
}
|
||||
@article{Nilsson2017,
|
||||
author = {Nilsson, Fredrik},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/A Rust-based Runtime for the Internet of Things.pdf:pdf},
|
||||
title = {{A Rust-based Runtime for the Internet of Things}},
|
||||
year = {2017}
|
||||
}
|
||||
@article{Szekeres2013,
|
||||
abstract = {Memory corruption bugs in software written in low-level languages like C or C++ are one of the oldest problems in computer security. The lack of safety in these languages allows attackers to alter the program's behavior or take full control over it by hijacking its control flow. This problem has existed for more than 30 years and a vast number of potential solutions have been proposed, yet memory corruption attacks continue to pose a serious threat. Real world exploits show that all currently deployed protections can be defeated. This paper sheds light on the primary reasons for this by describing attacks that succeed on today's systems. We systematize the current knowledge about various protection techniques by setting up a general model for memory corrup- tion attacks. Using this model we show what policies can stop which attacks. The model identifies weaknesses of currently deployed techniques, as well as other proposed protections enforcing stricter policies. We analyze the reasons why protection mechanisms imple- menting stricter polices are not deployed. To achieve wide adoption, protection mechanisms must support a multitude of features and must satisfy a host of requirements. Especially important is performance, as experience shows that only solutions whose overhead is in reasonable bounds get deployed. A comparison of different enforceable policies helps de- signers of new protection mechanisms in finding the balance between effectiveness (security) and efficiency.We identify some open research problems, and provide suggestions on improving the adoption of newer techniques.},
|
||||
author = {Szekeres, L??szl?? and Payer, Mathias and Wei, Tao and Song, Dawn},
|
||||
doi = {10.1109/SP.2013.13},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/SoK$\backslash$: Eternal War in Memory.pdf:pdf},
|
||||
isbn = {9780769549774},
|
||||
issn = {10816011},
|
||||
journal = {Proceedings - IEEE Symposium on Security and Privacy},
|
||||
pages = {48--62},
|
||||
title = {{SoK: Eternal war in memory}},
|
||||
year = {2013}
|
||||
}
|
||||
@book{AMD64Vol1,
|
||||
author = {AMD},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/AMD64 Architecture Programmer's Manual Volume 1$\backslash$: Application Programming.pdf:pdf},
|
||||
keywords = {AMD64,SIMD,extended media instructions,legacy m},
|
||||
number = {26568},
|
||||
title = {{AMD64 Architecture Programmer's Manual Volume 1: Application Programming}},
|
||||
volume = {4},
|
||||
year = {2012}
|
||||
}
|
||||
@article{Getreu2016,
|
||||
annote = {- runtime checkis are expensive
|
||||
|
||||
- critical with energy restriction on the target device},
|
||||
author = {Getreu, Jens},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/Embedded System Security with Rust - Case Study of Heartbleed.pdf:pdf},
|
||||
pages = {1--24},
|
||||
title = {{Embedded System Security with Rust}},
|
||||
year = {2016}
|
||||
}
|
||||
@article{Reed2015,
|
||||
abstract = {Rust is a new systems language that uses some advanced type system features, specifically affine types and regions, to statically guarantee memory safety and eliminate the need for a garbage collector. While each individual addition to the type system is well understood in isolation and are known to be sound, the combined system is not known to be sound. Furthermore, Rust uses a novel checking scheme for its regions, known as the Borrow Checker, that is not known to be correct. Since Rust's goal is to be a safer alternative to C/C++, we should ensure that this safety scheme actually works. We present a formal semantics that captures the key features relevant to memory safety, unique pointers and borrowed references, specifies how they guarantee memory safety, and describes the operation of the Borrow Checker. We use this model to prove the soudness of some core operations and justify the conjecture that the model, as a whole, is sound. Additionally, our model provides a syntactic version of the Borrow Checker, which may be more understandable than the non-syntactic version in Rust.},
|
||||
author = {Reed, Eric},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/Patina$\backslash$: A Formalization of the Rust Programming Language.pdf:pdf},
|
||||
number = {February},
|
||||
pages = {1--37},
|
||||
title = {{Patina: A Formalization of the Rust Programming Language}},
|
||||
year = {2015}
|
||||
}
|
||||
@misc{MITRE-CWE-633,
|
||||
author = {MITRE},
|
||||
title = {{CWE-633: Weaknesses that Affect Memory}},
|
||||
url = {http://cwe.mitre.org/data/definitions/633.html},
|
||||
urldate = {2017-08-31},
|
||||
year = {2017}
|
||||
}
|
||||
@misc{Endler,
|
||||
author = {Endler, Matthias},
|
||||
title = {{A curated list of static analysis tools, linters and code quality checkers for various programming languages}},
|
||||
url = {https://github.com/mre/awesome-static-analysis}
|
||||
}
|
||||
@article{Arpaci-Dusseau2015,
|
||||
abstract = {A book covering the fundamentals of operating systems, including virtualization of the CPU and memory, threads and concurrency, and file and storage systems. Written by professors active in the field for 20 years, this text has been developed in the classrooms of the University of Wisconsin-Madison, and has been used in the instruction of thousands of students.},
|
||||
author = {{Arpaci-Dusseau Remzi}, Arpaci-Dusseau Andrea},
|
||||
file = {:home/steveej/src/github/steveej/msc-thesis/docs/operating{\_}systems{\_}{\_}three{\_}easy{\_}pieces{\_}{\_}electronic{\_}version{\_}0{\_}91{\_}.pdf:pdf},
|
||||
journal = {Arpaci-Dusseau},
|
||||
number = {0.91},
|
||||
pages = {665},
|
||||
title = {{Operating Systems: Three Easy Pieces}},
|
||||
volume = {Electronic},
|
||||
year = {2015}
|
||||
}
|
||||
@misc{MITRE-CWE-119,
|
||||
author = {MITRE},
|
||||
booktitle = {2.11},
|
||||
title = {{CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer}},
|
||||
url = {http://cwe.mitre.org/data/definitions/119.html},
|
||||
urldate = {2017-08-31},
|
||||
year = {2017}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
% // vim: set ft=tex:
|
||||
\documentclass[12pt,a4paper]{report}
|
||||
|
||||
%\overfullrule=1cm
|
||||
\overfullrule=5mm
|
||||
|
||||
\usepackage[utf8]{inputenc}
|
||||
|
||||
|
@ -9,7 +8,7 @@
|
|||
\usepackage{blindtext,color,fancyhdr}
|
||||
|
||||
\usepackage{geometry}
|
||||
\geometry{a4paper, top=25mm, left=35mm, right=30mm, bottom=35mm, headsep=10mm, footskip=12mm}
|
||||
\geometry{a4paper, top=25mm, left=30mm, right=35mm, bottom=35mm, headsep=10mm, footskip=12mm}
|
||||
|
||||
\usepackage{multirow,tabularx,tabu}
|
||||
\usepackage{booktabs}
|
||||
|
@ -44,14 +43,8 @@
|
|||
\usetikzlibrary{chains,shapes.arrows, arrows, positioning,decorations.pathreplacing,bending}
|
||||
\usetikzlibrary{calc}
|
||||
\usetikzlibrary{matrix,shapes,arrows,positioning}
|
||||
\usetikzlibrary{shapes.geometric, arrows}
|
||||
\usetikzlibrary{chains,arrows.meta,decorations.pathmorphing,quotes}
|
||||
\usepackage{smartdiagram}
|
||||
\usesmartdiagramlibrary{additions}
|
||||
\usepackage{color}
|
||||
\usepackage[definitionLists,hashEnumerators,smartEllipses,hybrid]{markdown}
|
||||
%\usepackage[fencedCode,inlineFootnotes,citations,definitionLists,hashEnumerators,smartEllipses,hybrid]{markdown}
|
||||
|
||||
|
||||
\tikzset{/minted/basename/.initial=minted}
|
||||
\appto\theFancyVerbLine{\tikzmark{\pgfkeysvalueof{/minted/basename}\arabic{FancyVerbLine}}}
|
||||
|
@ -65,8 +58,6 @@
|
|||
|
||||
\newcommand{\topic}{Guarantees On In-Kernel Memory-Safety Using Rust's Static Code Analysis}
|
||||
\newcommand{\authorOne}{Stefan Junker}
|
||||
\newcommand{\authorOneBirthDate}{23.12.1986}
|
||||
\newcommand{\authorOneBirthCity}{Rottweil}
|
||||
\newcommand{\authorOneInit}{SJ}
|
||||
\newcommand{\authorOnestreet}{Alemannenstr. 7}
|
||||
\newcommand{\authorOnezip}{78467}
|
||||
|
@ -79,23 +70,11 @@
|
|||
\newcommand{\startdate}{2017/4/1}
|
||||
\newcommand{\submitdate}{2017/9/29}
|
||||
\newcommand{\buzzwords}{memory-safety, operating system development, rust, static software analysis, software vulnerability}
|
||||
\renewcommand{\abstract}{%
|
||||
This study evaluated Rust's guarantees on memory safety in the OS through static analysis.
|
||||
Static analysis was identified as a requirement due to the assumption that humans tend to make mistakes and C was found to be an error prone language.
|
||||
Rust, as an affine-typed borrow- and lifetime-checked systems language that is equipped with an ownership model, is considered a viable candidate for replacing C for today's OS development.
|
||||
After identifying common weaknesses of memory vulnerabilities and their manifestations, the choice of programming language was verified as the most effective mitigation attempt.
|
||||
Rust was chosen to act as a new candidate, and was found to be effective against common errors in buffer handling due to its ownership model and strong type system.
|
||||
The language shown to be less error prone in memory intensive tasks like buffer handling, which has been identified as a common cause in software vulnerabilities.
|
||||
After experimentation with various stack protection scenarios and implementing preemptive multitasking on top of interemezzOS, the downside was discovered that Rust cannot statically detect stack overflows of any type.
|
||||
Implementing this detection was considered beyond scope, although requirements could be identified for future reference.
|
||||
It was concluded that Rust's static checks of all kinds are a big improvement in OS development, where object orientation and other paradigms are not simple to manage.
|
||||
Despite the failed hypotheses of guaranteeing full memory-safety in OS development, Rust is suggested as the language for today's and future OS development.
|
||||
}
|
||||
|
||||
% Numbered Subsubsections
|
||||
\setcounter{secnumdepth}{3}
|
||||
|
||||
\date{}
|
||||
\date{Summersemester 2017}
|
||||
\title{\topic}
|
||||
|
||||
\author{authorOne}
|
||||
|
@ -149,9 +128,6 @@ Despite the failed hypotheses of guaranteeing full memory-safety in OS developme
|
|||
\newcommand{\cnameref}[1]{\cref{#1} \textit{(\nameref{#1})}}
|
||||
\newcommand{\Cnameref}[1]{\Cref{#1} \textit{(\nameref{#1})}}
|
||||
|
||||
\newcommand{\cpnameref}[1]{\cref{#1} \textit{(\nameref{#1}, \cpageref{#1})}}
|
||||
\newcommand{\Cpnameref}[1]{\Cref{#1} \textit{(\nameref{#1}, \cpageref{#1})}}
|
||||
|
||||
\newcommand{\cnamepref}[1]{\cref{#1} \textit{(\nameref{#1}, \cpageref{#1})}}
|
||||
\newcommand{\Cnamepref}[1]{\Cref{#1} \textit{(\nameref{#1}, \cpageref{#1})}}
|
||||
|
||||
|
@ -245,22 +221,30 @@ Despite the failed hypotheses of guaranteeing full memory-safety in OS developme
|
|||
\makeatother
|
||||
\include{glossary}
|
||||
|
||||
\overfullrule=1cm
|
||||
|
||||
\begin{document}
|
||||
|
||||
\include{cover}
|
||||
%TODO: \include{cover}
|
||||
\pagestyle{front}
|
||||
\include{title}
|
||||
|
||||
\pagestyle{preamble}
|
||||
\include{abstract}
|
||||
\include{affidavit}
|
||||
%TODO: \include{affidavit}
|
||||
\cleardoublepage
|
||||
\newcounter{roman_pagenumbers} % save page number
|
||||
\setcounter{roman_pagenumbers}{\value{page}}
|
||||
|
||||
\pagestyle{main}
|
||||
%TODO \include{acknowledgments}
|
||||
%TODO abstract
|
||||
|
||||
\chapter*{Preface}
|
||||
This thesis is original, unpublished, independent work by me, \authorOne.
|
||||
I strongly believe in openness and collaboration in the development of new technology, therefore the development will be based solely on Open-Source software.
|
||||
The source of this document and the code I have worked on will be freely available on my personal Gitlab site\footnote{https://gitlab.com/steveeJ/msc-thesis} once the academic process of this project is complete.
|
||||
|
||||
|
||||
\tableofcontents
|
||||
|
||||
|
@ -276,7 +260,7 @@ Despite the failed hypotheses of guaranteeing full memory-safety in OS developme
|
|||
\include{parts/research_and_development/research_and_development}
|
||||
|
||||
\part{Evaluation And Conclusion}
|
||||
\label{enc}
|
||||
\label{eval_and_conclusion}
|
||||
\include{parts/eval_and_conclusion/eval_and_conclusion}
|
||||
|
||||
\newpage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue