Page MenuHomeFreeBSD

ufs: Update *eofflag upon a read of an unlinked directory
ClosedPublic

Authored by markj on Dec 18 2023, 9:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 13, 5:01 AM
Unknown Object (File)
Sep 26 2024, 8:55 AM
Unknown Object (File)
Sep 23 2024, 10:44 AM
Unknown Object (File)
Sep 23 2024, 8:54 AM
Unknown Object (File)
Sep 19 2024, 5:02 AM
Unknown Object (File)
Sep 18 2024, 1:31 AM
Unknown Object (File)
Sep 16 2024, 7:11 PM
Unknown Object (File)
Sep 7 2024, 6:37 PM
Subscribers

Details

Summary

If the directory is unlinked, no further entries will be returned, but
we return no error. At least one caller (vn_dir_next_dirent()) asserts
that a VOP_READDIR call which returns no error and no entries will set
*eofflag != 0, so the current behaviour of UFS can trigger an assertion
failure.

Simply set *eofflag in this scenario.

Reported by: syzkaller

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable