Subject: CVE-2023-52602: jfs: fix slab-out-of-bounds Read in dtSearch

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

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

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

jfs: fix slab-out-of-bounds Read in dtSearch

Currently while searching for current page in the sorted entry table
of the page there is a out of bound access. Added a bound check to fix
the error.

Dave:
Set return code to -EIO

The Linux kernel CVE team has assigned CVE-2023-52602 to this issue.

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

	Fixed in 4.19.307 with commit ce8bc22e9486
	Fixed in 5.4.269 with commit 1b9d6828589d
	Fixed in 5.10.210 with commit 1c40ca3d39d7
	Fixed in 5.15.149 with commit 6c6a96c3d74d
	Fixed in 6.1.77 with commit cab0c265ba18
	Fixed in 6.6.16 with commit 7110650b85dd
	Fixed in 6.7.4 with commit bff9d4078a23
	Fixed in 6.8 with commit fa5492ee8946

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-2023-52602
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_dtree.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/ce8bc22e948634a5c0a3fa58a179177d0e3f3950
	https://git.kernel.org/stable/c/1b9d6828589d57f94a23fb1c46112cda39d7efdb
	https://git.kernel.org/stable/c/1c40ca3d39d769931b28295b3145c25f1decf5a6
	https://git.kernel.org/stable/c/6c6a96c3d74df185ee344977d46944d6f33bb4dd
	https://git.kernel.org/stable/c/cab0c265ba182fd266c2aa3c69d7e40640a7f612
	https://git.kernel.org/stable/c/7110650b85dd2f1cee819acd1345a9013a1a62f7
	https://git.kernel.org/stable/c/bff9d4078a232c01e42e9377d005fb2f4d31a472
	https://git.kernel.org/stable/c/fa5492ee89463a7590a1449358002ff7ef63529f