CVE-2026-138889: ocfs2: restrict OCFS2_INVALID_SLOT suballoc slot to system inodes

Published Nov 30, 2026
·
Updated

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

ocfs2: restrict OCFS2INVALIDSLOT 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 OCFS2INVALIDSLOT 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 ocfs2getsystemfileinode() or ocfs2freesuballocbits() and hits a BUGON() or runs off the end of localsysteminodes[].

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 OCFS2INVALIDSLOT dinodes to system inodes, completing fe7a283b3916 ("ocfs2: add suballoc slot check in ocfs2validateinodeblock()"), and turns the "system file state is ambiguous" BUGON() in ocfs2readlockedinode() into an ocfs2error(); 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 metaac->acallocslot and a bit within the block group bitmap, with system inodes carrying OCFS2INVALIDSLOT plus OCFS2SYSTEMFL 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 BUGON().

This patch (of 4):

ocfs2validateinodeblock() currently permits isuballocslot to be OCFS2INVALIDSLOT 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 OCFS2INVALIDSLOT is accepted, ocfs2removeinode() will pass the slot to ocfs2getsystemfileinode() and getlocalsysteminode() will hit BUGON(slot == OCFS2INVALIDSLOT) when the inode is deleted. This can be triggered by an unprivileged user unlinking such a corrupted file.

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

Affected Software

10 affected componentsFixes available
Linux Linux kernel
linux/kernel>=6.1.191<6.1.193
6.1.193
linux/kernel>=6.6.160<6.6.163
6.6.163
linux/kernel>=6.12.114<6.12.118
6.12.118
linux/kernel>=6.18.0<6.18.63
6.18.63
linux/kernel>=6.19.0<7.3.4
7.3.4
debian/linux*
debian/linux<6.12.118-1
6.12.118-1
debian/linux<7.3.4-1
7.3.4-1
debian/linux<=6.1.176-1, <=6.1.192-3, <=6.12.117-1
6.12.118-17.3.4-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.1.193
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.6.163
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.118
  4. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.63
  5. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.4
  6. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.118-1
  7. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 7.3.4-1
  8. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.118-1Fixed in 7.3.4-1

Event History

Nov 30, 2026
CVE Published
via MITRE·01:25 PM
Data Sourced
via MITRE·01:25 PM
Description
Data Sourced
via OSV·01:25 PM
DescriptionAffected Software
Data Sourced
via NVD·02:17 PM
Description

Frequently Asked Questions

1

What conditions are required to trigger this issue?

The mounted OCFS2 filesystem must contain corrupted metadata with an invalid suballocator slot or a suballocator bit beyond the block-group bitmap capacity. The affected metadata object must then be freed, which can cause a BUG_ON() or an out-of-bounds access to local_system_inodes[].

2

Are normal user files affected by OCFS2_INVALID_SLOT values?

OCFS2_INVALID_SLOT is intended only for system inodes. A corrupted image that assigns it to other inode types is part of the condition addressed by the fix.

3

What happens after the fix detects malformed OCFS2 metadata?

The validators reject the corrupted object when it is read. The filesystem reports -EROFS and remounts read-only rather than proceeding to a kernel crash or out-of-bounds access.

4

How can administrators identify potential exposure?

Exposure depends on mounting an OCFS2 image with corrupted metadata, particularly invalid suballocator slot or bitmap-bit values. The provided information does not identify a non-invasive detection method before the affected metadata is read or freed.

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