CVE-2026-53040: OCFS2 Bitmap Validation Vulnerability – Local DoS & Memory Disclosure
A flaw in the Linux kernel's OCFS2 filesystem driver can be triggered when a user issues a specific diagnostic request (OCFS2_IOC_INFO with non-coherent mode) against a crafted filesystem. An attacker with local access can supply malformed filesystem metadata that causes the kernel to read memory outside the bounds of a bitmap structure, leading to a use-after-free condition. This can crash the system or potentially allow information disclosure. The vulnerability requires local access and standard user privileges to trigger.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.1 HIGH · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
- Weaknesses (CWE)
- CWE-416
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-24 / 2026-07-14
NVD description (verbatim)
In the Linux kernel, the following vulnerability has been resolved: ocfs2: validate bg_bits during freefrag scan [BUG] A crafted filesystem can trigger an out-of-bounds bitmap walk when OCFS2_IOC_INFO is issued with OCFS2_INFO_FL_NON_COHERENT. BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: use-after-free in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] BUG: KASAN: use-after-free in test_bit_le include/asm-generic/bitops/le.h:21 [inline] BUG: KASAN: use-after-free in ocfs2_info_freefrag_scan_chain fs/ocfs2/ioctl.c:495 [inline] BUG: KASAN: use-after-free in ocfs2_info_freefrag_scan_bitmap fs/ocfs2/ioctl.c:588 [inline] BUG: KASAN: use-after-free in ocfs2_info_handle_freefrag fs/ocfs2/ioctl.c:662 [inline] BUG: KASAN: use-after-free in ocfs2_info_handle_request+0x1c66/0x3370 fs/ocfs2/ioctl.c:754 Read of size 8 at addr ffff888031bce000 by task syz.0.636/1435 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xbe/0x130 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xd1/0x650 mm/kasan/report.c:482 kasan_report+0xfb/0x140 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:186 [inline] kasan_check_range+0x11c/0x200 mm/kasan/generic.c:200 __kasan_check_read+0x11/0x20 mm/kasan/shadow.c:31 instrument_atomic_read include/linux/instrumented.h:68 [inline] _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] test_bit_le include/asm-generic/bitops/le.h:21 [inline] ocfs2_info_freefrag_scan_chain fs/ocfs2/ioctl.c:495 [inline] ocfs2_info_freefrag_scan_bitmap fs/ocfs2/ioctl.c:588 [inline] ocfs2_info_handle_freefrag fs/ocfs2/ioctl.c:662 [inline] ocfs2_info_handle_request+0x1c66/0x3370 fs/ocfs2/ioctl.c:754 ocfs2_info_handle+0x18d/0x2a0 fs/ocfs2/ioctl.c:828 ocfs2_ioctl+0x632/0x6e0 fs/ocfs2/ioctl.c:913 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x197/0x1e0 fs/ioctl.c:583 ... [CAUSE] ocfs2_info_freefrag_scan_chain() uses on-disk bg_bits directly as the bitmap scan limit. The coherent path reads group descriptors through ocfs2_read_group_descriptor(), which validates the descriptor before use. The non-coherent path uses ocfs2_read_blocks_sync() instead and skips that validation, so an impossible bg_bits value can drive the bitmap walk past the end of the block. [FIX] Compute the bitmap capacity from the filesystem format with ocfs2_group_bitmap_size(), report descriptors whose bg_bits exceeds that limit, and clamp the scan to the computed capacity. This keeps the freefrag report going while avoiding reads beyond the buffer.
8 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The OCFS2 filesystem driver contains an out-of-bounds bitmap walk vulnerability in the freefrag scan code path. When ocfs2_info_handle_freefrag() processes a OCFS2_IOC_INFO ioctl with the OCFS2_INFO_FL_NON_COHERENT flag set, it calls ocfs2_info_freefrag_scan_chain() which uses the on-disk bg_bits value directly as a bitmap scan limit without validation. The coherent code path validates group descriptors via ocfs2_read_group_descriptor(), but the non-coherent path uses ocfs2_read_blocks_sync() and omits this validation step. An attacker-controlled bg_bits value can be larger than the actual bitmap capacity, causing test_bit operations to access memory beyond the allocated block buffer. The fix validates bg_bits against the computed bitmap capacity (ocfs2_group_bitmap_size()) and clamps the scan range, preventing out-of-bounds access while allowing the freefrag diagnostic to complete safely.
Business impact
Systems relying on OCFS2 (Oracle Cluster Filesystem) for shared storage or cluster deployments face denial-of-service risk. A local user on a node with OCFS2 mounted can crash the kernel without elevated privileges, disrupting cluster operations and causing unplanned downtime. While information disclosure is technically possible through the use-after-free, the primary business impact is system instability and service interruption. Organizations using OCFS2 in production clusters should treat this as a stability and availability concern.
Affected systems
Linux kernel versions with the OCFS2 filesystem driver are affected. The vulnerability is triggered via the OCFS2_IOC_INFO ioctl, which means any system with OCFS2 mounted and accessible to local users can be targeted. This includes clustered deployments, shared storage systems, and any Linux distribution that includes OCFS2 support (commonly found in enterprise and HPC environments). Verify the specific kernel version in your distribution against the vendor patch release.
Exploitability
Exploitability is moderate. The attack requires local filesystem access and the ability to issue ioctls to an OCFS2-mounted filesystem—typically available to unprivileged local users. The attacker does not need to modify actual filesystem data on disk; a crafted filesystem image or a compromised cluster node can supply the malformed metadata. No special kernel configuration or hardware is required. However, triggering reliable exploitation to achieve information disclosure (rather than just a crash) may require additional effort. The CVSS 3.1 score of 7.1 (HIGH) reflects local attack vector with high confidentiality and availability impact.
Remediation
Apply the Linux kernel patch that adds validation of bg_bits during the freefrag scan. The fix computes the bitmap capacity using ocfs2_group_bitmap_size() and validates that on-disk bg_bits does not exceed this limit, clamping the scan range accordingly. This prevents out-of-bounds access while preserving diagnostic functionality. Patch against the vendor advisory to confirm the exact kernel version containing the fix. For immediate risk reduction on vulnerable systems, restrict ioctl access to OCFS2 filesystems using SELinux, AppArmor, or capability-based access controls if operationally feasible.
Patch guidance
Obtain the patched kernel from your Linux distribution's security update channel. The fix should be backported to stable kernel series in use. Verify patch inclusion by checking the commit that resolves CVE-2026-53040 in the OCFS2 ioctl code (fs/ocfs2/ioctl.c). Test the patched kernel in a non-production environment with OCFS2 workloads to confirm the freefrag diagnostic still functions and that cluster operations are not disrupted. Coordinate patching across cluster nodes to maintain consistency. Reboot or hot-patch as your deployment allows.
Detection guidance
Monitor kernel logs for KASAN warnings related to use-after-free in ocfs2_info_freefrag_scan_chain or ocfs2_info_handle_freefrag. Watch for unexpected process crashes or kernel panics on systems with OCFS2 mounted. If KASAN is compiled in, a crafted ioctl attempt will produce a dump with the call stack shown in the CVE description. Audit ioctl calls to OCFS2 filesystems using syscall tracing (strace, auditd) to detect abnormal OCFS2_IOC_INFO usage. Implement filesystem integrity checks to detect malformed group descriptors.
Why prioritize this
Prioritize patching based on OCFS2 deployment scope. Systems in production clusters or shared-storage environments should be patched urgently due to the denial-of-service risk and potential for coordinated attacks across cluster nodes. Systems with OCFS2 mounted but in less critical roles can be addressed in the next maintenance window. The HIGH CVSS score and local attack vector make this a moderate-to-high priority in any environment where OCFS2 is in active use.
Risk score, explained
CVSS 3.1 score 7.1 (HIGH) reflects: (1) Local attack vector—requires presence on the system or filesystem access; (2) Low complexity—no special conditions needed; (3) Low privilege requirement—unprivileged users can trigger it; (4) High confidentiality impact—use-after-free can leak kernel memory; (5) High availability impact—system crash is easily achievable. The score appropriately captures the combination of ease-of-exploitation and severity of outcome, though actual information disclosure may be less probable than denial of service in practice.
Frequently asked questions
Can this be exploited remotely?
No. The attack requires local access to a system with OCFS2 mounted and the ability to issue ioctls. Remote attackers cannot exploit this vulnerability directly, though a compromised cluster node or insider threat could trigger it.
Do I need OCFS2 actively in use?
OCFS2 must be mounted (or compiled in as a module that can be loaded). Passive presence of the OCFS2 driver is not sufficient; the filesystem must be mounted to an attacker's system or network-accessible to local users.
What is the difference between coherent and non-coherent mode?
Coherent mode includes additional validation of group descriptors via ocfs2_read_group_descriptor(). Non-coherent mode (OCFS2_INFO_FL_NON_COHERENT) bypasses this check, making it vulnerable to malformed bg_bits. The non-coherent path is intended for diagnostic purposes but lacks input validation.
Will a patched kernel break my OCFS2 workloads?
No. The patch adds validation and clamping; it preserves the freefrag diagnostic function while preventing out-of-bounds access. Existing valid OCFS2 clusters and diagnostics will continue to work normally.
This analysis is based on publicly available CVE information and the referenced kernel patch. Specific patch version numbers, affected kernel release versions, and distribution-specific patch availability must be verified against your Linux vendor's security advisories. Testing in your environment is essential before production deployment. This vulnerability has not been confirmed in the CISA KEV catalog as of the publication date. Security teams should validate exploitability in their specific OCFS2 configurations and apply patches according to their change-management and maintenance windows. Source: NVD (public-domain), retrieved 2026-08-01. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-10001HIGHChrome Sandbox Escape via PerformanceManager Use-After-Free
- CVE-2026-10002HIGHGoogle Chrome PDFium Use-After-Free Vulnerability (CVSS 8.8)
- CVE-2026-10003HIGHChrome Use-After-Free Code Execution Vulnerability Analysis
- CVE-2026-10007HIGHChrome Use-After-Free in SVG Arbitrary Code Execution (CVSS 8.8)
- CVE-2026-10012HIGHChrome Skia Use-After-Free Sandbox Escape (v148.0.7778.216)
- CVE-2026-10013HIGHUse-After-Free in Chrome WebCodecs – Patch Guide & Risk Assessment
- CVE-2026-10016HIGHUse-After-Free in Chrome DOM – Sandbox Code Execution Vulnerability
- CVE-2026-10882HIGHCritical Chrome Use-After-Free RCE Vulnerability – Exploit Details & Patch Guidance