openat(root_fd_, path, O_NOFOLLOW) only blocks the kernel from
dereferencing a symlink at the FINAL component of path; an earlier
component that is a symlink pointing outside the jail is still
followed while resolving the rest of the path, so a strict
(follow_symlinks=false) DiskProvider served files outside its
configured root via a symlinked intermediate directory (CWE-61,
MOLO-STATIC-001). Walk the path one component at a time from
root_fd_ instead, applying O_NOFOLLOW at every level, so a symlink
anywhere in the path is rejected when follow_symlinks_ is false. The
follow_symlinks_=true path (realpath containment fallback) is
unchanged.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>