CVE-2026-46294 Overview
CVE-2026-46294 is a buffer overflow vulnerability in the Linux kernel's device mapper (dm) subsystem. The flaw resides in the retrieve_status function within dm-ioctl, where pointer alignment arithmetic can cause an out-of-bounds write. When the outptr variable is aligned to the next 8-byte boundary, the operation does not check for overflow past the buffer end. A subsequent iteration computes remaining = len - (outptr - outbuf), which wraps around to a large value and triggers writes past the allocated buffer.
Critical Impact
The vulnerability requires root privileges to issue device mapper ioctls, and common userspace libraries align buffers to 8 bytes, which prevents accidental triggering of the bug.
Affected Products
- Linux kernel (device mapper subsystem)
- Distributions shipping affected dm-ioctl implementations prior to the upstream fix
- Systems using LVM2 or other device mapper consumers via raw ioctl calls
Discovery Timeline
- 2026-06-08 - CVE-2026-46294 published to NVD
- 2026-06-08 - Last updated in NVD database
Technical Details for CVE-2026-46294
Vulnerability Analysis
The vulnerability is a heap buffer overflow [CWE-122] in the Linux kernel device mapper ioctl handler. The retrieve_status function correctly validates that an output string fits within the output buffer before writing. After the write, the code aligns outptr to the next 8-byte boundary using outptr = align_ptr(outptr). This alignment step performs no bounds check.
If the prior write filled the buffer to its boundary, alignment can push outptr past outbuf + len. On the next loop iteration, the code computes remaining = len - (outptr - outbuf). Because outptr now exceeds the buffer end, the subtraction underflows in unsigned arithmetic. The remaining variable becomes an extremely large value, and subsequent writes proceed past the end of the allocated buffer.
Exploitation is limited by two practical constraints. First, device mapper ioctls require CAP_SYS_ADMIN, restricting the attack surface to root callers. Second, common libraries such as libdevmapper and devicemapper-rs pass 8-byte-aligned buffer sizes, which prevents the alignment step from overshooting.
Root Cause
The root cause is missing bounds validation after pointer alignment in retrieve_status. The align_ptr macro advances the pointer without verifying that the new value remains within the buffer. Combined with unsigned arithmetic in the remaining calculation, this produces an integer wraparound that bypasses the loop's implicit length check.
Attack Vector
A local attacker with root privileges and the ability to issue raw device mapper ioctls with a non-8-byte-aligned buffer size can trigger the overflow. The vulnerability is not reachable through standard userspace tooling that aligns buffers correctly. Triggering requires a custom client that bypasses the alignment conventions used by libdevmapper.
The vulnerability mechanism is documented in the upstream commits referenced under the External References section. See the Kernel Commit 2fa49cc884 and Kernel Commit f0b0b09d98 for the fix implementation details.
Detection Methods for CVE-2026-46294
Indicators of Compromise
- Unexpected kernel oops or panic messages referencing dm_ioctl, retrieve_status, or align_ptr in dmesg output
- KASAN reports indicating slab-out-of-bounds writes originating from drivers/md/dm-ioctl.c
- Unusual ioctl syscalls targeting /dev/mapper/control from non-standard binaries
Detection Strategies
- Enable Kernel Address Sanitizer (KASAN) on test systems to detect out-of-bounds writes in dm-ioctl code paths
- Audit ioctl syscalls against /dev/mapper/control using auditd rules and correlate with the issuing process and buffer size arguments
- Inspect kernel ring buffer logs for memory corruption signatures following device mapper operations
Monitoring Recommendations
- Log invocations of device mapper ioctls by non-standard or custom binaries, since libdevmapper and devicemapper-rs users do not trigger the bug
- Monitor processes holding CAP_SYS_ADMIN for anomalous syscall patterns against /dev/mapper/control
- Track kernel version inventory across the fleet to identify hosts running pre-patch kernels
How to Mitigate CVE-2026-46294
Immediate Actions Required
- Apply the upstream stable kernel updates that include the retrieve_status fix as soon as your distribution publishes them
- Restrict CAP_SYS_ADMIN to required service accounts and audit which processes can issue device mapper ioctls
- Inventory systems running custom userspace tooling that interacts with /dev/mapper/control outside of libdevmapper
Patch Information
The fix has been merged into the stable Linux kernel tree across multiple maintained branches. Relevant commits include Kernel Commit 2fa49cc884, Kernel Commit 448ee8fb79, Kernel Commit 526ff9126a, Kernel Commit 5af6a879e9, Kernel Commit 8daa6c708e, Kernel Commit c8c5311237, Kernel Commit d271631023, and Kernel Commit f0b0b09d98. Distribution vendors will integrate these commits into their respective kernel updates.
Workarounds
- Ensure all callers of device mapper ioctls pass buffer sizes that are multiples of 8 bytes, matching the behavior of libdevmapper and devicemapper-rs
- Limit access to /dev/mapper/control to trusted administrative tooling and remove ad hoc custom clients
- Maintain least-privilege policies to prevent untrusted code from acquiring CAP_SYS_ADMIN
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


