Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A18F930DD2A for ; Mon, 15 Sep 2025 14:10:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757945415; cv=none; b=cKy7TiX/N5SkkMtA62Qn+1RoFP+C6EEWvqGuWCulHFFfC7uoggE1/loO0+3yHXjns8QEu4kqrRzpX8dRn8mVBfb4SRadDiJ85UI0X2Qkpjx0EF5QJHxzYgm6+DcmG63AzwXQkuIP9BtjIyz197vI3/YHlWNRTsCIz+ItGgcg9Fg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757945415; c=relaxed/simple; bh=39HAS07f9hJzdvo8Gwr2/32iTp9HZdl++PVMhFm7kY0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=h0rI07fSiKhqBL1TgBRO5SXFsOsLUeI9AywDxOSrQ0tnBE+9HuJtkAdC/0G0t0nl7f211kEVk0mB4IBBzazMuFtiRmDJUiTh6682wUHqXONZcsdIC30U80xfABxtL4/jfxe4B1H3aL7X1OLBQxqp2ul2X2nVYpR0NkmyUKDr7NU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=By7Pc4Rl; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="By7Pc4Rl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D344C4CEF1; Mon, 15 Sep 2025 14:10:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757945415; bh=39HAS07f9hJzdvo8Gwr2/32iTp9HZdl++PVMhFm7kY0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=By7Pc4RlUuqWSHDSZ6swD2zwbith/SVu8sbSIg6tScd9prIQxP0VT4xHqqWBmVepP dMfrlowpBIhbtsqDuTxYKnLGBS+iHOK+GnFZTd3Nk6od4/5m5FuahbxdHJzE7StvPe 8qRfwGwOv5u+5iw7UnqXm9Ct7hXBWk5+zjP7O+Ss= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53172: fsverity: reject FS_IOC_ENABLE_VERITY on mode 3 fds Date: Mon, 15 Sep 2025 16:02:26 +0200 Message-ID: <2025091554-CVE-2023-53172-3f93@gregkh> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2628; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=XdrjgKhIUtURioewOUpjcsueD1LnmygqX19xP/w8zyE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknZIJe6Sm6pGjdVe87niMiKlTxviU24XuZ/EZdW5ff+ uezuhd3xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwESSJzMs6Fiip9trM4nbsZx5 H0Pf0au2zh5yDAsuGuuGH3pyK+D03xxe/7j/dnNnZnICAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman 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