Skip to content

uucore/fsext: read_fs_list might get stuck in an infinite loop #4574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tertsdiepraam opened this issue Mar 22, 2023 · 0 comments
Open

uucore/fsext: read_fs_list might get stuck in an infinite loop #4574

tertsdiepraam opened this issue Mar 22, 2023 · 0 comments

Comments

@tertsdiepraam
Copy link
Member

Similar to: #4539

On Linux, read_fs_list opens either /proc/self/mountinfo or /etc/mtab depending on which it can find and reads the list from the lines in that file. However, filter_map(|line| line.ok()) is used, which will silently ignore errors and might cause an infinite loop. Now this only happens when these specific files can be opened but not read (i.e. when they are a directory), so this is extremely unlikely. Still I think this should be fixed. If anyone can come up with a reliable testcase where this happens it would be much appreciated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant