CVE-2026-99696: ocfs2: find the xattr entry again after defragmenting a bucket

Published Nov 20, 2026
·
Updated

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

ocfs2: find the xattr entry again after defragmenting a bucket

ocfs2xattrsetentrybucket() hands loc.xlentry to ocfs2xaset() twice: once for the bucket as it stands, and, if that reports -ENOSPC, once more after ocfs2defragxattrbucket() has packed the name/value pairs down.

Defragmenting ends by sorting the entry array on xenamehash. Buckets are kept sorted, so the sort only permutes entries that share a hash, but lib/sort.c is an unstable heapsort and it does permute them. loc.xlentry is an address inside xhentries[], so afterwards it denotes whichever entry landed in that slot rather than the one the search found.

The second ocfs2xaset() then works on the wrong entry. Nothing on that path compares the entry's name with xi->xiname, so what happens depends on how the two entries compare in size: ocfs2xareuseentry() trips its BUGON() when the padded name sizes differ, and otherwise the new value is written into the neighbouring attribute's value slot while the attribute being set is left untouched. setxattr() reports success either way.

Remember the entry's hash before defragmenting and look the entry up again afterwards, the way ocfs2xattrbucketfind() does. An entry that cannot be found again means the bucket no longer holds what the search found, so fail with -EFSCORRUPTED rather than writing through the stale pointer.

Affected Software

7 affected componentsFixes available
linux/kernel>=2.6.28<6.12.118
6.12.118
linux/kernel>=6.13.0<6.18.64
6.18.64
linux/kernel>=6.19.0<7.3.5
7.3.5
debian/linux*
debian/linux*
debian/linux*
debian/linux<=6.1.176-1, <=6.1.192-2, <=6.12.107-1, <=6.12.117-1, <=7.3.4-1
7.3.5-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.12.118
  2. Upgrade

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

    Fixed in 6.18.64
  3. Upgrade

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

    Fixed in 7.3.5
  4. Upgrade

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

    Fixed in 7.3.5-1

Event History

Nov 20, 2026
CVE Published
via MITRE·05:50 AM
Data Sourced
via MITRE·05:50 AM
Description
Data Sourced
via OSV·05:50 AM
DescriptionAffected Software
Data Sourced
via NVD·06:18 AM
Description

Frequently Asked Questions

1

Under what conditions can this issue be triggered?

It occurs when an OCFS2 extended-attribute update initially runs out of space in an xattr bucket, causing that bucket to be defragmented before the update is retried. The affected entry must share its name hash with another entry whose position can change during the post-defragmentation sort.

2

What impact can a failed update have?

If the colliding entries have different padded name sizes, the kernel can hit a BUG_ON(). If their padded name sizes match, the requested value can be written to a neighbouring attribute instead, while setxattr() still reports success and the intended attribute remains unchanged.

3

How can administrators detect that they may already have encountered the issue?

A successful setxattr() call is not reliable evidence that the intended attribute was updated. Verify the value of the targeted attribute and, where relevant, inspect neighbouring extended attributes after updates that may have required bucket defragmentation.

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