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-aarch64Upgrade python-perfUpgrade kernel-toolsUpgrade kernel-livepatch-4.14.301-224.520Upgrade kernel-livepatch-5.15.86-53.137Upgrade perf-debuginfoUpgrade bpftool-debuginfoUpgrade kernel-debuginfo-common-x86_64Upgrade kernel-headersUpgrade kernel-develUpgrade kernel-debuginfoUpgrade python-perf-debuginfoUpgrade kernel-tools-develUpgrade kernelUpgrade kernel-livepatch-5.10.157-139.675Upgrade 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 kernelUpgrade python3-perfUpgrade kernel-abi-stablelistsUpgrade kernel-tools-libsUpgrade kernel-tools | Sep 15, 2025 | Sep 9, 2025 |
| Huawei Euleros 2_0_sp13 | — | Upgrade kernel-toolsUpgrade kernel-tools-libsUpgrade bpftoolUpgrade kernelUpgrade python3-perfUpgrade kernel-abi-stablelists | Feb 3, 2026 | Jan 30, 2026 |
| Redhat_linux | — | No solution exists | Jul 9, 2025 | May 1, 2025 |
| Ubuntu | — | Upgrade linux-bluefieldUpgrade linux-raspiUpgrade linux-nvidia-tegra-5.15Upgrade linux-gcpUpgrade linux-aws-5.4Upgrade linux-oracle-5.4Upgrade linux-ibm-5.4Upgrade linuxUpgrade linux-gkeUpgrade linux-lowlatency-hwe-5.15Upgrade linux-fipsUpgrade linux-lowlatencyUpgrade linux-aws-hweUpgrade linux-riscv-5.15Upgrade linux-raspi-5.4Upgrade linux-aws-5.15Upgrade linux-awsUpgrade linux-intel-iot-realtimeUpgrade linux-oracleUpgrade linux-gcp-fipsUpgrade linux-azure-fde-5.15Upgrade linux-intel-iotg-5.15Upgrade linux-xilinx-zynqmpUpgrade linux-gkeopUpgrade linux-nvidiaUpgrade linux-azure-fipsUpgrade linux-ibmUpgrade linux-azure-5.4Upgrade linux-gcp-5.4Upgrade linux-kvmUpgrade linux-hweUpgrade linux-azure-4.15Upgrade linux-intel-iotgUpgrade linux-hwe-5.4Upgrade linux-iotUpgrade linux-aws-fipsUpgrade linux-azure-5.15Upgrade linux-realtimeUpgrade linux-gcp-5.15Upgrade linux-hwe-5.15Upgrade linux-oracle-5.15Upgrade linux-azureUpgrade linux-gcp-4.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