News for hackers. Stuff that matters.
Re:size_t-to-int vulnerability in Linux’s filesystem layer by zaarn on Wednesday July 21, 2021 @02:56AM (#27903127)
Fun fact: PATH_MAX and FILE_MAX are glibc/muslc limitations. The Linux Kernel doesn't have a limit here and will happily let you walk into a directory with a 2GB pathname.

ext4 doesn't limit directory depth; only filename length. A filename can be 255 bytes in ext4. How deep that lies in the filesystem isn't limited.

btrfs has the same filename limit, no underlying limit on directory depth.

And I would most likely guess most filesystems don't because the obvious ways to implement directories don't place limits on that depth.

There are no comments on this comment yet.