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
F166901761: D43089.id131530.diff
Mon, Aug 17, 3:43 PM
F166887316: D43089.id131686.diff
Mon, Aug 17, 1:15 PM
Unknown Object (File)
Sun, Aug 16, 9:42 PM
Unknown Object (File)
Sun, Aug 16, 9:35 PM
Unknown Object (File)
Sat, Aug 15, 9:21 PM
Unknown Object (File)
Fri, Aug 14, 7:18 AM
Unknown Object (File)
Thu, Aug 13, 8:24 PM
Unknown Object (File)
Mon, Aug 10, 11:04 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 54991
Build 51880: arc lint + arc unit