CVE-2025-38140

Description

In the Linux kernel, the following vulnerability has been resolved:dm: limit swapping tables for devices with zone write plugsdm_revalidate_zones() only allowed new or previously unzoned devices tocall blk_revalidate_disk_zones(). If the device was already zoned,disk->nr_zones would always equal md->nr_zones, so dm_revalidate_zones()returned without doing any work. This would make the zoned settings forthe device not match the new table. If the device had zone write plugresources, it could run into errors like bdev_zone_is_seq() readinginvalid memory because disk->conv_zones_bitmap was the wrong size.If the device doesnt have any zone write plug resources, callingblk_revalidate_disk_zones() will always correctly update device. Ifblk_revalidate_disk_zones() fails, it can still overwrite or clear thecurrent disk->nr_zones value. In this case, DM must restore the previousvalue of disk->nr_zones, so that the zoned settings will continue tomatch the previous value that it fell back to.If the device already has zone write plug resources,blk_revalidate_disk_zones() will not correctly update them, if it iscalled for arbitrary zoned device changes. Since there is not much needfor this ability, the easiest solution is to disallow any table reloadsthat change the zoned settings, for devices that already have zone plugresources. Specifically, if a device already has zone plug resourcesallocated, it can only switch to another zoned table that also emulateszone append. Also, it cannot change the device size or the zone size. Adevice can switch to an error target.

Risk Information

Base Score
5.5
MODERATE
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS Score
Exploitation Probability
0.025

Associated Vulnerability

No records found

Patch Details

No records found

References

https://nvd.nist.gov/vuln/detail/CVE-2023-1234
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-1234