In the Linux kernel, the following vulnerability has been resolved:
fsverity: reject FSIOCENABLE_VERITY on mode 3 fds
Commit 56124d6c87fd ("fsverity: support enabling with tree block size < PAGESIZE") changed FSIOCENABLEVERITY 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 & FMODEREAD))' in _kernelread() became reachable by fuzz tests. This happens if FSIOCENABLE_VERITY 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 O_RDONLY.) 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.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53172.json"
}