CVE-2023-52497
erofs: fix lz4 inplace decompression
Check your servers for CVE-2023-52497
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-52497 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
erofs: fix lz4 inplace decompression
Currently EROFS can map another compressed buffer for inplace decompression, that was used to handle the cases that some pages of compressed data are actually not in-place I/O.
However, like most simple LZ77 algorithms, LZ4 expects the compressed data is arranged at the end of the decompressed buffer and it explicitly uses memmove() to handle overlapping: __________________________________________________________ |_ direction of decompression --> ____ |_ compressed data _|
Although EROFS arranges compressed data like this, it typically maps two individual virtual buffers so the relative order is uncertain. Previously, it was hardly observed since LZ4 only uses memmove() for short overlapped literals and x86/arm64 memmove implementations seem to completely cover it up and they don't have this issue. Juhyung reported that EROFS data corruption can be found on a new Intel x86 processor. After some analysis, it seems that recent x86 processors with the new FSRM feature expose this issue with "rep movsb".
Let's strictly use the decompressed buffer for lz4 inplace decompression for now. Later, as an useful improvement, we could try to tie up these two buffers together in the correct order.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.28%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 22.1% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 7 Mar 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 0ffd71bcc3a03ebb3551661a36052488369c4de9, before 9ff2d260b25df6fe1341a79113d88fecf6bd553e affected from 0ffd71bcc3a03ebb3551661a36052488369c4de9, before a0180e940cf1aefa7d516e20b259ad34f7a8b379 affected from 0ffd71bcc3a03ebb3551661a36052488369c4de9, before 77cbc04a1a8610e303a0e0d74f2676667876a184 affected from 0ffd71bcc3a03ebb3551661a36052488369c4de9, before 33bf23c9940dbd3a22aad7f0cda4c84ed5701847 affected from 0ffd71bcc3a03ebb3551661a36052488369c4de9, before f36d200a80a3ca025532ed60dd1ac21b620e14ae affected from 0ffd71bcc3a03ebb3551661a36052488369c4de9, before bffc4cc334c5bb31ded54bc3cfd651735a3cb79e affected from 0ffd71bcc3a03ebb3551661a36052488369c4de9, before 3c12466b6b7bf1e56f9b32c366a3d83d87afb4de
Other versions: unaffected
|
| Linux |
affected 5.3 unaffected before 5.3 unaffected from 5.4.285 up to and including 5.4.* unaffected from 5.10.211 up to and including 5.10.* unaffected from 5.15.150 up to and including 5.15.* unaffected from 6.1.76 up to and including 6.1.* unaffected from 6.6.15 up to and including 6.6.* unaffected from 6.7.3 up to and including 6.7.* unaffected 6.8 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2023-52497 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2023-52497
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2023-52497
trivy image --scanners vuln IMAGE | grep CVE-2023-52497
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/9ff2d260b25df6fe1341a79113d88fecf6bd553e git.kernel.org
- https://git.kernel.org/stable/c/a0180e940cf1aefa7d516e20b259ad34f7a8b379 git.kernel.org
- https://git.kernel.org/stable/c/77cbc04a1a8610e303a0e0d74f2676667876a184 git.kernel.org
- https://git.kernel.org/stable/c/33bf23c9940dbd3a22aad7f0cda4c84ed5701847 git.kernel.org
- https://git.kernel.org/stable/c/f36d200a80a3ca025532ed60dd1ac21b620e14ae git.kernel.org
- https://git.kernel.org/stable/c/bffc4cc334c5bb31ded54bc3cfd651735a3cb79e git.kernel.org
- https://git.kernel.org/stable/c/3c12466b6b7bf1e56f9b32c366a3d83d87afb4de git.kernel.org
- https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html lists.debian.org
Source: the record CVE-2023-52497 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse