Monitoring and Debugging Kernel Memory Leaks with KASAN
A use-after-free in userspace ends in SIGSEGV. In kernel space, it ends in a printk from a driver you don’t recognize, three reboots later, or silent data corruption for weeks. The kernel’s virtual address space doesn’t carry the same page-level access protections a process does — a freed slab object’s pages get reallocated to another subsystem, the stale pointer looks valid, and your driver is now scribbling over live kernel state. KASAN catches this before the corruption propagates.


