# CVE-2025-38140: dm: limit swapping tables for devices with zone write plugs

- Priority: **Routine**
- Reason: Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-07-03 · Modified: 2026-11-05
- Aliases: UBUNTU-CVE-2025-38140, DEBIAN-CVE-2025-38140, CGA-23h6-w3wc-7q6h, CGA-24vp-2943-m36g, CGA-2jc6-3m99-3cw8, CGA-2mfc-wh58-7vfq, CGA-39wq-7666-m26p, CGA-3cj6-q8r2-wr8c, CGA-43vp-mw9p-36v2, CGA-48fx-4c9q-7h65, CGA-4j7r-chqx-m8pf, CGA-4mp4-8jm3-9m25, CGA-4vfh-42c8-68r9, CGA-4x5x-rwmg-8f54, CGA-4xhq-xqr9-3qf3, CGA-5cjf-h9vv-f66g, CGA-5fp3-gxr6-m5hv, CGA-5h6w-596x-fjjp, CGA-5hcq-8jr9-pcvj, CGA-5p3q-h3vh-wmf9, CGA-5v6j-rv9c-jhpc, CGA-6j4j-c3w7-98mh, CGA-6jw5-c8vh-7w7p, CGA-6q6x-wjf2-pxw4, CGA-6qvf-qhcg-4w3g, CGA-6v2p-3fqg-3r62, CGA-6v38-7hg5-rx97, CGA-734j-47xw-99xm, CGA-73qv-jvrm-2p22, CGA-74gm-85cp-g624, CGA-75q4-gjh6-3g8p, CGA-78g8-c4f3-g7w9, CGA-7g63-cwhw-px4h, CGA-7ww4-hcxv-gw5c, CGA-7x9c-f8pq-gqq2, CGA-7xc8-vm7j-f47x, CGA-832g-fvrf-mrp6, CGA-86x5-jwg7-rvgf, CGA-87p3-3c44-v67q, CGA-8grh-2c9f-6q9m, CGA-8jgc-5m9c-rqh5, CGA-8qrg-wvrv-2256, CGA-8x7w-7mr5-qm9x, CGA-97gv-7p4w-3xfj, CGA-9h86-p56c-h273, CGA-9rj8-r2x7-9r6r, CGA-9v9x-wp4g-wr5x, CGA-c2pf-m3g3-9q96, CGA-c349-x993-33w5, CGA-c5h3-fcr7-pmm9, CGA-c5rw-9rqp-hf49, CGA-c6jj-5pqf-h5ph, CGA-chx8-m7vj-w5qf, CGA-cp38-2mjp-vg37, CGA-cr78-xrh2-882p, CGA-cvc8-gmqq-x8rh, CGA-cvh3-v5rc-rr53, CGA-cx83-r6qr-482m, CGA-cxhg-vc6g-cv6r, CGA-f5v5-mhjv-8q2v, CGA-f7gm-2rch-mc89, CGA-f9fx-2hp9-f52p, CGA-fh57-m255-wwj3, CGA-fhfj-j558-wg6f, CGA-fm32-25v5-j78m, CGA-g2fh-gq8c-mh4m, CGA-g2jx-67r6-g84w, CGA-g87x-276h-q388, CGA-hg4p-3978-j9mr, CGA-hm85-cjwm-62cv, CGA-hp6g-fgfh-9hmp, CGA-hq47-c5xc-2f3v, CGA-hv5f-fhvp-f8f8, CGA-jcf6-6cfv-q6fw, CGA-jx7v-qgfh-5wh4, CGA-m2mx-gmcx-gmr6, CGA-m3w5-qhpg-m33x, CGA-m6cf-44h4-f52w, CGA-m6mf-gq96-32mc, CGA-m72m-63xh-v9pj, CGA-mf89-xj2m-gfgr, CGA-mf9r-9xrc-c6mv, CGA-mg4g-86fh-42mj, CGA-mjhw-wcvq-94cg, CGA-mmx6-6wfm-jxfv, CGA-mpch-3gqv-255w, CGA-mvc5-f2gf-p9gp, CGA-p2cx-6mh2-jmj8, CGA-p2wp-r936-wfrp, CGA-ph28-8v3w-c6xw, CGA-pq78-f8rv-3wph, CGA-q258-w87x-454h, CGA-q2wx-2pjh-hpg9, CGA-q3jh-w3x2-x676, CGA-qcrf-426h-5rcg, CGA-qqg8-fxvm-34gc, CGA-qv2h-fmfx-4h9q, CGA-qvvf-9ggh-wcjq, CGA-qw77-9fv5-fqwq, CGA-r6qr-3c8r-p5v9, CGA-rgmc-rw8w-44hc, CGA-rgrc-gq98-4576, CGA-rmv3-xwr3-8rp6, CGA-rx63-49qg-94jj, CGA-v27p-c9fc-wwxv, CGA-vf7f-hc3v-78h9, CGA-vjvg-v8fg-rhh6, CGA-w297-q8f7-46xm, CGA-w6vg-87gq-3qr3, CGA-w9vm-56hg-3rvv, CGA-wgp8-r9f4-jr2j, CGA-whcj-9gx8-8329, CGA-wpgf-wv44-wmr8, CGA-wrgw-rwq3-fc7m, CGA-wrhq-77cw-83cp, CGA-xq38-8f99-rx39, CGA-xq3w-vcwq-548p
- Record: https://cvemate.com/vulnerability/CVE-2025-38140 · JSON: https://cvemate.com/vulnerability/CVE-2025-38140/json

## Description

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

dm: limit swapping tables for devices with zone write plugs

dm_revalidate_zones() only allowed new or previously unzoned devices to
call 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 for
the device not match the new table. If the device had zone write plug
resources, it could run into errors like bdev_zone_is_seq() reading
invalid memory because disk->conv_zones_bitmap was the wrong size.

If the device doesn't have any zone write plug resources, calling
blk_revalidate_disk_zones() will always correctly update device.  If
blk_revalidate_disk_zones() fails, it can still overwrite or clear the
current disk->nr_zones value. In this case, DM must restore the previous
value of disk->nr_zones, so that the zoned settings will continue to
match 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 is
called for arbitrary zoned device changes.  Since there is not much need
for this ability, the easiest solution is to disallow any table reloads
that change the zoned settings, for devices that already have zone plug
resources.  Specifically, if a device already has zone plug resources
allocated, it can only switch to another zoned table that also emulates
zone append.  Also, it cannot change the device size or the zone size. A
device can switch to an error target.
```

## Signals

- CVSS: 5.5 medium (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.238%, percentile 15.924%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 145)

- chainguard linux-aws-6.12 (Chainguard): \< 6.12.69-r0 \| \< 6.12.72-r1 \| \< 6.12.78-r0 \| \< 6.12.65-r1 \| \< 6.12.70-r0 \| \< 6.12.62-r1 \| \< 6.12.62-r0 \| \< 6.12.60-r4 \| \< 6.12.76-r0 \| \< 6.12.71-r0 \| \< 6.12.74-r1 \| \< 6.12.67-r0 \| \< 6.12.65-r0 \| \< 6.12.80-r0 \| \< 6.12.77-r0 \| \< 6.12.68-r1 \| \< 6.12.63-r0 \| \< 6.12.77-r1 \| \< 6.12.72-r0 \| \< 6.12.62-r2 \| \< 6.12.77-r2 \| \< 6.12.65-r2 \| \< 6.12.74-r0 \| \< 6.12.68-r0 \| \< 6.12.66-r0
- chainguard linux-azure-6.12 (Chainguard): \< 6.12.71-r0 \| \< 6.12.67-r0 \| \< 6.12.65-r2 \| \< 6.12.74-r1 \| \< 6.12.74-r0 \| \< 6.12.77-r1 \| \< 6.12.76-r0 \| \< 6.12.70-r0 \| \< 6.12.77-r0 \| \< 6.12.60-r4 \| \< 6.12.62-r0 \| \< 6.12.69-r0 \| \< 6.12.63-r0 \| \< 6.12.72-r0 \| \< 6.12.78-r0 \| \< 6.12.66-r0 \| \< 6.12.65-r4 \| \< 6.12.68-r0 \| \< 6.12.77-r2 \| \< 6.12.80-r0 \| \< 6.12.65-r3 \| \< 6.12.65-r1 \| \< 6.12.60-r3 \| \< 6.12.62-r2 \| \< 6.12.62-r1
- chainguard linux-gcp-6.12 (Chainguard): \< 6.12.77-r2 \| \< 6.12.63-r0 \| \< 6.12.60-r4 \| \< 6.12.70-r0 \| \< 6.12.66-r0 \| \< 6.12.68-r1 \| \< 6.12.65-r0 \| \< 6.12.62-r2 \| \< 6.12.71-r0 \| \< 6.12.62-r0 \| \< 6.12.65-r1 \| \< 6.12.72-r0 \| \< 6.12.76-r0 \| \< 6.12.74-r0 \| \< 6.12.69-r0 \| \< 6.12.68-r0 \| \< 6.12.80-r0 \| \< 6.12.78-r0 \| \< 6.12.77-r1 \| \< 6.12.60-r3 \| \< 6.12.65-r2 \| \< 6.12.62-r1 \| \< 6.12.67-r0 \| \< 6.12.77-r0 \| \< 6.12.74-r1
- chainguard linux-qemu-6.12 (Chainguard): \< 6.12.74-r1 \| \< 6.12.69-r0 \| \< 6.12.65-r2 \| \< 6.12.65-r1 \| \< 6.12.72-r0 \| \< 6.12.77-r1 \| \< 6.12.76-r0 \| \< 6.12.77-r0 \| \< 6.12.71-r0 \| \< 6.12.68-r0 \| \< 6.12.77-r2 \| \< 6.12.70-r0 \| \< 6.12.74-r0 \| \< 6.12.66-r0 \| \< 6.12.67-r0 \| \< 6.12.80-r0 \| \< 6.12.78-r0
- chainguard linux-vmware-6.12 (Chainguard): \< 6.12.77-r0 \| \< 6.12.70-r0 \| \< 6.12.76-r0 \| \< 6.12.71-r0 \| \< 6.12.66-r0 \| \< 6.12.67-r0 \| \< 6.12.69-r0 \| \< 6.12.77-r2 \| \< 6.12.68-r1 \| \< 6.12.68-r0 \| \< 6.12.77-r1 \| \< 6.12.65-r1 \| \< 6.12.72-r0 \| \< 6.12.74-r1 \| \< 6.12.80-r0 \| \< 6.12.74-r0 \| \< 6.12.78-r0 \| \< 6.12.65-r2
- debian linux (Debian): All versions (No fix recorded) \| \< 6.12.115-2 \| \< 6.16.3-1
- debian linux-6.12 (Debian): \< 6.12.115-2~deb12u1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-151.151
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1070.76
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.14 (Ubuntu): \< 6.14.0-1013.13~24.04.1
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 23)

- <https://git.kernel.org/stable/c/ac8acb0bfd98a1c65f3ca9a3e217a766124eebd8>
- <https://git.kernel.org/stable/c/121218bef4c1df165181f5cd8fc3a2246bac817e>
- <https://ubuntu.com/security/CVE-2025-38140>
- <https://www.cve.org/CVERecord?id=CVE-2025-38140>
- <https://git.kernel.org/linus/121218bef4c1df165181f5cd8fc3a2246bac817e>
- <https://ubuntu.com/security/notices/USN-7769-1>
- <https://ubuntu.com/security/notices/USN-7770-1>
- <https://ubuntu.com/security/notices/USN-7771-1>
- <https://ubuntu.com/security/notices/USN-7769-2>
- <https://ubuntu.com/security/notices/USN-7769-3>
- <https://ubuntu.com/security/notices/USN-7789-1>
- <https://ubuntu.com/security/notices/USN-7789-2>
- <https://security-tracker.debian.org/tracker/CVE-2025-38140>
- <https://git.kernel.org/stable/c/13c0425c99c67c2296f1eec61254a4f91484eac3>
- <https://ubuntu.com/security/notices/USN-9173-1>
- <https://ubuntu.com/security/notices/USN-9175-1>
- <https://ubuntu.com/security/notices/USN-9174-1>
- <https://ubuntu.com/security/notices/USN-9183-1>
- <https://ubuntu.com/security/notices/USN-9173-2>
- <https://ubuntu.com/security/notices/USN-9192-1>

---

Data as of 2026-12-05T03:09:25.075Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
