[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025091554-CVE-2023-53172-3f93@gregkh>
Date: Mon, 15 Sep 2025 16:02:26 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2023-53172: fsverity: reject FS_IOC_ENABLE_VERITY on mode 3 fds
From: Greg Kroah-Hartman <gregkh@...nel.org>
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.
The Linux kernel CVE team has assigned CVE-2023-53172 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.3 with commit 56124d6c87fd749477425110d2564166621a89c4 and fixed in 6.3.1 with commit 85c039cff3c359967cafe90443c02321e950b216
Issue introduced in 6.3 with commit 56124d6c87fd749477425110d2564166621a89c4 and fixed in 6.4 with commit 04839139213cf60d4c5fc792214a08830e294ff8
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2023-53172
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/verity/enable.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/85c039cff3c359967cafe90443c02321e950b216
https://git.kernel.org/stable/c/04839139213cf60d4c5fc792214a08830e294ff8
Powered by blists - more mailing lists