In the Linux kernel, the following vulnerability has been resolved:
dm ioctl: fix misbehavior if list_versions races with module loading
__list_versions will first estimate the required space using the "dm_target_iterate(list_version_get_needed, &needed)" call and then will fill the space using the "dm_target_iterate(list_version_get_info, &iter_info)" call. Each of these calls locks the targets using the "down_read(&_lock)" and "up_read(&_lock)" calls, however between the first and second "dm_target_iterate" there is no lock held and the target modules can be loaded at this point, so the second "dm_target_iterate" call may need more space than what was the first "dm_target_iterate" returned.
The code tries to handle this overflow (see the beginning of list_version_get_info), however this handling is incorrect.
The code sets "param->data_size = param->data_start + needed" and "iter_info.end = (char *)vers+len" - "needed" is the size returned by the first dm_target_iterate call; "len" is the size of the buffer allocated by userspace.
"len" may be greater than "needed"; in this case, the code will write up to "len" bytes into the buffer, however param->data_size is set to "needed", so it may write data past the param->data_size value. The ioctl interface copies only up to param->data_size into userspace, thus part of the result will be truncated.
Fix this bug by setting "iter_info.end = (char *)vers + needed;" - this guarantees that the second "dm_target_iterate" call will write only up to the "needed" buffer and it will exit with "DM_BUFFER_FULL_FLAG" if it overflows the "needed" space - in this case, userspace will allocate a larger buffer and retry.
Note that there is also a bug in list_version_get_needed - we need to add "strlen(tt->name) + 1" to the needed size, not "strlen(tt->name)".
CVSS Details
- CVSS 3.1 Base Score: 4.7
- CVSS 3.1 Vector: (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Amazon Linux Ami 2 | — | Upgrade kernel-debuginfo-common-x86_64Upgrade bpftool-debuginfoUpgrade perf-debuginfoUpgrade kernel-livepatch-4.14.301-224.520Upgrade python-perfUpgrade kernel-toolsUpgrade kernel-livepatch-5.15.86-53.137Upgrade kernel-debuginfo-common-aarch64Upgrade kernel-develUpgrade kernel-tools-debuginfoUpgrade kernel-headersUpgrade kernel-tools-develUpgrade kernel-debuginfoUpgrade kernelUpgrade bpftoolUpgrade perfUpgrade kernel-livepatch-5.10.157-139.675Upgrade python-perf-debuginfo | Jun 23, 2025 | May 1, 2025 |
| Debian | — | Upgrade linux | May 5, 2025 | May 1, 2025 |
| Huawei Euleros 2_0_sp10 | — | Upgrade kernel-tools-libsUpgrade kernel-toolsUpgrade kernel-abi-stablelistsUpgrade kernelUpgrade python3-perf | Sep 15, 2025 | Sep 9, 2025 |
| Huawei Euleros 2_0_sp13 | — | Upgrade python3-perfUpgrade kernelUpgrade kernel-abi-stablelistsUpgrade kernel-toolsUpgrade bpftoolUpgrade kernel-tools-libs | Feb 3, 2026 | Jan 30, 2026 |
| Redhat_linux | — | No solution exists | Jul 9, 2025 | May 1, 2025 |
| Ubuntu | — | Upgrade linux-intel-iotgUpgrade linux-azure-4.15Upgrade linux-kvmUpgrade linux-hwe-5.4Upgrade linux-hweUpgrade linux-azure-5.4Upgrade linux-gcp-fipsUpgrade linux-nvidiaUpgrade linux-azure-fipsUpgrade linux-xilinx-zynqmpUpgrade linux-ibmUpgrade linux-oracleUpgrade linux-azure-fde-5.15Upgrade linux-gkeopUpgrade linux-gcp-5.4Upgrade linux-azureUpgrade linux-azure-5.15Upgrade linux-hwe-5.15Upgrade linux-gcp-4.15Upgrade linux-intel-iotg-5.15Upgrade linux-iotUpgrade linux-realtimeUpgrade linux-aws-fipsUpgrade linux-oracle-5.15Upgrade linux-gcp-5.15Upgrade linux-gcpUpgrade linux-lowlatencyUpgrade linux-gkeUpgrade linux-oracle-5.4Upgrade linux-bluefieldUpgrade linux-aws-5.4Upgrade linux-nvidia-tegra-5.15Upgrade linux-raspiUpgrade linux-riscv-5.15Upgrade linux-awsUpgrade linuxUpgrade linux-aws-hweUpgrade linux-intel-iot-realtimeUpgrade linux-ibm-5.4Upgrade linux-aws-5.15Upgrade linux-fipsUpgrade linux-raspi-5.4Upgrade linux-lowlatency-hwe-5.15 | May 6, 2025 | May 1, 2025 |
| Vmware Photon_os | — | Use 'tdnf update' to upgrade all packages to the latest version. | May 27, 2026 | May 1, 2025 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub