Security Model
Reverse proxies sit directly on the public internet parsing untrusted bytes from every protocol layer. naati is designed for defense in depth:
Memory-Safe Core
- HTTP/1.1, HTTP/2 & HPACK, QUIC v1 & HTTP/3 / QPACK, TLS 1.3 handling, PROXY protocol (v1 & v2), DNS resolver responses, TLS
ssl_preread, FastCGI / uwsgi / SCGI / memcached, mail (SMTP/IMAP/POP3), cache files, and the configuration parser are all written in Goose, eliminating common C memory-corruption classes across the bulk of the server. - Per-worker CSPRNG-seeded keyed hashing protects against hash-flooding DoS; secret comparisons are constant-time;
$request_iduses CSPRNG bytes; and sensitive TLS/QUIC key material, ticket keys, session buffers, and passphrases are zeroized in memory after use. - Strict SNI/Host
421and mTLS isolation is enforced across HTTP/1.1, HTTP/2, HTTP/3, and streampass. TLS 1.2 client-initiated renegotiation is disabled; TLS 1.3 enforces RFC 8446 record andKeyUpdatelimits; client OCSP verification fails closed; and QUIC enforces 3× anti-amplification along with bounded reassembly and AEAD integrity limits.
Hardened Builds & Native Boundary
- Source and container builds (
Makefile) compile with stack protector, stack-clash protection, automatic variable zero-initialization, ARM64 PAC/BTI or x86-64 CET,_FORTIFY_SOURCE=3, PIE, Full RELRO, and non-executable stack. Pre-built Linux packages (.deb/.rpm/tarball) compile with stack protector,_FORTIFY_SOURCE=2, and PIE. - Platform bindings reject embedded NUL path bytes, avoid following symlinks on write-side log and temporary opens, enforce PCRE2 ReDoS compile/match limits, and guard shared-memory bounds checks against overflow.
disable_symlinks off;is accepted while non-offvalues (on,if_not_owner) fail closed at-t/startup (see Behavioral Notes).- Continuous static analysis via CodeQL (
c-cpp) and supply-chain verification via OSSF Scorecard + SLSA build provenance run in GitHub Actions.
Process Isolation & Crash-Safe Reloads
- Workers drop privileges and disable core dumps after binding listening sockets; daemon mode applies a restrictive file-creation umask.
- Configuration reloads validate cleanly before switching workers; invalid configs never affect running workers.
- If a worker exits unexpectedly, the master logs
[alert], repairs interrupted shared-memory state across zones, and immediately respawns a clean worker.
Reporting Security Issues
Please report vulnerabilities privately via GitHub Security Advisories — see SECURITY.md.