CVE-2023-53494: crypto: xts - Handle EBUSY correctly
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
crypto: xts - Handle EBUSY correctly
As it is xts only handles the special return value of EINPROGRESS, which means that in all other cases it will free data related to the request.
However, as the caller of xts may specify MAY_BACKLOG, we also need to expect EBUSY and treat it in the same way. Otherwise backlogged requests will trigger a use-after-free.
The Linux kernel CVE team has assigned CVE-2023-53494 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.4 with commit 8083b1bf8163e7ae7d8c90f221106d96450b8aa8 and fixed in 5.10.173 with commit 92a07ba4f0af2cccdc2aa5ee32679c9c9714db90 Issue introduced in 5.4 with commit 8083b1bf8163e7ae7d8c90f221106d96450b8aa8 and fixed in 5.15.99 with commit 912eb10b65646ffd222256c78a1c566a3dac177d Issue introduced in 5.4 with commit 8083b1bf8163e7ae7d8c90f221106d96450b8aa8 and fixed in 6.1.16 with commit 57c3e1d63b63dc0841d41df729297cd7c1c35808 Issue introduced in 5.4 with commit 8083b1bf8163e7ae7d8c90f221106d96450b8aa8 and fixed in 6.2.3 with commit d5870848879291700fe6c5257dcb48aadd10425c Issue introduced in 5.4 with commit 8083b1bf8163e7ae7d8c90f221106d96450b8aa8 and fixed in 6.3 with commit 51c082514c2dedf2711c99d93c196cc4eedceb40
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-53494
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:
crypto/xts.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/92a07ba4f0af2cccdc2aa5ee32679c9c9714db90 https://git.kernel.org/stable/c/912eb10b65646ffd222256c78a1c566a3dac177d https://git.kernel.org/stable/c/57c3e1d63b63dc0841d41df729297cd7c1c35808 https://git.kernel.org/stable/c/d5870848879291700fe6c5257dcb48aadd10425c https://git.kernel.org/stable/c/51c082514c2dedf2711c99d93c196cc4eedceb40