opnsense-src/sys/ufs
Mark Johnston 3e36ef48a0 ufs: Update *eofflag upon a read of an unlinked directory
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.

Reviewed by:	olce, kib
Reported by:	syzkaller
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D43089

(cherry picked from commit 3ff574c5e1d1d5d07763a14f22d6f9d7291550c6)
2023-12-27 21:58:43 -05:00
..
ffs ufs: do not leave around empty buffers shadowing disk content 2023-12-20 10:29:55 +02:00
ufs ufs: Update *eofflag upon a read of an unlinked directory 2023-12-27 21:58:43 -05:00