Kernel Address Sanitizer (KASAN)

Status: Upstream; in mainline since 4.0

Documentation: Documentation/dev-tools/kasan.rst

Found bugs: here

Contacts: Andrey Konovalov <@xairy>, Alexander Potapenko <@ramosian-glider>, Dmitry Vyukov <@dvyukov>


Kernel Address Sanitizer (KASAN) is a fast memory corruption detector for the Linux kernel. KASAN detects out-of-bounds, use-after-free, and invalid-free bugs in slab, page_alloc, vmalloc, stack, and global memory.

KASAN has 3 modes:

For more details about each mode, see the kernel documentation and these talks:

See KFENCE for an alternative sampling-based low-overhead memory corruption detector that can be used in production enviroments.