CVE-2026-138889

HighCVSS 7.5/10Last modified Dec 1, 2026

Description

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

ocfs2: restrict OCFS2_INVALID_SLOT suballoc slot to system inodes

Patch series "ocfs2: validate suballoc slot and bit of metadata blocks", v3.

The ocfs2 metadata validators trust the on-disk suballoc slot and bit without checking them against the slot range of the mounted filesystem and the capacity of the block group bitmap. A corrupted image can carry OCFS2_INVALID_SLOT or another out-of-range slot, or a suballoc bit beyond the bitmap, and once the corresponding inode, extent block, xattr block, dir index root or refcount block gets freed, the bad value goes straight into ocfs2_get_system_file_inode() or _ocfs2_free_suballoc_bits() and hits a BUG_ON() or runs off the end of local_system_inodes[].

This series rejects such values at read time, in the existing validators, so corrupted objects fail with -EROFS (and a read-only remount) instead of crashing:

patch 1 restricts OCFS2_INVALID_SLOT dinodes to system inodes, completing fe7a283b3916 ("ocfs2: add suballoc slot check in ocfs2_validate_inode_block()"), and turns the "system file state is ambiguous" BUG_ON() in ocfs2_read_locked_inode() into an ocfs2_error(); patch 2 rejects oversized dinode suballoc bits; patch 3 validates the suballoc slot and bit of xattr and dir index blocks; patch 4 validates the suballoc slot and bit of extent and refcount blocks.

The checks only enforce what the kernel and mkfs.ocfs2 already write: a valid slot from meta_ac->ac_alloc_slot and a bit within the block group bitmap, with system inodes carrying OCFS2_INVALID_SLOT plus OCFS2_SYSTEM_FL and extent blocks using slot 0. Nothing changes for healthy filesystems.

Each new check was exercised under QEMU by corrupting the field in question with an out-of-range value; with the series applied the access fails with -EROFS and the filesystem remounts read-only instead of hitting the BUG_ON().

This patch (of 4):

ocfs2_validate_inode_block() currently permits i_suballoc_slot to be OCFS2_INVALID_SLOT for any dinode. Only system inodes created by mkfs.ocfs2 are allocated from the global allocator and thus legitimately carry this value; regular inodes are always allocated from a per-slot suballocator and hence must have a valid slot.

If a corrupted regular inode with OCFS2_INVALID_SLOT is accepted, ocfs2_remove_inode() will pass the slot to ocfs2_get_system_file_inode() and get_local_system_inode() will hit BUG_ON(slot == OCFS2_INVALID_SLOT) when the inode is deleted. This can be triggered by an unprivileged user unlinking such a corrupted file.

Reject OCFS2_INVALID_SLOT for non-system dinodes during validation, while still accepting it for system inodes. Note that a crafted dinode carrying OCFS2_SYSTEM_FL passes the check above, yet a plain lookup of it still used to BUG() in ocfs2_read_locked_inode() ("system file state is ambiguous"). Since i_flags comes from disk, handle that mismatch with ocfs2_error() instead of BUG_ON() as well.

Metrics

CVSS 3.1 7.5/10CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Nov 30, 2026
Last modified
Dec 1, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-138896.5Side-channel information leakage in WebAuthentication in Google Chrome on iOS prior to 150.0.7871.47 allowed a remote attacker to leak crossCVE-2026-138890In the Linux kernel, the following vulnerability has been resolved: ocfs2: free replay slots in ocfs2_recovery_exit() Commit ce2fcf1516d6 CVE-2026-1388917.0In the Linux kernel, the following vulnerability has been resolved: ocfs2: exit recovery thread on mount error path When a mount fails aftCVE-2026-138892In the Linux kernel, the following vulnerability has been resolved: USB: gadgetfs: do not WARN about excessively large memory allocations CVE-2026-138893In the Linux kernel, the following vulnerability has been resolved: fault-inject: fix dentry leak fault_create_debugfs_attr() has always tCVE-2026-138894In the Linux kernel, the following vulnerability has been resolved: resource: fix lost wakeup when waiting for a muxed region A task waitiCVE-2026-138895In the Linux kernel, the following vulnerability has been resolved: mm: hugetlb: drop refcount before freeing on memcg charge failure WhenCVE-2026-138896In the Linux kernel, the following vulnerability has been resolved: mm: hugetlb: return -ENOSPC on memcg charge failure Patch series "Fix CVE-2026-138897In the Linux kernel, the following vulnerability has been resolved: mm/damon/core: handle extreme memory state in damon_get_node_mem_bp() CVE-2026-138898In the Linux kernel, the following vulnerability has been resolved: mm/madvise: skip zone device folios in cold/pageout PMD range madvise_CVE-2026-138899In the Linux kernel, the following vulnerability has been resolved: mm/huge_memory: skip zone device folios in madvise_free_huge_pmd() PatCVE-2026-13894.3The Document Embedder – Embed PDFs, Word, Excel, and Other Files plugin for WordPress is vulnerable to Insecure Direct Object Reference in a
CVE-2026-138889: High severity, CVSS 7.5 | Vulnix