Skip to main content

MAX_INTERP_PATH_LEN

Constant MAX_INTERP_PATH_LEN 

Source
const MAX_INTERP_PATH_LEN: usize = 4096;
Expand description

Maximum PT_INTERP path length we accept.

Real interpreters (ld-linux.so, musl libc loader, …) are well under 4 KiB; a path longer than a single page is almost certainly corrupt or hostile. We cap before any further parsing so a pathological .interp section cannot waste cycles on a doomed allocation / UTF-8 check.