# CVE-2023-53172: fsverity: reject FS_IOC_ENABLE_VERITY on mode 3 fds

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.14%, higher than 3% of CVEs (2026-12-02)
- Published: 2025-09-15T14:04:06.075Z
- Modified: 2026-06-17T06:44:26.190Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

fsverity: reject FS_IOC_ENABLE_VERITY on mode 3 fds

Commit 56124d6c87fd ("fsverity: support enabling with tree block size <
PAGE_SIZE") changed FS_IOC_ENABLE_VERITY to use __kernel_read() to read
the file's data, instead of direct pagecache accesses.

An unintended consequence of this is that the
'WARN_ON_ONCE(!(file->f_mode & FMODE_READ))' in __kernel_read() became
reachable by fuzz tests.  This happens if FS_IOC_ENABLE_VERITY is called
on a fd opened with access mode 3, which means "ioctl access only".

Arguably, FS_IOC_ENABLE_VERITY 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 FS_IOC_ENABLE_VERITY
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.

(As written by CVE List.)

## Affected

- Linux Linux: from 56124d6c87fd749477425110d2564166621a89c4 before 85c039cff3c359967cafe90443c02321e950b216; from 56124d6c87fd749477425110d2564166621a89c4 before 04839139213cf60d4c5fc792214a08830e294ff8; 6.3 (not affected: before 6.3; from 6.3.1 up to 6.3.*; from 6.4 up to *)
- linux linux_kernel: 6.3

## References

- <https://git.kernel.org/stable/c/85c039cff3c359967cafe90443c02321e950b216> (patch)
- <https://git.kernel.org/stable/c/04839139213cf60d4c5fc792214a08830e294ff8> (patch)

## Sources

- CVE List: [CVE-2023-53172](https://www.cve.org/CVERecord?id=CVE-2023-53172), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2023-53172](https://nvd.nist.gov/vuln/detail/CVE-2023-53172), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-53172 · Whole record: https://cve.day/CVE-2023-53172.json · Rebuilt by cve.day 2026-11-25T22:58:34.757Z
