Skip to content

Security fix for remove_dir_all may have introduced a regression how filesystem loops are handled #93129

Open
@the8472

Description

@the8472

Normally traversing very deep directory trees (e.g. created by bind mounts or FUSE) will result in ENAMETOOLONG or ELOOP.
The fix in #93110, #93112 and #93111 switches to using -at syscalls and keeping file descriptors for each child directory that's being descended into. But this way we loose loop detection (as far as I can tell), which means the process will run out of stack space or file descriptors instead of returning a proper error.

#88731 was already open which does contain proper loop handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`C-bugCategory: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions