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