Cloudanix VulnDB

CVE-2023-52497

None

CVSS

—

EPSS

0.3%

Published

Mar 1, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in how the Linux kernel reads certain compressed files can cause those files to become corrupted on newer Intel processors, potentially breaking applications or losing data.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Data Tampering
Component
OS kernel
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

EROFS LZ4 inplace decompression maps separate virtual buffers whose relative ordering is not guaranteed, allowing memmove() during overlapping literal copies to produce incorrect results on x86 CPUs with the FSRM "rep movsb" implementation and resulting in data corruption inside the decompressed buffer.

Why it matters to the business

Systems using EROFS with LZ4 compression on recent Intel processors may silently corrupt file data, causing application failures, filesystem inconsistencies, or loss of integrity for any workloads that read compressed EROFS images.

How an attack unfolds

An attacker with the ability to supply or influence EROFS filesystem images triggers decompression of specially arranged compressed data that relies on overlapping literals; on vulnerable hardware the uncertain buffer ordering combined with the new memmove implementation produces corrupted output that can be observed or leveraged for further impact.

How to fix it

Upgrade the Linux kernel to a version containing commit 9ff2d260b25df6fe1341a79113d88fecf6bd553e or later; rebuild and redeploy any custom kernels or distributions that include the affected EROFS code; test LZ4-compressed EROFS workloads on the patched kernel before wide deployment.

How to confirm the fix worked

Confirm the running kernel contains commit 9ff2d260b25df6fe1341a79113d88fecf6bd553e; exercise EROFS LZ4 decompression with known overlapping-literal test images and verify that no data corruption occurs; monitor for EROFS read errors or checksum mismatches on patched systems.

Typical attack path

  1. Obtain or create an EROFS image containing LZ4-compressed data with short overlapping literals
  2. Mount the image on a vulnerable kernel running on a recent Intel x86 CPU with FSRM enabled
  3. Trigger reads that exercise the inplace decompression path
  4. Observe or exploit the resulting data corruption

How to detect it

Search kernel logs for EROFS read or decompression errors, unexpected data checksum failures, or corruption reports on systems with recent Intel CPUs; examine any crash dumps or application-level integrity failures that coincide with EROFS mounts.

What your security team should do

  • Prioritize kernel upgrades on any systems that mount EROFS volumes with LZ4 compression
  • Add the fixed commit identifier to internal kernel build and patch-management processes
  • Restrict untrusted EROFS images until patches are applied
  • Include EROFS decompression paths in regression test suites for new Intel hardware

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Debian:10 linux-5.10 0 5.10.216-1~deb10u1
Debian:11 linux 0 5.10.216-1
Debian:12 linux 0 6.1.76-1
Debian:13 linux 0 6.6.15-1
Linux Kernel 5.3.0 5.4.285
SUSE:Linux Enterprise High Availability Extension 15 SP4 kernel-default 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise High Availability Extension 15 SP5 kernel-default 0 5.14.21-150500.55.59.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-64kb 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-default 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-default-base 0 5.14.21-150400.24.116.1.150400.24.54.5
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-docs 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-obs-build 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-source 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-syms 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-64kb 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-default 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-default-base 0 5.14.21-150400.24.116.1.150400.24.54.5
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-docs 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-obs-build 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-source 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-syms 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Live Patching 15 SP4 kernel-default 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Live Patching 15 SP4 kernel-livepatch-SLE15-SP4_Update_25 0 1-150400.9.5.1
SUSE:Linux Enterprise Live Patching 15 SP5 kernel-default 0 5.14.21-150500.55.59.1
SUSE:Linux Enterprise Live Patching 15 SP5 kernel-livepatch-SLE15-SP5-RT_Update_13 0 1-150500.11.3.1
SUSE:Linux Enterprise Live Patching 15 SP5 kernel-livepatch-SLE15-SP5_Update_12 0 1-150500.11.7.1
SUSE:Linux Enterprise Micro 5.3 kernel-default 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Micro 5.3 kernel-default-base 0 5.14.21-150400.24.116.1.150400.24.54.5
SUSE:Linux Enterprise Micro 5.3 kernel-rt 0 5.14.21-150400.15.76.1
SUSE:Linux Enterprise Micro 5.3 kernel-source-rt 0 5.14.21-150400.15.76.1
SUSE:Linux Enterprise Micro 5.4 kernel-default 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Micro 5.4 kernel-default-base 0 5.14.21-150400.24.116.1.150400.24.54.5
SUSE:Linux Enterprise Micro 5.4 kernel-rt 0 5.14.21-150400.15.76.1
SUSE:Linux Enterprise Micro 5.4 kernel-source-rt 0 5.14.21-150400.15.76.1
SUSE:Linux Enterprise Micro 5.5 kernel-default 0 5.14.21-150500.55.59.1
SUSE:Linux Enterprise Micro 5.5 kernel-default-base 0 5.14.21-150500.55.59.1.150500.6.25.7
SUSE:Linux Enterprise Micro 5.5 kernel-rt 0 5.14.21-150500.13.47.1
SUSE:Linux Enterprise Micro 5.5 kernel-source-rt 0 5.14.21-150500.13.47.1
SUSE:Linux Enterprise Module for Basesystem 15 SP5 kernel-64kb 0 5.14.21-150500.55.59.1
SUSE:Linux Enterprise Module for Basesystem 15 SP5 kernel-default 0 5.14.21-150500.55.59.1
SUSE:Linux Enterprise Module for Basesystem 15 SP5 kernel-default-base 0 5.14.21-150500.55.59.1.150500.6.25.7
SUSE:Linux Enterprise Module for Basesystem 15 SP5 kernel-source 0 5.14.21-150500.55.59.1
SUSE:Linux Enterprise Module for Basesystem 15 SP5 kernel-zfcpdump 0 5.14.21-150500.55.59.1
SUSE:Linux Enterprise Module for Development Tools 15 SP5 kernel-docs 0 5.14.21-150500.55.59.1
SUSE:Linux Enterprise Module for Development Tools 15 SP5 kernel-obs-build 0 5.14.21-150500.55.59.1
SUSE:Linux Enterprise Module for Development Tools 15 SP5 kernel-source 0 5.14.21-150500.55.59.1
SUSE:Linux Enterprise Module for Development Tools 15 SP5 kernel-syms 0 5.14.21-150500.55.59.1
SUSE:Linux Enterprise Module for Legacy 15 SP5 kernel-default 0 5.14.21-150500.55.59.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP5 kernel-azure 0 5.14.21-150500.33.48.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP5 kernel-source-azure 0 5.14.21-150500.33.48.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP5 kernel-syms-azure 0 5.14.21-150500.33.48.1
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-64kb 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-default 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-default-base 0 5.14.21-150400.24.116.1.150400.24.54.5
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-docs 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-obs-build 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-source 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-syms 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-zfcpdump 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 kernel-default 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 kernel-default-base 0 5.14.21-150400.24.116.1.150400.24.54.5
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 kernel-docs 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 kernel-obs-build 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 kernel-source 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 kernel-syms 0 5.14.21-150400.24.116.1
SUSE:Linux Enterprise Workstation Extension 15 SP5 kernel-default 0 5.14.21-150500.55.59.1
SUSE:Manager Proxy 4.3 kernel-default 0 5.14.21-150400.24.116.1
SUSE:Manager Proxy 4.3 kernel-default-base 0 5.14.21-150400.24.116.1.150400.24.54.5
SUSE:Manager Proxy 4.3 kernel-source 0 5.14.21-150400.24.116.1
SUSE:Manager Proxy 4.3 kernel-syms 0 5.14.21-150400.24.116.1
SUSE:Manager Server 4.3 kernel-default 0 5.14.21-150400.24.116.1
SUSE:Manager Server 4.3 kernel-default-base 0 5.14.21-150400.24.116.1.150400.24.54.5
SUSE:Manager Server 4.3 kernel-source 0 5.14.21-150400.24.116.1
SUSE:Manager Server 4.3 kernel-syms 0 5.14.21-150400.24.116.1
SUSE:Manager Server 4.3 kernel-zfcpdump 0 5.14.21-150400.24.116.1
SUSE:Real Time Module 15 SP5 kernel-rt 0 5.14.21-150500.13.47.1
SUSE:Real Time Module 15 SP5 kernel-rt_debug 0 5.14.21-150500.13.47.1
SUSE:Real Time Module 15 SP5 kernel-source-rt 0 5.14.21-150500.13.47.1
SUSE:Real Time Module 15 SP5 kernel-syms-rt 0 5.14.21-150500.13.47.1
Ubuntu:14.04:LTS linux 0 3.11.0-12.19
Ubuntu:14.04:LTS linux-aws 0 4.4.0-1002.2
Ubuntu:14.04:LTS linux-azure 0 4.15.0-1023.24~14.04.1
Ubuntu:14.04:LTS linux-lts-xenial 0 4.4.0-13.29~14.04.1
Ubuntu:16.04:LTS linux 0 4.4.0-2.16
Ubuntu:16.04:LTS linux-aws 0 4.4.0-1001.10
Ubuntu:16.04:LTS linux-aws-hwe 0 4.15.0-1030.31~16.04.1
Ubuntu:16.04:LTS linux-azure 0 4.11.0-1009.9
Ubuntu:16.04:LTS linux-gcp 0 4.10.0-1004.4
Ubuntu:16.04:LTS linux-hwe 0 4.8.0-39.42~16.04.1
Ubuntu:16.04:LTS linux-hwe-edge 0 No fix
Ubuntu:16.04:LTS linux-kvm 0 4.4.0-1004.9
Ubuntu:16.04:LTS linux-oracle 0 4.15.0-1007.9~16.04.1
Ubuntu:18.04:LTS linux 0 4.13.0-16.19
Ubuntu:18.04:LTS linux-aws 0 4.15.0-1001.1
Ubuntu:18.04:LTS linux-aws-5.0 0 No fix
Ubuntu:18.04:LTS linux-aws-5.3 0 No fix
Ubuntu:18.04:LTS linux-azure 0 No fix
Ubuntu:18.04:LTS linux-azure-4.15 0 4.15.0-1082.92
Ubuntu:18.04:LTS linux-azure-5.3 0 No fix
Ubuntu:18.04:LTS linux-azure-edge 0 No fix
Ubuntu:18.04:LTS linux-gcp 0 No fix
Ubuntu:18.04:LTS linux-gcp-4.15 0 4.15.0-1071.81
Ubuntu:18.04:LTS linux-gcp-5.3 0 No fix
Ubuntu:18.04:LTS linux-gke-4.15 0 No fix
Ubuntu:18.04:LTS linux-gke-5.4 0 No fix
Ubuntu:18.04:LTS linux-gkeop-5.4 0 No fix
Ubuntu:18.04:LTS linux-hwe 0 No fix
Ubuntu:18.04:LTS linux-hwe-edge 0 No fix
Ubuntu:18.04:LTS linux-kvm 0 4.15.0-1002.2
Ubuntu:18.04:LTS linux-oem 0 No fix
Ubuntu:18.04:LTS linux-oracle 0 4.15.0-1007.9
Ubuntu:18.04:LTS linux-oracle-5.0 0 No fix
Ubuntu:18.04:LTS linux-oracle-5.3 0 No fix
Ubuntu:20.04:LTS linux 0 No fix
Ubuntu:20.04:LTS linux 0 5.4.0-202.222
Ubuntu:20.04:LTS linux-aws 0 No fix
Ubuntu:20.04:LTS linux-aws 0 5.4.0-1136.146
Ubuntu:20.04:LTS linux-aws-5.11 0 No fix
Ubuntu:20.04:LTS linux-aws-5.13 0 No fix
Ubuntu:20.04:LTS linux-aws-5.15 0 5.15.0-1063.69~20.04.1
Ubuntu:20.04:LTS linux-aws-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure 0 No fix
Ubuntu:20.04:LTS linux-azure 0 5.4.0-1142.149
Ubuntu:20.04:LTS linux-azure-5.11 0 No fix
Ubuntu:20.04:LTS linux-azure-5.13 0 No fix
Ubuntu:20.04:LTS linux-azure-5.15 0 No fix
Ubuntu:20.04:LTS linux-azure-5.15 0 5.15.0-1065.74~20.04.1
Ubuntu:20.04:LTS linux-azure-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure-fde 0 No fix
Ubuntu:20.04:LTS linux-azure-fde-5.15 0 5.15.0-1065.74~20.04.1.1
Ubuntu:20.04:LTS linux-bluefield 0 No fix
Ubuntu:20.04:LTS linux-bluefield 0 5.4.0-1096.103
Ubuntu:20.04:LTS linux-gcp 0 No fix
Ubuntu:20.04:LTS linux-gcp 0 5.4.0-1140.149
Ubuntu:20.04:LTS linux-gcp-5.11 0 No fix
Ubuntu:20.04:LTS linux-gcp-5.13 0 No fix
Ubuntu:20.04:LTS linux-gcp-5.15 0 5.15.0-1062.70~20.04.1
Ubuntu:20.04:LTS linux-gcp-5.8 0 No fix
Ubuntu:20.04:LTS linux-gke 0 No fix
Ubuntu:20.04:LTS linux-gke-5.15 0 No fix
Ubuntu:20.04:LTS linux-gkeop 0 No fix
Ubuntu:20.04:LTS linux-gkeop-5.15 0 5.15.0-1046.53~20.04.1
Ubuntu:20.04:LTS linux-hwe-5.11 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.13 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.15 0 5.15.0-113.123~20.04.1
Ubuntu:20.04:LTS linux-hwe-5.8 0 No fix
Ubuntu:20.04:LTS linux-ibm 0 No fix
Ubuntu:20.04:LTS linux-ibm 0 5.4.0-1083.88
Ubuntu:20.04:LTS linux-ibm-5.15 0 5.15.0-1057.60~20.04.1
Ubuntu:20.04:LTS linux-intel-5.13 0 No fix
Ubuntu:20.04:LTS linux-intel-iotg-5.15 0 5.15.0-1058.64~20.04.1
Ubuntu:20.04:LTS linux-iot 0 No fix
Ubuntu:20.04:LTS linux-iot 0 5.4.0-1045.46
Ubuntu:20.04:LTS linux-kvm 0 No fix
Ubuntu:20.04:LTS linux-kvm 0 5.4.0-1124.132
Ubuntu:20.04:LTS linux-lowlatency-hwe-5.15 0 5.15.0-110.120~20.04.1
Ubuntu:20.04:LTS linux-nvidia-tegra-5.15 0 5.15.0-1027.27~20.04.1
Ubuntu:20.04:LTS linux-oem-5.10 0 No fix
Ubuntu:20.04:LTS linux-oem-5.13 0 No fix
Ubuntu:20.04:LTS linux-oem-5.14 0 No fix
Ubuntu:20.04:LTS linux-oem-5.6 0 No fix
Ubuntu:20.04:LTS linux-oracle 0 No fix
Ubuntu:20.04:LTS linux-oracle 0 5.4.0-1135.144
Ubuntu:20.04:LTS linux-oracle-5.11 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.13 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.15 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.15 0 5.15.0-1061.67~20.04.1
Ubuntu:20.04:LTS linux-oracle-5.8 0 No fix
Ubuntu:20.04:LTS linux-raspi 0 No fix
Ubuntu:20.04:LTS linux-raspi 0 5.4.0-1120.132
Ubuntu:20.04:LTS linux-raspi2 0 No fix
Ubuntu:20.04:LTS linux-riscv 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.11 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.15 0 5.15.0-1059.63~20.04.1
Ubuntu:20.04:LTS linux-riscv-5.8 0 No fix
Ubuntu:20.04:LTS linux-xilinx-zynqmp 0 No fix
Ubuntu:20.04:LTS linux-xilinx-zynqmp 0 5.4.0-1055.59
Ubuntu:22.04:LTS linux 0 5.15.0-112.122
Ubuntu:22.04:LTS linux-allwinner-5.19 0 No fix
Ubuntu:22.04:LTS linux-aws 0 5.15.0-1063.69
Ubuntu:22.04:LTS linux-aws-5.19 0 No fix
Ubuntu:22.04:LTS linux-aws-6.2 0 No fix
Ubuntu:22.04:LTS linux-aws-6.5 0 No fix
Ubuntu:22.04:LTS linux-aws-6.8 0 6.8.0-1009.9~22.04.2
Ubuntu:22.04:LTS linux-azure 0 5.15.0-1066.75
Ubuntu:22.04:LTS linux-azure-5.19 0 No fix
Ubuntu:22.04:LTS linux-azure-6.2 0 No fix
Ubuntu:22.04:LTS linux-azure-6.5 0 6.5.0-1022.23~22.04.1
Ubuntu:22.04:LTS linux-azure-fde 0 5.15.0-1067.76.1
Ubuntu:22.04:LTS linux-azure-fde 0 5.15.0-1065.74.1
Ubuntu:22.04:LTS linux-azure-fde-5.19 0 No fix
Ubuntu:22.04:LTS linux-azure-fde-6.2 0 No fix
Ubuntu:22.04:LTS linux-azure-fde-6.8 0 No fix
Ubuntu:22.04:LTS linux-gcp 0 5.15.0-1062.70
Ubuntu:22.04:LTS linux-gcp-5.19 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.2 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.5 0 6.5.0-1022.24~22.04.1
Ubuntu:22.04:LTS linux-gcp-6.8 0 6.8.0-1010.11~22.04.1
Ubuntu:22.04:LTS linux-gke 0 5.15.0-1060.66
Ubuntu:22.04:LTS linux-gkeop 0 5.15.0-1046.53

Related vulnerabilities