Page MenuHomeFreeBSD

mount: Check for !VDIR mount points before handling -o emptydir
ClosedPublic

Authored by markj on Oct 13 2021, 12:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 6, 9:02 AM
Unknown Object (File)
Thu, Mar 26, 7:56 AM
Unknown Object (File)
Wed, Mar 25, 5:35 AM
Unknown Object (File)
Sun, Mar 22, 4:14 PM
Unknown Object (File)
Sun, Mar 22, 4:27 AM
Unknown Object (File)
Sat, Mar 21, 9:53 PM
Unknown Object (File)
Sat, Mar 21, 11:08 AM
Unknown Object (File)
Mar 11 2026, 7:16 AM
Subscribers

Details

Summary

To implement -o emptydir, vfs_emptydir() checks that the passed
directory is empty. This should be done after checking whether the
vnode is of type VDIR, though, or vfs_emptydir() may end up calling
VOP_READDIR on a non-directory.

Reported by: syzbot+4006732c69fb0f792b2c@syzkaller.appspotmail.com

Diff Detail

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