GitHub - R3x/src: Automatic conversion of the NetBSD src CVS module, use with care

Kernel Address Sanitizer

This is the official github repository GSOC' 18 project "Integrating Kernel Address Sanitizer with the NetBSD kernel"

Below are the reports that I have written about the same:

Branch - kasan

This is the main branch I have been working on. The code for KASan has been added in sys/kern. The following are the files that have been added during the course of the project.

  • kern_asan.c ( Contains a major portion of the code for the KASan )
  • kern_asan_report.c ( Contains the reporting infrastructure for Bugs )
  • kern_asan_quarantine.c ( Contains the code for the quarantine list )
  • kern_asan_init.c ( Contains the code for initialisation of kasan during boot )
  • kasan.h ( Header file for KASan )

Aditional work that I did as a part of GSoC

There are a few other tasks that I completed during the GSoC time period - which were helpful with respect to the project.

  • ATF tests for testing userland Asan for C and C++ programs ( Merged with main branch ) ( Commit 1, 2, 3 ) ( Blog )
  • Example Kernel Module for adding a sysctl node ( Merged with main branch ) ( Commit )
  • Example Kernel Module for writing a MPSAFE kernel module ( Merged with main branch ) ( Commit )
  • Example Kernel Module for basic implementation of callout and RUN_ONCE ( Merged with the main branch ) ( Commit )
  • A bootoption for userland without ASLR ( Branch )
  • Example Kernel Module for printing the kernel mappings ( File )

Squashed diff with the final deliverable

http://netbsd.org/~kamil/kasan/gsoc-2018-kasan-final.txt