GSoC 2018 Reports: Integrate libFuzzer with the Basesystem, Part 2


July 13, 2018 posted by Kamil Rytarowski

Prepared by Yang Zheng (tomsun.0.7 AT Gmail DOT com) as part of GSoC 2018

This is the second part of the project of integrating libFuzzer for the userland applications, you can learn about the first part of this project in this post.

[Read More] [0 comments]

 

GSoC 2018 report: Kernel Address Sanitizer, Part 2


July 11, 2018 posted by Kamil Rytarowski

Prepared by Siddharth Muralee (@Tr3x__) as a part of GSoC'18

I have been working on porting the Kernel Address Sanitizer(KASAN) for the NetBSD kernel. This summarizes the work done until the second evaluation.

Refer here for the link to the first report.

[Read More] [1 comment]

 

MKSANITIZER - bug detector software integration with the NetBSD userland


July 02, 2018 posted by Kamil Rytarowski

I've finished the integration of sanitizers with the distribution build framework. A bootable and installable distribution is now available, verified with Address Sanitizer, with Undefined Behavior Sanitizer, or with both concurrently. A few dozen bugs were detected and the majority of them addressed.

LLVM sanitizers are compiler features that help find common software bugs. The following sanitizers are available:

  • TSan: Finds threading bugs,
  • MSan: Finds uninitialized memory read,
  • ASan: Finds invalid address usage bugs,
  • UBSan: Finds unspecified code semantics in runtime.

The new MKSANITIZER option supports full coverage of the NetBSD code base with these sanitizers, which helps reduce bugs and serve high security demands.[Read More] [1 comment]

 

GSoC 2018 Reports: Kernel Undefined Behavior Sanitizer, Part 1


June 15, 2018 posted by Kamil Rytarowski

Prepared by Harry Pantazis(IRC:luserx0, Mail:luserx0 AT gmail DOT com) as part of GSoC 2018.

For GSoC '18, I'm working on the Kernel Undefined Behavior Sanitizer (KUBSAN) project for the integration of Undefined Behavior regression testing on the amd64 kernel. This article summarizes what has been done up to this point (Phase 1 Evaluation), future goals and a brief introduction to Undefined Behavior.[Read More] [0 comments]

 

GSoC 2018 Reports: Kernel Address Sanitizer, Part 1


June 13, 2018 posted by Kamil Rytarowski

Prepared by Siddharth Muralee (@Tr3x__) as part of GSoC 2018.

It's been a fun couple of weeks since I started working on the Kernel Address Sanitizer (KASan) project with NetBSD. I have learned a lot during this period. It's been pretty amazing. This is a report on the work I have done prior to the first evaluation period.[Read More] [0 comments]

 

GSoC 2018 Reports: Integrate libFuzzer with the Basesystem, Part 1


June 13, 2018 posted by Kamil Rytarowski

Prepared by Yang Zheng (tomsun.0.7 AT Gmail DOT com) as part of GSoC 2018

During the Google Summer of Code 2018, I'm working on the project of integrating libFuzzer for the userland applications. The libFuzzer is a fuzzing engine based on the coverage information provided by the SanitizerCoverage in LLVM. It can repeatedly generate mutations of input data and test them until it finds the potential bugs. In this post, I'm going to share what I have done in the first month of this summer.[Read More] [1 comment]

 

Coverage of signal routines in the kernel in the context of ptrace(2)


June 01, 2018 posted by Kamil Rytarowski

During the past month I have been working on coverage of various corner cases in the signal subsystem in the kernel. I have also spent some time on improvements in the land of sanitizers. As a mentor I was able to, thanks to the fulltime focus on NetBSD work, actively help three Google Summer of Code students. Not every question would be answered by myself without code reading but at least I am available for active collaboration, especially when it's to improve code that I have already authored, like sanitizers. At the end of the month we have managed to catch two uninitialized memory reads in the top(1) utility, using the Memory Sanitizer feature and rebuilt part of the basesystem (i.e. library dependencies: libterminfo, libkvm, libutil) with dedicated sanitization flags. [Read More] [0 comments]

 

Forking fixes in the context of debuggers


May 02, 2018 posted by Kamil Rytarowski

For the past month I've been mostly working on improving the kernel code in the ptrace(2) API. Additionally, I've prepared support for reading NetBSD/aarch64 core(5) files. [Read More] [0 comments]

 

Struggling to fix a bohrbug in X86 Debug Registers


April 02, 2018 posted by Kamil Rytarowski

I've spent a month on fixes and debugging issues around the tracing facilities in the kernel.[Read More] [0 comments]

 

LLDB restoration and return to ptrace(2)


March 01, 2018 posted by Kamil Rytarowski

I've managed to unbreak the LLDB debugger as much as possible with the current kernel and hit problems with ptrace(2) that are causing issues with further work on proper NetBSD support. Meanwhile, I've upstreamed all the planned NetBSD patches to sanitizers and helped other BSDs to gain better or initial support.[Read More] [0 comments]

 

The LLVM Sanitizers stage accomplished


February 01, 2018 posted by Kamil Rytarowski

I've managed to get the Memory Sanitizer to work for the elementary base system utilities, like ps(1), awk(1) and ksh(1). This means that the toolchain is ready for tests and improvements. I've iterated over the base system utilities and I looked for bugs, both in programs and in sanitizers. The number of detected bugs in the userland programs was low, there merely was one reading of an uninitialized variable in ps(1).[Read More] [0 comments]

 

The LLVM Memory Sanitizer support work in progress


January 03, 2018 posted by Kamil Rytarowski

In the past 31 days, I've managed to get the core functionality of MSan to work. This is an uninitialized memory usage detector. MSan is a special sanitizer because it requires knowledge of every entry to the basesystem library and every entry to the kernel through public interfaces. This is mandatory in order to mark memory regions as initialized.[Read More] [0 comments]