]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
jffs2: Prevent rtime decompress memory corruption
authorKinsey Moore <kinsey.moore@oarcorp.com>
Tue, 23 Jul 2024 20:58:05 +0000 (15:58 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:44 +0000 (19:51 +0100)
commitbd384b04ad1995441b18fe6c1366d02de8c5d5eb
treeff3ce502aeaa893dfa92e7c80f18fc80fab5fd8d
parenta0e0f67f2fc19af5c7a673e68a94e6c99cd14c40
jffs2: Prevent rtime decompress memory corruption

commit fe051552f5078fa02d593847529a3884305a6ffe upstream.

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.

Cc: stable@vger.kernel.org
Signed-off-by: Kinsey Moore <kinsey.moore@oarcorp.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/jffs2/compr_rtime.c