From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-cve-announce@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@kernel.org>
Subject: CVE-2026-99820: ocfs2: fix array out of bound access in __ocfs2_find_path()
Date: Mon, 30 Nov 2026 08:52:34 +0100 [thread overview]
Message-ID: <2026113029-CVE-2026-99820-4e2a@gregkh> (raw)
From: Greg Kroah-Hartman <gregkh@kernel.org>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: fix array out of bound access in __ocfs2_find_path()
__ocfs2_find_path() walks down the extent tree and records path by calling
find_path_ins(), which appends entry to path->p_node[]. It only has 5
spots.
A corrupted ocfs2 image whose extent block is pointing to itself causes
__ocfs2_find_path() descent endlessly, writing past the end of
path->p_node[] array.
UBSAN: array-index-out-of-bounds in fs/ocfs2/alloc.c:677:14
index 5 is out of range for type 'ocfs2_path_item [5]'
Call Trace:
<TASK>
find_path_ins (fs/ocfs2/alloc.c:677 fs/ocfs2/alloc.c:1914)
__ocfs2_find_path.constprop.0 (fs/ocfs2/alloc.c:1882)
ocfs2_commit_truncate (fs/ocfs2/alloc.c:1924 fs/ocfs2/alloc.c:7286)
ocfs2_truncate_file (fs/ocfs2/file.c:515)
ocfs2_setattr (fs/ocfs2/file.c:1224)
notify_change (fs/attr.c:556)
do_truncate (fs/open.c:68)
do_ftruncate (fs/open.c:194 (discriminator 1))
ksys_ftruncate (fs/open.c:206)
__x64_sys_ftruncate (fs/open.c:211 fs/open.c:209 fs/open.c:209)
Commit a406aff8c051 ("ocfs2: validate l_tree_depth to avoid out-of-bounds
access") already restricts el->l_tree_depth to be less than
OCFS2_MAX_PATH_DEPTH, which is equal to 5. However, does not handle the
infinite descent case.
Check if the el->l_tree_depth decreases on each descent. Maximum descents
are restricted to 4 and the path->p_node[] array does not overflow.
The Linux kernel CVE team has assigned CVE-2026-99820 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.22 with commit dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8 and fixed in 5.10.275 with commit 825e31b1dd0711d3e611b0e53c43d905471b15b5
Issue introduced in 2.6.22 with commit dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8 and fixed in 5.15.226 with commit 3f777a202b58927d2b9b79c500ae1c8b89b8d436
Issue introduced in 2.6.22 with commit dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8 and fixed in 6.1.193 with commit 3d608a953dc4bdd39516a79b6ffb8924736bb000
Issue introduced in 2.6.22 with commit dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8 and fixed in 6.6.163 with commit cf8e485c3e76c8caad3bb91539b08bc11252676a
Issue introduced in 2.6.22 with commit dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8 and fixed in 6.12.118 with commit 7c07e14de49ec2e0080e2d6bfc5709502f88ed34
Issue introduced in 2.6.22 with commit dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8 and fixed in 6.18.64 with commit f254281e111578ec90f4434f34a7264521173359
Issue introduced in 2.6.22 with commit dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8 and fixed in 7.3.4 with commit bf8a21fb049f55804d9a5ad7cf864e71697df0cc
Issue introduced in 2.6.22 with commit dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8 and fixed in 7.4-rc1 with commit 6193ce7896afb52a321a0063c8b6a45e477a84e2
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-99820
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/alloc.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/825e31b1dd0711d3e611b0e53c43d905471b15b5
https://git.kernel.org/stable/c/3f777a202b58927d2b9b79c500ae1c8b89b8d436
https://git.kernel.org/stable/c/3d608a953dc4bdd39516a79b6ffb8924736bb000
https://git.kernel.org/stable/c/cf8e485c3e76c8caad3bb91539b08bc11252676a
https://git.kernel.org/stable/c/7c07e14de49ec2e0080e2d6bfc5709502f88ed34
https://git.kernel.org/stable/c/f254281e111578ec90f4434f34a7264521173359
https://git.kernel.org/stable/c/bf8a21fb049f55804d9a5ad7cf864e71697df0cc
https://git.kernel.org/stable/c/6193ce7896afb52a321a0063c8b6a45e477a84e2
reply other threads:[~2026-11-30 7:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026113029-CVE-2026-99820-4e2a@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=cve@kernel.org \
--cc=gregkh@kernel.org \
--cc=linux-cve-announce@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.