CVE-2025-38141: dm: fix dm_blk_report_zones

Published Jul 3, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

dm: fix dmblkreportzones

If dmgetlivetable() returned NULL, dmputlivetable() was never called. Also, it is possible that md->zonerevalidatemap will change while calling this function. Only read it once, so that we are always using the same value. Otherwise we might miss a call to dmputlivetable().

Finally, while md->zonerevalidatemap is set and a process is calling blkrevalidatediskzones() to set up the zone append emulation resources, it is possible that another process, perhaps triggered by blkdevreportzonesioctl(), will call dmblkreportzones(). If blkrevalidatediskzones() fails, these resources can be freed while the other process is still using them, causing a use-after-free error.

blkrevalidatediskzones() will only ever be called when initially setting up the zone append emulation resources, such as when setting up a zoned dm-crypt table for the first time. Further table swaps will not set md->zonerevalidatemap or call blkrevalidatediskzones(). However it must be called using the new table (referenced by md->zonerevalidatemap) and the new queue limits while the DM device is suspended. dmblkreportzones() needs some way to distinguish between a call from blkrevalidatediskzones(), which must be allowed to use md->zonerevalidatemap to access this not yet activated table, and all other calls to dmblkreportzones(), which should not be allowed while the device is suspended and cannot use md->zonerevalidatemap, since the zone resources might be freed by the process currently calling blkrevalidatediskzones().

Solve this by tracking the process that sets md->zonerevalidatemap in dmrevalidatezones() and only allowing that process to make use of it in dmblkreportzones().

Other sources

In the Linux kernel, the following vulnerability has been resolved:

dm: fix dmblkreportzones

If dmgetlivetable() returned NULL, dmputlivetable() was never called. Also, it is possible that md-zonerevalidatemap will change while calling this function. Only read it once, so that we are always using the same value. Otherwise we might miss a call to dmputlivetable().

Finally, while md-zonerevalidatemap is set and a process is calling blkrevalidatediskzones() to set up the zone append emulation resources, it is possible that another process, perhaps triggered by blkdevreportzonesioctl(), will call dmblkreportzones(). If blkrevalidatediskzones() fails, these resources can be freed while the other process is still using them, causing a use-after-free error.

blkrevalidatediskzones() will only ever be called when initially setting up the zone append emulation resources, such as when setting up a zoned dm-crypt table for the first time. Further table swaps will not set md-zonerevalidatemap or call blkrevalidatediskzones(). However it must be called using the new table (referenced by md-zonerevalidatemap) and the new queue limits while the DM device is suspended. dmblkreportzones() needs some way to distinguish between a call from blkrevalidatediskzones(), which must be allowed to use md-zonerevalidatemap to access this not yet activated table, and all other calls to dmblkreportzones(), which should not be allowed while the device is suspended and cannot use md-zonerevalidatemap, since the zone resources might be freed by the process currently calling blkrevalidatediskzones().

Solve this by tracking the process that sets md-zonerevalidatemap in dmrevalidatezones() and only allowing that process to make use of it in dmblkreportzones().

IBM

Affected Software

7 affected components
Linux Linux kernel
Linux Linux kernel>=6.10<6.12.34
Linux Linux kernel>=6.13<6.15.3
IBM Verify Identity Access<=11.0 - 11.0.2
IBM Security Verify Access<=10.0 - 10.0.9.1
IBM Verify Identity Access Container<=11.0 - 11.0.2
IBM Security Verify Access Container<=10.0 - 10.0.9.1

Event History

Jul 3, 2025
CVE Published
via MITRE·08:35 AM
Data Sourced
via MITRE·08:35 AM
Description
Data Sourced
via Red Hat·09:02 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·09:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 8, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-38141?

CVE-2025-38141 has been classified as a high severity vulnerability in the Linux kernel.

2

How do I fix CVE-2025-38141?

To mitigate CVE-2025-38141, ensure you update to the latest stable version of the Linux kernel where the vulnerability has been addressed.

3

What impact does CVE-2025-38141 have on affected systems?

The impact of CVE-2025-38141 can result in potential data corruption or instability in systems using the affected Linux kernel versions.

4

Which versions of the Linux kernel are affected by CVE-2025-38141?

CVE-2025-38141 affects multiple versions of the Linux kernel prior to the fix being applied in the stable releases.

5

Is there a workaround for CVE-2025-38141?

While waiting for a patch, consider minimizing the use of affected features or configurations that trigger the vulnerability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203