Skip to contentSkip to conversation

CVE-2025-38697: jfs: upper bound check of tree index in dbAllocAG

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 4, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

jfs: upper bound check of tree index in dbAllocAG

When computing the tree index in dbAllocAG, we never check if we are out of bounds realative to the size of the stree.
This could happen in a scenario where the filesystem metadata are corrupted.

The Linux kernel CVE team has assigned CVE-2025-38697 to this issue.

Affected and fixed versions
===========================

	Fixed in 5.4.297 with commit 5bdb9553fb134fd52ec208a8b378120670f6e784
	Fixed in 5.10.241 with commit a4f199203f79ca9cd7355799ccb26800174ff093
	Fixed in 5.15.190 with commit 1467a75819e41341cd5ebd16faa2af1ca3c8f4fe
	Fixed in 6.1.149 with commit 49ea46d9025aa1914b24ea957636cbe4367a7311
	Fixed in 6.6.103 with commit 173cfd741ad7073640bfb7e2344c2a0ee005e769
	Fixed in 6.12.43 with commit c8ca21a2836993d7cb816668458e05e598574e55
	Fixed in 6.15.11 with commit 2dd05f09cc323018136a7ecdb3d1007be9ede27f
	Fixed in 6.16.2 with commit 30e19a884c0b11f33821aacda7e72e914bec26ef
	Fixed in 6.17-rc1 with commit c214006856ff52a8ff17ed8da52d50601d54f9ce

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-38697

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/jfs_dmap.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/5bdb9553fb134fd52ec208a8b378120670f6e784
	https://git.kernel.org/stable/c/a4f199203f79ca9cd7355799ccb26800174ff093
	https://git.kernel.org/stable/c/1467a75819e41341cd5ebd16faa2af1ca3c8f4fe
	https://git.kernel.org/stable/c/49ea46d9025aa1914b24ea957636cbe4367a7311
	https://git.kernel.org/stable/c/173cfd741ad7073640bfb7e2344c2a0ee005e769
	https://git.kernel.org/stable/c/c8ca21a2836993d7cb816668458e05e598574e55
	https://git.kernel.org/stable/c/2dd05f09cc323018136a7ecdb3d1007be9ede27f
	https://git.kernel.org/stable/c/30e19a884c0b11f33821aacda7e72e914bec26ef
	https://git.kernel.org/stable/c/c214006856ff52a8ff17ed8da52d50601d54f9ce