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-tools-develUpgrade kernelUpgrade kernel-develUpgrade python-perf-debuginfoUpgrade kernel-headersUpgrade kernel-tools-debuginfoUpgrade kernel-livepatch-5.10.157-139.675Upgrade perfUpgrade bpftoolUpgrade kernel-debuginfoUpgrade python-perfUpgrade kernel-toolsUpgrade kernel-debuginfo-common-aarch64Upgrade kernel-livepatch-5.15.86-53.137Upgrade kernel-debuginfo-common-x86_64Upgrade bpftool-debuginfoUpgrade perf-debuginfoUpgrade kernel-livepatch-4.14.301-224.520 | Jun 23, 2025 | May 1, 2025 |
| Debian | — | Upgrade linux | May 5, 2025 | May 1, 2025 |
| Huawei Euleros 2_0_sp10 | — | Upgrade python3-perfUpgrade kernelUpgrade kernel-abi-stablelistsUpgrade kernel-tools-libsUpgrade kernel-tools | 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-hweUpgrade linux-gcp-5.4Upgrade linux-nvidiaUpgrade linux-ibmUpgrade linux-azure-fde-5.15Upgrade linux-oracleUpgrade linux-azure-5.4Upgrade linux-gcp-4.15Upgrade linux-oracle-5.15Upgrade linux-hwe-5.15Upgrade linux-azure-fipsUpgrade linux-azure-5.15Upgrade linux-gcp-5.15Upgrade linux-hwe-5.4Upgrade linux-intel-iotgUpgrade linux-gkeopUpgrade linux-azure-4.15Upgrade linux-kvmUpgrade linux-xilinx-zynqmpUpgrade linux-gcp-fipsUpgrade linux-intel-iotg-5.15Upgrade linux-aws-fipsUpgrade linux-iotUpgrade linux-realtimeUpgrade linux-azureUpgrade linux-fipsUpgrade linux-raspiUpgrade linux-nvidia-tegra-5.15Upgrade linux-bluefieldUpgrade linux-riscv-5.15Upgrade linux-gcpUpgrade linux-lowlatency-hwe-5.15Upgrade linux-aws-5.15Upgrade linux-intel-iot-realtimeUpgrade linux-gkeUpgrade linux-lowlatencyUpgrade linux-aws-5.4Upgrade linux-ibm-5.4Upgrade linuxUpgrade linux-aws-hweUpgrade linux-raspi-5.4Upgrade linux-awsUpgrade linux-oracle-5.4 | 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