CVE-2026-143028: dm: fix use-after-free when dm_get_device() widens the open mode

Published Dec 3, 2026
·
Updated

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

dm: fix use-after-free when dmgetdevice() widens the open mode

There's an UAF bug in dmgetdevice(): when a table construction calls dmgetdevice() on the same device twice with widen access mode (e.g., read-only first then read-write), the second dmgetdevice() calls upgrademode(), which reopens the device in upgraded mode, making previously returned dmdev a stale pointer.

Fixing approaches: - Add per-mode views (dmdevref) from a per-device dmdevinternal to multiple tabledevices. - Keep reusing the dmdevref when the requested mode is included, i.e., a read-only reference can reuse the read-write opened device within a table. - Maintain a canonical blockdevice pointer in dmdevinternal for handling the DMTABLEDEPS ioctl.

Also tweak the way of mode sharing check in findref() to "(x & mask) == mask". The result stays the same to the previous upgrademode() guard "(x | mask) == x".

Pros: keep the relationship between dmdevinternal and tabledevice: one dmdevinternal per device, regardless the mode, so the output of DMMTABLEDEPS ioctl unchanged.

Cons: extra dmdevref allocation.

Note that now the tabledevice's count not necessarily mean the number tables referecing this <dev, mode> pair, since we're allowing multiple references within a table.

Affected Software

1 affected component
Linux Linux kernel

Event History

Dec 3, 2026
CVE Published
via MITRE·09:18 AM
Data Sourced
via MITRE·09:18 AM
Description

Frequently Asked Questions

1

Which systems are exposed to this issue?

Systems using the Linux kernel device-mapper are exposed when a device-mapper table construction obtains the same underlying device more than once and later requests a wider access mode, such as requesting read-only access first and read-write access afterward.

2

What condition triggers the use-after-free?

The trigger is a second dm_get_device() call for the same device during table construction that widens the open mode. Reopening the device with the wider mode can make a dm_dev pointer returned by the earlier call stale.

3

How can I determine whether a table construction is affected?

Review device-mapper table construction paths for repeated dm_get_device() calls on the same device with differing access modes. A sequence that first requests read-only access and then read-write access matches the described vulnerable pattern.

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