Subject: CVE-2024-35792: crypto: rk3288 - Fix use after free in unprepare

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

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

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

crypto: rk3288 - Fix use after free in unprepare

The unprepare call must be carried out before the finalize call
as the latter can free the request.

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

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

	Issue introduced in 6.6 with commit c66c17a0f69b and fixed in 6.6.24 with commit 48dd260fdb72
	Issue introduced in 6.6 with commit c66c17a0f69b and fixed in 6.7.12 with commit eb2a41a8ae8c
	Issue introduced in 6.6 with commit c66c17a0f69b and fixed in 6.8 with commit c0afb6b88fbb

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-35792
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:
	drivers/crypto/rockchip/rk3288_crypto_ahash.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/48dd260fdb728eda4a246f635d1325e82f0d3555
	https://git.kernel.org/stable/c/eb2a41a8ae8c8c4f68aef3bd94665c0cf23e04be
	https://git.kernel.org/stable/c/c0afb6b88fbbc177fa322a835f874be217bffe45