Skip to contentSkip to conversation

CVE-2024-57850: jffs2: Prevent rtime decompress memory corruption

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jan 11, 2025

lore
Share & tools
lore
#0 lore raw

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

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

jffs2: Prevent rtime decompress memory corruption

The rtime decompression routine does not fully check bounds during the entirety of the decompression pass and can corrupt memory outside the decompression buffer if the compressed data is corrupted. This adds the required check to prevent this failure mode.

The Linux kernel CVE team has assigned CVE-2024-57850 to this issue.

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

	Fixed in 5.4.287 with commit 421f9e9f0fae9f8e721ffa07f22d9765fa1214d5
	Fixed in 5.10.231 with commit f6fc251baefc3cdc4f41f2f5a47940d7d4a67332
	Fixed in 5.15.174 with commit bd384b04ad1995441b18fe6c1366d02de8c5d5eb
	Fixed in 6.1.120 with commit 47c9a7f81027a78afea9d2e9a54bfd8fabb6b3d0
	Fixed in 6.6.66 with commit 6808a1812a3419542223e7fe9e2de577e99e45d1
	Fixed in 6.12.5 with commit dc39b08fcc3831b0bc46add91ba93cd2aab50716
	Fixed in 6.13-rc1 with commit fe051552f5078fa02d593847529a3884305a6ffe

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-2024-57850

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/jffs2/compr_rtime.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/421f9e9f0fae9f8e721ffa07f22d9765fa1214d5
	https://git.kernel.org/stable/c/f6fc251baefc3cdc4f41f2f5a47940d7d4a67332
	https://git.kernel.org/stable/c/bd384b04ad1995441b18fe6c1366d02de8c5d5eb
	https://git.kernel.org/stable/c/47c9a7f81027a78afea9d2e9a54bfd8fabb6b3d0
	https://git.kernel.org/stable/c/6808a1812a3419542223e7fe9e2de577e99e45d1
	https://git.kernel.org/stable/c/dc39b08fcc3831b0bc46add91ba93cd2aab50716
	https://git.kernel.org/stable/c/fe051552f5078fa02d593847529a3884305a6ffe