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)
Thu, Sep 25, 4:06 AM
Unknown Object (File)
Jul 29 2025, 11:41 AM
Unknown Object (File)
Jul 29 2025, 1:14 AM
Unknown Object (File)
Jul 22 2025, 10:29 PM
Unknown Object (File)
Jul 14 2025, 5:47 AM
Unknown Object (File)
Jun 30 2025, 5:49 AM
Unknown Object (File)
Jun 29 2025, 11:42 AM
Unknown Object (File)
Jun 27 2025, 4:00 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