// For flags

CVE-2023-52733

s390/decompressor: specify __decompress() buf len to avoid overflow

Severity Score

7.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track*
*SSVC
Descriptions

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

s390/decompressor: specify __decompress() buf len to avoid overflow

Historically calls to __decompress() didn't specify "out_len" parameter
on many architectures including s390, expecting that no writes beyond
uncompressed kernel image are performed. This has changed since commit
2aa14b1ab2c4 ("zstd: import usptream v1.5.2") which includes zstd library
commit 6a7ede3dfccb ("Reduce size of dctx by reutilizing dst buffer
(#2751)"). Now zstd decompression code might store literal buffer in
the unwritten portion of the destination buffer. Since "out_len" is
not set, it is considered to be unlimited and hence free to use for
optimization needs. On s390 this might corrupt initrd or ipl report
which are often placed right after the decompressor buffer. Luckily the
size of uncompressed kernel image is already known to the decompressor,
so to avoid the problem simply specify it in the "out_len" parameter.

En el kernel de Linux, se resolvió la siguiente vulnerabilidad: s390/decompressor: especifique __decompress() buf len para evitar el desbordamiento. Históricamente, las llamadas a __decompress() no especificaban el parámetro "out_len" en muchas arquitecturas, incluido s390, esperando que no se escribieran más allá Se realizan imágenes del kernel sin comprimir. Esto ha cambiado desde la confirmación 2aa14b1ab2c4 ("zstd: import usptream v1.5.2") que incluye la confirmación de la biblioteca zstd 6a7ede3dfccb ("Reducir el tamaño de dctx reutilizando el búfer dst (#2751)"). Ahora el código de descompresión zstd podría almacenar un búfer literal en la parte no escrita del búfer de destino. Dado que "out_len" no está configurado, se considera ilimitado y, por lo tanto, de uso gratuito para las necesidades de optimización. En s390, esto podría dañar el informe initrd o ipl que a menudo se coloca justo después del buffer del descompresor. Afortunadamente, el descompresor ya conoce el tamaño de la imagen del kernel sin comprimir, por lo que para evitar el problema simplemente especifíquelo en el parámetro "out_len".

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
* Common Vulnerability Scoring System
SSVC
  • Decision:Track*
Exploitation
None
Automatable
No
Tech. Impact
Total
* Organization's Worst-case Scenario
Timeline
  • 2024-05-21 CVE Reserved
  • 2024-05-21 CVE Published
  • 2024-05-22 EPSS Updated
  • 2024-08-02 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
< 5.4.232
Search vendor "Linux" for product "Linux Kernel" and version " < 5.4.232"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
< 5.10.169
Search vendor "Linux" for product "Linux Kernel" and version " < 5.10.169"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
< 5.15.95
Search vendor "Linux" for product "Linux Kernel" and version " < 5.15.95"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
< 6.1.13
Search vendor "Linux" for product "Linux Kernel" and version " < 6.1.13"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
< 6.2
Search vendor "Linux" for product "Linux Kernel" and version " < 6.2"
en
Affected