Vulnerability · Published Jul 3, 2025 · Assigned by Linux

CVE-2025-38172erofs: avoid using multiple devices with different type

High 7.8

In plain English

A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 7% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.2%top 92.6% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: erofs: avoid using multiple devices with different type For multiple devices, both primary and extra devices should be the same type. `erofs_init_device` has already guaranteed that if the primary is a file-backed device, extra devices should also be regular files. However, if the primary is a block device while the extra device is a file-backed device, `erofs_init_device` will get an ENOTBLK, which is not treated as an error in `erofs_fc_get_tree`, and that leads to an UAF: erofs_fc_get_tree get_tree_bdev_flags(erofs_fc_fill_super) erofs_read_superblock erofs_init_device // sbi->dif0 is not inited yet, // return -ENOTBLK deactivate_locked_super free(sbi) if (err is -ENOTBLK) sbi->dif0.file = filp_open() // sbi UAF So if -ENOTBLK is hitted in `erofs_init_device`, it means the primary device must be a block device, and the extra device is not a block device. The error can be converted to -EINVAL.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:10kernel-abi-stablelists6.12.0-124.38.1.el10_1ALSA-2026:2721
AlmaLinux:10kernel-doc6.12.0-124.38.1.el10_1ALSA-2026:2721
Debian:13linux6.12.35-1DEBIAN-CVE-2025-38172
Debian:14linux6.12.35-1DEBIAN-CVE-2025-38172
Rocky Linux:10kernel0:6.12.0-124.38.1.el10_1RLSA-2026:2721
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2025-38172
Ubuntu:24.04:LTSlinux-aws-6.146.14.0-1013.13~24.04.1UBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2025-38172
Ubuntu:24.04:LTSlinux-azure-6.11no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2025-38172
Ubuntu:25.10linux-azure-fdeno fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2025-38172
Ubuntu:24.04:LTSlinux-azure-nvidia-6.146.14.0-1007.7UBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2025-38172
Ubuntu:24.04:LTSlinux-gcp-6.11no fix listedUBUNTU-CVE-2025-38172
Ubuntu:24.04:LTSlinux-gcp-6.146.14.0-1016.17~24.04.1UBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2025-38172
Ubuntu:24.04:LTSlinux-hwe-6.11no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2025-38172
Ubuntu:24.04:LTSlinux-lowlatency-hwe-6.11no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2025-38172
Ubuntu:24.04:LTSlinux-oem-6.146.14.0-1012.12UBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2025-38172
Ubuntu:24.04:LTSlinux-oracle-6.146.14.0-1013.13~24.04.1UBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2025-38172
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-38172
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-38172
Ubuntu:24.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2025-38172
Ubuntu:24.04:LTSlinux-riscv-6.146.14.0-32.32.1~24.04.1UBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2025-38172
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2025-38172

Affected products (as reported)

VendorProductVersions
Linux Linux fb176750266a3d7f42ebdcf28e8ba40350b27847 – before 65115472f741ca000d7ea4a5922214f93cd1516efb176750266a3d7f42ebdcf28e8ba40350b27847 – before cd04beb9ce2773a16057248bb4fa424068ae3807fb176750266a3d7f42ebdcf28e8ba40350b27847 – before 9748f2f54f66743ac77275c34886a9f890e18409
Linux Linux 6.12

References