Security

Kernel use-after-free from a program racing madvise or mremap with munmap

KSA-2026-0057

Status
Fixed, update coming
Severity
Medium
Affected versions
No released version (development code after 0.2.6)
Fixed in
the next update after 0.2.6 (PR #42)
Published
2026-11-02
Updated
2026-11-02

Summary

After mmap and munmap stopped using the kernel lock, madvise, mremap and msync still relied on it alone, so they could read a memory area another thread had just freed.

They now take the process memory lock too. This was never in a released version.

Credit

Brent Gordon