Please use this identifier to cite or link to this item: doi:10.22028/D291-46006
Title: Low-level software memory safety analysis: Attack and defense
Author(s): Wang, Jiianqiang
Language: English
Year of Publication: 2025
DDC notations: 620 Engineering and machine engineering
Publikation type: Dissertation
Abstract: Low-level software, as the name suggests, is the kind of software that runs more closely with the hardware than normal applications. They usually undertake the responsibilities of initializing the hardware, setting up the execution environment, and directly interacting with the hardware functionalities. Due to the intrinsic features of the key role played by low-level software, it naturally requires and gains higher hardware privilege than other software to run, making it a promising target for system attackers. To conveniently manipulate the hardware, low-level software developers commonly adopt memory-unsafe programming languages such as C and C++. On the one hand, the direct memory access programming language makes the development process easier, on the other hand, however, it makes the low-level software prone to be compromised by memory corruption vulnerabilities. In this thesis, we start with the causes and consequences of memory corruption vulnerability and then showcase that memory safety issue is a main threat to low-level software security. We discuss and analyze low-level software memory safety issues in terms of both their attack and defense sides. From the perspective of the attack scenario, we tackle the problems that still hinder the detection of memory corruption vulnerability detection. In particular, feeding random inputs to the software—a technique called fuzz testing—is used. Specifically, We designed and implemented tailored fuzzers to find the memory corruption vulnerabilities in the low-level software, embedded system firmware, and bootloader. For each, the fuzzers aim to explore as many parts of the low-level software as well as trigger more crashes as possible. In our experiments, 46 previously unknown vulnerabilities were found, and 11 CVEs were assigned to the findings. From the perspective of defense, providing an easy-to-use framework with rich features for highlevel applications while maintaining the memory safety guarantees is the essential part. To solve this problem, we designed and implemented a trusted execution environment framework for RISC-V architecture by utilizing RISC-V hypervisor extension and an existing hardware memory isolation technique. The framework provides full backward compatibility and secure IO, which means an unmodified virtual machine can run directly on top of the framework and benefit from transparent, secure IO transmission. Our experiment showed that the framework achieved similar performance with AMD SEV extension and trivial overhead compared with native running.
Low-Level-Software ist, wie der Name schon sagt, eine Art von Software, die enger mit der Hardware zusammenarbeitet als normale Anwendungen. Sie übernimmt in der Regel Aufgaben wie die Initialisierung der Hardware, die Einrichtung der Ausführungsumgebung und die direkte Interaktion mit den Hardware-Komponenten. Aufgrund der entscheidenden Rolle, die Low-Level-Software spielt, benötigt und erlangt sie naturgemäß höhere Hardware-Privilegien als andere Software, was sie zu einem vielversprechenden Ziel für Systemangreifer macht. Um die Hardware bequem zu steuern, verwenden Low- Level-Softwareentwickler häufig speicherunsichere Programmiersprachen wie C und C++. Einerseits erleichtert die direkte Speicherverwaltung den Entwicklungsprozess, andererseits macht sie die Low-Level-Software jedoch anfällig für Speicherverletzungs- Schwachstellen. Ausgehend von den Ursachen und Folgen von Speicherverletzungs-Schwachstellen demonstriert diese Arbeit, dass Speicherunsicherheit eine Hauptbedrohung für die Sicherheit von Low-Level-Software darstellt. Nachfolgend werden Speicherunsicherheitsprobleme von Low-Level-Software aus offensiver und defensiver Perspektive analysiert und diskutiert. Im offensiven Szenario geht die Arbeit auf die Probleme ein, die die Erkennung von Speicherverletzungs-Schwachstellen noch behindern. Insbesondere wird eine Technik namens Fuzz-Testing angewandt, bei der zufällige Eingaben in die Software eingespeist werden. Dazu wurden maßgeschneiderte Fuzzer entworfen und implementiert, um Speicherverletzungs-Schwachstellen in Low-Level-Software, Firmware eingebetteter Systeme und Bootloadern zu finden. Die Fuzzer zielen darauf ab, möglichst viele Teile der Low-Level-Software zu erkunden und möglichst viele Abstürze auszulösen. In den Experimenten wurden 46 zuvor unbekannte Schwachstellen gefunden, denen 11 CVEs (Schwachstellen-Identifikationsnummern) zugewiesen wurden. Aus einer defensiven Perspektive ist die Bereitstellung eines einfach zu verwendenden Frameworks mit umfangreichen Funktionen für High-Level-Anwendungen bei gleichzeitiger Gewährleistung der Speicher-Sicherheitsgarantien ein wesentlicher Aspekt. Um dieses Problem zu lösen, wurde im Rahmen dieser Arbeit ein Trusted Execution Environment-Framework für die RISC-V-Architektur entworfen und implementiert, das die RISC-V-Hypervisor- Erweiterung und eine bestehende Hardware-Speicherisolationstechnik nutzt. Das Framework bietet vollständige Rückwärtskompatibilität und sicheres I/O, was bedeutet, dass eine unveränderte virtuelle Maschine direkt auf dem Framework ausgeführt werden kann und von einer transparenten sicheren I/O-Übertragung profitiert. Abschließend wird gezeigt, dass das Framework eine ähnliche Leistung wie die AMD-SEV-Erweiterung erreichte und nur minimale Zusatzkosten im Vergleich zur nativen Ausführung verursachte.
Link to this record: urn:nbn:de:bsz:291--ds-460068
hdl:20.500.11880/40675
http://dx.doi.org/10.22028/D291-46006
Advisor: Holz, Thorsten
Zeller, Andreas
Payer, Mathias
Date of oral examination: 4-Aug-2025
Date of registration: 8-Oct-2025
Faculty: MI - Fakultät für Mathematik und Informatik
Department: MI - Informatik
Professorship: MI - Prof. Dr. Andreas Zeller
Collections:SciDok - Der Wissenschaftsserver der Universität des Saarlandes

Files for this record:
File Description SizeFormat 
Phd_Thesis.pdf2,87 MBAdobe PDFView/Open


Items in SciDok are protected by copyright, with all rights reserved, unless otherwise indicated.