···6565 # Note: mmap_rnd_compat_bits may not exist on 64bit.
6666 boot.kernel.sysctl."vm.mmap_rnd_bits" = mkDefault 32;
6767 boot.kernel.sysctl."vm.mmap_rnd_compat_bits" = mkDefault 16;
6868+6969+ # Allowing users to mmap() memory starting at virtual address 0 can turn a
7070+ # NULL dereference bug in the kernel into code execution with elevated
7171+ # privilege. Mitigate by enforcing a minimum base addr beyond the NULL memory
7272+ # space. This breaks applications that require mapping the 0 page, such as
7373+ # dosemu or running 16bit applications under wine. It also breaks older
7474+ # versions of qemu.
7575+ #
7676+ # The value is taken from the KSPP recommendations (Debian uses 4096).
7777+ boot.kernel.sysctl."vm.mmap_min_addr" = mkDefault 65536;
6878}