{"id":"CVE-2023-53172","summary":"fsverity: reject FS_IOC_ENABLE_VERITY on mode 3 fds","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nfsverity: reject FS_IOC_ENABLE_VERITY on mode 3 fds\n\nCommit 56124d6c87fd (\"fsverity: support enabling with tree block size \u003c\nPAGE_SIZE\") changed FS_IOC_ENABLE_VERITY to use __kernel_read() to read\nthe file's data, instead of direct pagecache accesses.\n\nAn unintended consequence of this is that the\n'WARN_ON_ONCE(!(file-\u003ef_mode & FMODE_READ))' in __kernel_read() became\nreachable by fuzz tests.  This happens if FS_IOC_ENABLE_VERITY is called\non a fd opened with access mode 3, which means \"ioctl access only\".\n\nArguably, FS_IOC_ENABLE_VERITY should work on ioctl-only fds.  But\nioctl-only fds are a weird Linux extension that is rarely used and that\nfew people even know about.  (The documentation for FS_IOC_ENABLE_VERITY\neven specifically says it requires O_RDONLY.)  It's probably not\nworthwhile to make the ioctl internally open a new fd just to handle\nthis case.  Thus, just reject the ioctl on such fds for now.","modified":"2026-04-02T09:43:44.546341Z","published":"2025-09-15T14:04:06.075Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53172.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/04839139213cf60d4c5fc792214a08830e294ff8"},{"type":"WEB","url":"https://git.kernel.org/stable/c/85c039cff3c359967cafe90443c02321e950b216"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53172.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-53172"},{"type":"PACKAGE","url":"https://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"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53172.json"}}],"schema_version":"1.7.5"}