CVE-2023-53568: s390/zcrypt: don't leak memory if dev_set_name() fails
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
s390/zcrypt: don't leak memory if dev_set_name() fails
When dev_set_name() fails, zcdn_create() doesn't free the newly allocated resources. Do it.
The Linux kernel CVE team has assigned CVE-2023-53568 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.20 with commit 00fab2350e6b91e57b3cdcd5d9f01056775a921d and fixed in 5.4.257 with commit 6b0cb9c055843777b374309503d89eabeb769355 Issue introduced in 4.20 with commit 00fab2350e6b91e57b3cdcd5d9f01056775a921d and fixed in 5.10.195 with commit 0878052579cb2773caee64812a811edcab6b5a55 Issue introduced in 4.20 with commit 00fab2350e6b91e57b3cdcd5d9f01056775a921d and fixed in 5.15.132 with commit 131cd74a8e38d75239f2c81dfee53d6554eb8bf8 Issue introduced in 4.20 with commit 00fab2350e6b91e57b3cdcd5d9f01056775a921d and fixed in 6.1.54 with commit 147d8da33a2c2195ec63acd56cd7d80a3458c253 Issue introduced in 4.20 with commit 00fab2350e6b91e57b3cdcd5d9f01056775a921d and fixed in 6.5.4 with commit 174f11ef1615ec3ab1e2189685864433c0d855a2 Issue introduced in 4.20 with commit 00fab2350e6b91e57b3cdcd5d9f01056775a921d and fixed in 6.6 with commit 6252f47b78031979ad919f971dc8468b893488bd
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-53568
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/s390/crypto/zcrypt_api.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/6b0cb9c055843777b374309503d89eabeb769355 https://git.kernel.org/stable/c/0878052579cb2773caee64812a811edcab6b5a55 https://git.kernel.org/stable/c/131cd74a8e38d75239f2c81dfee53d6554eb8bf8 https://git.kernel.org/stable/c/147d8da33a2c2195ec63acd56cd7d80a3458c253 https://git.kernel.org/stable/c/174f11ef1615ec3ab1e2189685864433c0d855a2 https://git.kernel.org/stable/c/6252f47b78031979ad919f971dc8468b893488bd