retoorandClaude Sonnet 5 8569e8d577 fix(runtime): walk every path component with O_NOFOLLOW in DiskProvider
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>
2026-10-25 20:10:50 +01:00
S
Description
moloapp
5.2 MiB
Languages
C++ 90%
Python 3.2%
Pawn 3.2%
POV-Ray SDL 1.3%
JavaScript 1.1%
Other 1.1%