CVE-2026-72161: ocfs2: add journal NULL check in ocfs2_checkpoint_inode()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: add journal NULL check in ocfs2_checkpoint_inode()
During unmount, ocfs2_journal_shutdown() frees the journal and sets osb->journal to NULL. Later, when VFS evicts remaining cached inodes, ocfs2_evict_inode() -> ocfs2_clear_inode() -> ocfs2_checkpoint_inode() -> ocfs2_ci_fully_checkpointed() dereferences osb->journal, causing a NULL pointer dereference.
Fix this by adding a NULL check for osb->journal in ocfs2_checkpoint_inode(). If the journal is NULL, it has already been fully flushed and destroyed during shutdown, so there is nothing to checkpoint.
The Linux kernel CVE team has assigned CVE-2026-72161 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.16 with commit da5e7c87827e8caa6a1eeec6d95dcf74ab592a01 and fixed in 6.1.178 with commit 24daf13422e8328fd588c34a017bdef1949910e8 Issue introduced in 5.16 with commit da5e7c87827e8caa6a1eeec6d95dcf74ab592a01 and fixed in 6.6.145 with commit 7da7e4ac21895fe34cceffcfc99497cc2750da99 Issue introduced in 5.16 with commit da5e7c87827e8caa6a1eeec6d95dcf74ab592a01 and fixed in 6.12.97 with commit eb6a13834c23e291f1170cb1b489ec255edfa5a3 Issue introduced in 5.16 with commit da5e7c87827e8caa6a1eeec6d95dcf74ab592a01 and fixed in 6.18.40 with commit 499714de42ab4d2e778cbb10186684142a1222eb Issue introduced in 5.16 with commit da5e7c87827e8caa6a1eeec6d95dcf74ab592a01 and fixed in 7.1.5 with commit 63921f790234b221e4b15c56c72888b13250f81d Issue introduced in 5.16 with commit da5e7c87827e8caa6a1eeec6d95dcf74ab592a01 and fixed in 7.2-rc1 with commit a291c77c034b7a81849ce9b71cc9ecda9e587d89
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-2026-72161
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/journal.h
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/24daf13422e8328fd588c34a017bdef1949910e8 https://git.kernel.org/stable/c/7da7e4ac21895fe34cceffcfc99497cc2750da99 https://git.kernel.org/stable/c/eb6a13834c23e291f1170cb1b489ec255edfa5a3 https://git.kernel.org/stable/c/499714de42ab4d2e778cbb10186684142a1222eb https://git.kernel.org/stable/c/63921f790234b221e4b15c56c72888b13250f81d https://git.kernel.org/stable/c/a291c77c034b7a81849ce9b71cc9ecda9e587d89