--- lldb_19.html.orig 2018-07-02 11:11:45.038427145 +0200 +++ lldb_19.html 2018-07-02 11:18:44.487149418 +0200 @@ -8,13 +8,13 @@

A brief overview of MKSANITIZER

A sanitizer is a special type of addition to a compiled program, and is included from a toolchain (LLVM or GCC). -There are a few types of sanitzers. Their usual purposes are: bug detecting, +There are a few types of sanitizers. Their usual purposes are: bug detecting, profiling, and security hardening.

NetBSD already supports the most useful ones with a decent completeness:

@@ -59,8 +59,8 @@ As an example of a well known mitigation I will note sandboxing of an application.

A code that is aided with sanitizers can be configured (either in build time or start/run time) -to report the bug in the execution time of e.g. integer overflow and cause an application to halt immediatetely. -No coding regime can have the same effect and perhaps the number of programming languages with this property is also restriced. +to report the bug in the execution time of e.g. integer overflow and cause an application to halt immediately. +No coding regime can have the same effect and perhaps the number of programming languages with this property is also restricted.

In order to use effectively sanitizers within a distribution there is need to rebuild a program and all of its dependencies (with few exceptions) with the same sanitizing configuration. @@ -83,7 +83,7 @@

  • as of today static libraries and executables,
  • as of today as an exception ldd(1) that borrows parts from the dynamic ELF loader.
  • -The selection of unsanitzied base libraries like libc is the design choice of sanitizers that a part of the base code is unsanitized and sanitizers +The selection of unsanitized base libraries like libc is the design choice of sanitizers that a part of the base code is unsanitized and sanitizers install interceptors for their public symbols. Sanitizers expect to use their API from high level, their features and so prevent recursive sanitization (although this happens sometimes in narrow cases). @@ -106,7 +106,7 @@ There used to be an analogous attempt in the Gentoo land (asantoo), however these efforts stalled two years ago with a fiasco. The Google Chromium team uses a set of scripts -to bootstrap sanitzied dependencies for their programs on top of a Linux distribution (as of today Ubuntu Trusty x86_64). +to bootstrap sanitized dependencies for their programs on top of a Linux distribution (as of today Ubuntu Trusty x86_64).

    I've started to document bugs detected with MKSANITIZER in a dedicated directory on my @@ -221,7 +221,7 @@

    The first boot of a MKSANITIZER distribution with Address Sanitizer

    The process of getting a bootable and installable (and ignoring the aspect of buildable and generatable) installation ISO image was a loop of fixing bugs and retrying the process. -At the end of the process there is an option to inststall a fully sanitized userland with ASan, UBSan or both. +At the end of the process there is an option to install a fully sanitized userland with ASan, UBSan or both. The MSan version is scheduled after finishing the kernel ptrace(2) work. Other options like a target prebuilt with ThreadSanitizer, safestack or The Scudo Hardened Allocator are untested.

    @@ -341,7 +341,7 @@ developers expecting to run a release with the MKSANITIER option.

    The lack of C++ runtime pushed me towards reusing non-sanitized ATF tests (as the ATF framework is written in C++) -against the sanitizerd userland. +against the sanitized userland. There have been detected two bugs: