fix: Harden IPC mmap API (#28258)