In the Linux kernel, the following vulnerability has been resolved: fsverity: reject FSIOCENABLEVERITY on mode 3 fds Commit 56124d6c87fd ("fsverity: support enabling with tree block size < PAGESIZE") changed FSIOCENABLE_VERITY to use __kernelread() to read the file's data, instead of direct pagecache accesses. An unintended consequence of this is that the 'WARNONONCE(!(file->fmode & FMODE_READ))' in _kernelread() became reachable by fuzz tests. This happens if FSIOCENABLEVERITY is called on a fd opened with access mode 3, which means "ioctl access only". Arguably, FSIOCENABLEVERITY should work on ioctl-only fds. But ioctl-only fds are a weird Linux extension that is rarely used and that few people even know about. (The documentation for FSIOCENABLEVERITY even specifically says it requires ORDONLY.) It's probably not worthwhile to make the ioctl internally open a new fd just to handle this case. Thus, just reject the ioctl on such fds for now.