CVE-2025-40233: ocfs2: clear extent cache after moving/defragmenting extents

Published Dec 4, 2025
·
Updated

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

ocfs2: clear extent cache after moving/defragmenting extents

The extent map cache can become stale when extents are moved or defragmented, causing subsequent operations to see outdated extent flags. This triggers a BUGON in ocfs2refcountcalcowclusters().

The problem occurs when: 1. copyfilerange() creates a reflinked extent with OCFS2EXTREFCOUNTED 2. ioctl(FITRIM) triggers ocfs2moveextents() 3. ocfs2moveextentsrange() reads and caches the extent (flags=0x2) 4. ocfs2moveextent()/ocfs2defragextent() calls ocfs2moveextent() which clears OCFS2EXTREFCOUNTED flag on disk (flags=0x0) 5. The extent map cache is not invalidated after the move 6. Later write() operations read stale cached flags (0x2) but disk has updated flags (0x0), causing a mismatch 7. BUGON(!(rec->eflags & OCFS2EXTREFCOUNTED)) triggers

Fix by clearing the extent map cache after each extent move/defrag operation in ocfs2moveextentsrange(). This ensures subsequent operations read fresh extent data from disk.

Affected Software

2 affected componentsFixes available
Linux Linux kernel
Microsoft azl3 kernel 6.6.112.1-2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Apply the ocfs2 fix to clear/invalidate the extent map cache after each extent move or defrag operation (e.g., after __ocfs2_move_extents_range() / ocfs2_move_extent() / ocfs2_defrag_extent()). This prevents later write()/FITRIM operations from reading stale cached extent flags.

    Linux kernel (ocfs2) Clear extent map cache after moving/defragmenting extents = enabled

Event History

Dec 4, 2025
CVE Published
via MITRE·03:31 PM
Data Sourced
via MITRE·03:31 PM
DescriptionSeverity
Data Sourced
via NVD·04:16 PM
DescriptionSeverity
Dec 6, 2025
Data Sourced
via Microsoft·01:03 AM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-40233?

CVE-2025-40233 has a severity rating that may vary based on the specific Linux kernel version affected.

2

How do I fix CVE-2025-40233?

To fix CVE-2025-40233, update your Linux kernel to the latest version where the vulnerability has been patched.

3

Which versions of the Linux kernel are affected by CVE-2025-40233?

CVE-2025-40233 affects certain versions of the Linux kernel, particularly those that do not have the latest fixes applied.

4

What are the potential impacts of CVE-2025-40233?

The potential impacts of CVE-2025-40233 include stale extent cache leading to outdated extent flags, which may affect system stability and data integrity.

5

Is CVE-2025-40233 a public vulnerability?

Yes, CVE-2025-40233 is a public vulnerability that has been documented for awareness and remediation efforts.

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