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 C6FD5221550 for ; Fri, 19 Sep 2025 15:29:32 +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=1758295772; cv=none; b=rCIanXv2HU4gGpNMLyCH9PEnaUQYNGfmv5zgdtWTZtvlDwiq9GdwXWi3pFzfviZE94mbvMwryMbDmEN8zq4FXvqxDsxbdgpxSEFziHZD31gQMc4t5G2/T2mwEkZtf5khP/jcgzs5nd0FofVoJllZvKuBkv+yC03c8kLJcsGc8Q8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758295772; c=relaxed/simple; bh=ZZkD2baMQV+s5ZgNzklwrLTtFV95U49cRWVkMDqyPtU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GlKRdTF5kblbhsDonran8LSTTd0YzkjzqMqCmDw1lgh/pNfXRQBEV9Dls2CpQ+gAkI7TeEaC2Ky2ajP7zO3jBwlFvUeI5yOTJ77YGz5fnKFf5c97mzje7pvUlFzI4yUNJkXSRRtktRXWU3r7jlRj1/anCZm4iGBJyVwWyMwi5J4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pBSmbTxO; 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="pBSmbTxO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45A89C4CEF0; Fri, 19 Sep 2025 15:29:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758295772; bh=ZZkD2baMQV+s5ZgNzklwrLTtFV95U49cRWVkMDqyPtU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=pBSmbTxO7xrzQvb1K0XnH8BKV1W1Bv8q3BMQXm3SqZSRXBm2cCbo95b/+dt04BhzE BGCUckw5RVeH8jaBlpY3vuYVfheHl39yI/1WuODRdDB7zTerX6SdCP4sZpFAU4ucFM krkDym0EcU3AOJBUB3nruuO6QnfIh9n0WkNDWGZI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39842: ocfs2: prevent release journal inode after journal shutdown Date: Fri, 19 Sep 2025 17:28:06 +0200 Message-ID: <2025091902-CVE-2025-39842-495f@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=3063; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=P4KSpyTvvcgB8kWWCT7pdrJhCj+Oq7fGx6CLTKlosEQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlny5ojVD63Xhcodc94vmUqw+nqZu7Vjx6Lzbpvu+uqs NSkJtv3HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRfU4MC659MWKpklsg7Kec PiXwzfVki2MtdxhmswZlGz+39GJlcbzrcEvzorD3Mh9tAA== 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: ocfs2: prevent release journal inode after journal shutdown Before calling ocfs2_delete_osb(), ocfs2_journal_shutdown() has already been executed in ocfs2_dismount_volume(), so osb->journal must be NULL. Therefore, the following calltrace will inevitably fail when it reaches jbd2_journal_release_jbd_inode(). ocfs2_dismount_volume()-> ocfs2_delete_osb()-> ocfs2_free_slot_info()-> __ocfs2_free_slot_info()-> evict()-> ocfs2_evict_inode()-> ocfs2_clear_inode()-> jbd2_journal_release_jbd_inode(osb->journal->j_journal, Adding osb->journal checks will prevent null-ptr-deref during the above execution path. The Linux kernel CVE team has assigned CVE-2025-39842 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit da5e7c87827e8caa6a1eeec6d95dcf74ab592a01 and fixed in 6.1.151 with commit 42c415c53ad2065088cc411d08925effa5b3d255 Issue introduced in 5.16 with commit da5e7c87827e8caa6a1eeec6d95dcf74ab592a01 and fixed in 6.6.105 with commit e9188f66e94955431ddbe2cd1cdf8ff2bb486abf Issue introduced in 5.16 with commit da5e7c87827e8caa6a1eeec6d95dcf74ab592a01 and fixed in 6.12.46 with commit f4a917e6cd6c798f7adf39907f117fc754db1283 Issue introduced in 5.16 with commit da5e7c87827e8caa6a1eeec6d95dcf74ab592a01 and fixed in 6.16.6 with commit 85e66331b60601d903cceaf8c10a234db863cd78 Issue introduced in 5.16 with commit da5e7c87827e8caa6a1eeec6d95dcf74ab592a01 and fixed in 6.17-rc5 with commit f46e8ef8bb7b452584f2e75337b619ac51a7cadf 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-2025-39842 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/ocfs2/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/42c415c53ad2065088cc411d08925effa5b3d255 https://git.kernel.org/stable/c/e9188f66e94955431ddbe2cd1cdf8ff2bb486abf https://git.kernel.org/stable/c/f4a917e6cd6c798f7adf39907f117fc754db1283 https://git.kernel.org/stable/c/85e66331b60601d903cceaf8c10a234db863cd78 https://git.kernel.org/stable/c/f46e8ef8bb7b452584f2e75337b619ac51a7cadf