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 4F3D919B3EC for ; Wed, 16 Apr 2025 14:13:55 +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=1744812837; cv=none; b=T8MDHDAq/pMO0cF75gnXI4sRO6P0ROLVJq29ZBiod61KvSiYZ8c01LRSVouR2Q62LC+42gARGX50kDCE31rFU6cuBVkjFBQGzOOkEfLRInnTDubbHKteGdircZyHJgXN7zIUtsIyxdIo9RZD+275m7I7WuVdZzeHdF2uywsN2gM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744812837; c=relaxed/simple; bh=VkwqXD2mDNlE4oOGpy6V2chx39xAgZlsLnhQgH1TRo0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GYW5D7tdipA88+aGzR2nrjBLc/I/qGjAi8d3i9qwDDTnC9QoMz1p01ORVzuRNT4LuGzHDpnnBoMt77vlOpFagNI97J5k54tN//qu7b5mU3ptXDaDQCH6kllBA5oz/zD62FQphXuGABcjiT+bW4RWVevVldU/P6SsQRx+I6TUbXM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jmTXoOAc; 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="jmTXoOAc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51741C4CEE2; Wed, 16 Apr 2025 14:13:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744812835; bh=VkwqXD2mDNlE4oOGpy6V2chx39xAgZlsLnhQgH1TRo0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=jmTXoOAcnM3UrusI2l1XzwstuOyWpkCEntgQRYlFoyQ0his9yaiTqV/Dfj3Sde06Y Dy9SMfdXHLDQwxyQUBkjCphQLkZRjJnZIcRkjwLFgQ04b5c16x3NBs7krQcj2V0+f5 kLQqvQLEG/T2ULyCO51MG8LaopwG00h2oVTd2nKI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-58094: jfs: add check read-only before truncation in jfs_truncate_nolock() Date: Wed, 16 Apr 2025 16:11:51 +0200 Message-ID: <2025041652-CVE-2024-58094-b87b@gregkh> X-Mailer: git-send-email 2.49.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=2413; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=VkwqXD2mDNlE4oOGpy6V2chx39xAgZlsLnhQgH1TRo0=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn/d62M2tHyPj/t8+LwWstZV4Oabrb1X/xx+sQR46DS2 B32Eo2/O2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiV9sYFuzQrb72IdW8Q7qE z7fpjN3Z/OZ2Xoa5ghseS3oZTflhaaEafXm9xn2VeRqLAQ== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: jfs: add check read-only before truncation in jfs_truncate_nolock() Added a check for "read-only" mode in the `jfs_truncate_nolock` function to avoid errors related to writing to a read-only filesystem. Call stack: block_write_begin() { jfs_write_failed() { jfs_truncate() { jfs_truncate_nolock() { txEnd() { ... log = JFS_SBI(tblk->sb)->log; // (log == NULL) If the `isReadOnly(ip)` condition is triggered in `jfs_truncate_nolock`, the function execution will stop, and no further data modification will occur. Instead, the `xtTruncate` function will be called with the "COMMIT_WMAP" flag, preventing modifications in "read-only" mode. The Linux kernel CVE team has assigned CVE-2024-58094 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.14.2 with commit f605bc3e162f5c6faa9bd3602ce496053d06a4bb Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.15-rc1 with commit b5799dd77054c1ec49b0088b006c9908e256843b 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-2024-58094 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/jfs/inode.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/f605bc3e162f5c6faa9bd3602ce496053d06a4bb https://git.kernel.org/stable/c/b5799dd77054c1ec49b0088b006c9908e256843b