CVE-2023-53172

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-53172
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53172.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-53172
Downstream
Published
2025-09-15T14:04:06.075Z
Modified
2025-11-30T02:53:25.584934Z
Summary
fsverity: reject FS_IOC_ENABLE_VERITY on mode 3 fds
Details

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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53172.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
56124d6c87fd749477425110d2564166621a89c4
Fixed
85c039cff3c359967cafe90443c02321e950b216
Fixed
04839139213cf60d4c5fc792214a08830e294ff8

Affected versions

v6.*

v6.2
v6.2-rc3
v6.2-rc4
v6.2-rc5
v6.2-rc6
v6.2-rc7
v6.2-rc8
v6.3
v6.3-rc1
v6.3-rc2
v6.3-rc3
v6.3-rc4
v6.3-rc5
v6.3-rc6
v6.3-rc7

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.3.0
Fixed
6.3.1