CVE-2026-53059: Linux Kernel Device-Mapper Log Integer Overflow Vulnerability
A flaw in the Linux kernel's device-mapper logging subsystem allows a local attacker with sufficient privileges to trigger a buffer overflow in kernel memory. When setting up mirrored storage volumes with very large capacity targets, an integer truncation causes the logging layer to miscalculate how much memory it needs. Subsequent operations then write data outside the allocated buffer, crashing the system or potentially allowing code execution. The vulnerability requires local access and elevated privileges to trigger.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-190, CWE-787
- Affected products
- 6 configuration(s)
- Published / Modified
- 2026-06-24 / 2026-07-29
NVD description (verbatim)
In the Linux kernel, the following vulnerability has been resolved: dm log: fix out-of-bounds write due to region_count overflow The local variable region_count in create_log_context() is declared as unsigned int (32-bit), but dm_sector_div_up() returns sector_t (64-bit). When a device-mapper target has a sufficiently large ti->len with a small region_size, the division result can exceed UINT_MAX. The truncated value is then used to calculate bitset_size, causing clean_bits, sync_bits, and recovering_bits to be allocated far smaller than needed for the actual number of regions. Subsequent log operations (log_set_bit, log_clear_bit, log_test_bit) use region indices derived from the full untruncated region space, causing out-of-bounds writes to kernel heap memory allocated by vmalloc. This can be reproduced by creating a mirror target whose region_count overflows 32 bits: dmsetup create bigzero --table '0 8589934594 zero' dmsetup create mymirror --table '0 8589934594 mirror \ core 2 2 nosync 2 /dev/mapper/bigzero 0 \ /dev/mapper/bigzero 0' The status output confirms the truncation (sync_count=1 instead of 4294967297, because 0x100000001 was truncated to 1): $ dmsetup status mymirror 0 8589934594 mirror 2 254:1 254:1 1/4294967297 ... This leads to a kernel crash in core_in_sync: BUG: scheduling while atomic: (udev-worker)/9150/0x00000000 RIP: 0010:core_in_sync+0x14/0x30 [dm_log] CR2: 0000000000000008 Fixing recursive fault but reboot is needed! Fix by widening the local region_count to sector_t and adding an explicit overflow check before the value is assigned to lc->region_count.
16 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-53059 involves an integer overflow vulnerability in the Linux kernel's dm_log module, specifically in the create_log_context() function. The region_count variable is declared as a 32-bit unsigned int but is assigned the result of dm_sector_div_up(), which returns a 64-bit sector_t. When device-mapper targets have large ti->len values combined with small region_size parameters, the division exceeds UINT_MAX and truncates upon assignment. This truncated value is used to allocate bitmaps (clean_bits, sync_bits, recovering_bits) that are far smaller than needed. Subsequent log operations (log_set_bit, log_clear_bit, log_test_bit) use untruncated region indices from the full address space, causing out-of-bounds writes to vmalloc-allocated heap memory. The vulnerability can be reproduced with dmsetup commands creating a mirror target with region_count overflow (e.g., 0x100000001 truncated to 1), resulting in kernel crashes in functions like core_in_sync with CR2 faults on kernel heap access.
Business impact
Organizations running Linux systems relying on device-mapper mirroring for storage redundancy face potential service disruption through kernel crashes. Affected deployments include storage servers, virtualization hosts, and cloud infrastructure using dm-mirror for RAID-1 functionality. While exploitation requires local access and elevated privileges, successful attacks can crash the kernel, causing immediate downtime and data access loss until reboot. Systems with large-capacity mirrored volumes are at highest risk, particularly in container orchestration and hypervisor environments where administrative interfaces may be accessible to malicious containers or guest VMs.
Affected systems
The vulnerability affects Linux kernel versions containing the vulnerable create_log_context() code path in the device-mapper log module. Systems are at risk when: (1) device-mapper mirroring (dm-mirror) is configured, (2) mirror targets are created with sufficiently large capacity (e.g., 8TB or larger), (3) region_size parameters are small enough to cause region_count to exceed 32 bits, and (4) local unprivileged or privilege-escalated users can execute dmsetup or equivalent device-mapper control commands. This includes physical Linux servers, virtualization hypervisors (KVM, Xen), and containerized environments where dm-mirror is enabled.
Exploitability
Exploitation requires local system access and sufficient privileges to invoke device-mapper operations (typically CAP_SYS_ADMIN or dmsetup group membership). Attack complexity is low once these prerequisites are met; the vulnerability triggers reliably through standard dmsetup commands without requiring specialized tools or race conditions. Public reproduction steps exist in the CVE description. However, widespread exploitation is limited by the requirement for local access and the need to configure dm-mirror targets with specific capacity parameters. The vulnerability is not actively tracked in CISA's KEV catalog as of the current date.
Remediation
Remediation requires patching the Linux kernel to fix the integer overflow in create_log_context(). The official fix widens region_count from unsigned int to sector_t and adds explicit overflow validation before assignment to lc->region_count, ensuring the value does not exceed the maximum safe value for region operations. Organizations should apply kernel patches from their distribution (Red Hat, Canonical, SUSE, etc.) as they become available. Interim mitigations include: restricting dmsetup access to trusted administrators only (via ACLs or group membership), avoiding configuration of dm-mirror targets with regions exceeding 2^32 sectors (approximately 2TB per region at 512-byte sectors), and monitoring for unexpected kernel panics or scheduling-while-atomic warnings in kernel logs referencing dm_log or core_in_sync.
Patch guidance
Apply the latest kernel security update from your Linux distribution vendor. The fix has been merged into the upstream Linux kernel; verify the patch is present by checking kernel version and release notes. Distributors typically backport this fix to stable and LTS kernel branches. Users should monitor advisories from their vendor (Red Hat Security, Ubuntu Security Notices, SUSE Security Updates, etc.) and schedule kernel updates at the next maintenance window, prioritizing systems that actively use dm-mirror. Reboot is required after kernel update. Test the update in non-production environments first, particularly if dm-mirror is actively configured and in use.
Detection guidance
Monitor kernel logs for the specific crash signature: 'BUG: scheduling while atomic' combined with 'core_in_sync' in the call stack or 'CR2' page fault indicating out-of-bounds kernel heap access. Review dmsetup status output for suspicious values such as sync_count values that are unexpectedly small (e.g., 1) compared to the total region count, which suggests integer truncation. Audit local system access and dmsetup command invocations via auditd or systemd audit logs to identify unauthorized device-mapper reconfiguration. Deploy kernel address sanitizer (KASAN) or similar memory debugging tools in test environments to catch out-of-bounds writes before production deployment.
Why prioritize this
This vulnerability merits HIGH priority (CVSS 7.8) due to the combination of: (1) reliable local exploitability via standard tools with no race conditions, (2) impact severity—kernel panic causes immediate denial of service and potential data loss, (3) prevalence of dm-mirror in production storage and virtualization infrastructure, and (4) the relatively easy trigger conditions once local access is obtained. Organizations running large-capacity mirrored storage should treat this as urgent and plan patching within 30 days. Systems without dm-mirror or with small-capacity mirrors face lower practical risk but should still be included in standard update cycles.
Risk score, explained
The CVSS 3.1 score of 7.8 (HIGH) reflects: Attack Vector Local (AV:L) and Attack Complexity Low (AC:L), as exploitation requires only standard system tools and reliable trigger inputs; Privileges Required (PR:L), since dmsetup access typically requires elevated privileges or group membership; User Interaction None (UI:N), as no user action is needed beyond issuing dmsetup commands; Scope Unchanged (S:U), as the impact is confined to the affected system; and Confidentiality, Integrity, and Availability all High (C:H/I:H/A:H), as out-of-bounds kernel memory writes can lead to information disclosure, code execution potential, and system crash. The score appropriately reflects the severity of kernel-level memory corruption, tempered by the local-only attack surface.
Frequently asked questions
Does this affect my system if I don't use device-mapper mirroring?
No. The vulnerability is specific to the dm-mirror target and only triggers when mirror targets are created with specific capacity and region_size parameters. Systems using other storage technologies (LVM thin provisioning, standard RAID, native block devices) are not affected. You can verify dm-mirror usage by checking the output of 'dmsetup table' or 'dmsetup ls'.
What is the difference between the truncated region_count and the full value?
The region_count variable is truncated from 64 bits to 32 bits, losing the upper 32 bits of the value. For example, when the actual region count is 0x100000001 (4294967297 in decimal), truncation to 32 bits yields 0x00000001 (1 in decimal). This causes the kernel to allocate bitmaps for only 1 region when thousands or millions are actually needed, leading to out-of-bounds writes when operations try to access regions beyond the allocated size.
Can this vulnerability be exploited remotely or from a container?
Local access is required, but containers with sufficient capabilities (CAP_SYS_ADMIN) or guest VMs with device access can exploit this. Remote attackers cannot exploit it directly. However, if your infrastructure allows containers to enable privileged mode or if guest VMs have unnecessary device-mapper access, the attack surface expands within your environment.
What should I do if I see 'scheduling while atomic' errors in my kernel logs?
This warning combined with a cr2 fault on kernel heap memory may indicate either this vulnerability or another memory corruption issue. Immediately check your kernel version against available patches and apply updates. In the interim, restrict access to dmsetup commands and avoid creating or modifying dm-mirror targets. Collect full kernel logs and dmesg output for your security team to analyze. A system reboot may be necessary to clear the atomic context and stabilize the system.
This analysis is provided for informational purposes and reflects publicly available information as of the publication date. Organizations should verify all patch version numbers, affected kernel versions, and remediation steps against official vendor advisories and release notes from their Linux distribution. CVSS scores and CVE details are derived from official NVD records and may be updated. This vulnerability does not appear in CISA's KEV catalog as of the current date; threat actors may not actively exploit it in the wild, but the technical exploitability remains high for systems meeting the prerequisites. Implement changes only after thorough testing in non-production environments. SEC.co makes no warranty regarding the completeness, timeliness, or applicability of this analysis to your specific infrastructure. Source: NVD (public-domain), retrieved 2026-08-01. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-46331HIGHLinux Kernel pedit Page Cache Corruption Vulnerability
- CVE-2025-14098HIGHAvira Antivirus Engine Heap Buffer Overflow—Patch Guidance
- CVE-2026-0148HIGHAndroid RTP Video Decoder Integer Overflow Remote Code Execution
- CVE-2026-0150HIGHAndroid EdgeTPU Firmware Privilege Escalation Vulnerability
- CVE-2026-0151HIGHAndroid Graphics Integer Overflow RCE Vulnerability
- CVE-2026-0161HIGHAndroid RTP Integer Overflow Remote Privilege Escalation
- CVE-2026-48095HIGHCritical Heap Overflow in 7-Zip NTFS Handler Enables Code Execution
- CVE-2026-10999MEDIUMGoogle Chrome ANGLE Integer Overflow Information Disclosure