CVE-2026-138890: ocfs2: free replay slots in ocfs2_recovery_exit()

Published Nov 30, 2026
·
Updated

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

ocfs2: free replay slots in ocfs2recoveryexit()

Commit ce2fcf1516d6 ("ocfs2: fix memory leak in ocfs2mountvolume()") added ocfs2freereplayslots() calls to the mount error paths outdismount and outcheckvolume to fix a leak of osb->replaymap. However these calls are unlocked while the bail path of the recovery thread, which is woken up by outdismount right before the call, also frees the replay slots under osb->recoverylock. Both sides can thus observe a non-NULL osb->replaymap and trigger a double free.

Fix this by moving ocfs2freereplayslots() into ocfs2recoveryexit() after ocfs2recoverydisable(), which waits for a running recovery thread to exit under osb->recoverylock, and drop the unlocked call sites. Both ocfs2dismountvolume() and the outsuper path of ocfs2fillsuper() call ocfs2recoveryexit(), so the replay slots are freed on every path. Since super.c no longer references it, make ocfs2freereplayslots() static again.

Affected Software

14 affected componentsFixes available
Linux Linux kernel
linux/kernel>=5.4.229<5.5
5.5
linux/kernel>=5.10.163<5.10.275
5.10.275
linux/kernel>=5.15.107<5.15.226
5.15.226
linux/kernel>=6.0.16<6.1
6.1
linux/kernel>=6.1.2<6.1.193
6.1.193
linux/kernel>=6.2.0<6.6.163
6.6.163
linux/kernel>=6.7.0<6.12.117
6.12.117
linux/kernel>=6.13.0<6.18.63
6.18.63
linux/kernel>=6.19.0<7.3.4
7.3.4
debian/linux*
debian/linux<6.12.117-1
6.12.117-1
debian/linux<7.3.4-1
7.3.4-1
debian/linux<=6.1.176-1, <=6.1.192-3
6.12.117-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 5.5
  2. Upgrade

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

    Fixed in 5.10.275
  3. Upgrade

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

    Fixed in 5.15.226
  4. Upgrade

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

    Fixed in 6.1
  5. Upgrade

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

    Fixed in 6.1.193
  6. Upgrade

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

    Fixed in 6.6.163
  7. Upgrade

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

    Fixed in 6.12.117
  8. Upgrade

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

    Fixed in 6.18.63
  9. Upgrade

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

    Fixed in 7.3.4
  10. Upgrade

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

    Fixed in 6.12.117-1
  11. Upgrade

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

    Fixed in 7.3.4-1
  12. Upgrade

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

    Fixed in 6.12.117-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

When can the double free occur?

It can occur on OCFS2 mount error paths when replay slots are freed without holding recovery_lock while the recovery thread, awakened during dismount, also frees the same non-NULL replay_map under that lock.

2

Which lifecycle paths are intended to clean up replay slots after the fix?

The fix centralizes cleanup in ocfs2_recovery_exit() after ocfs2_recovery_disable() has waited for any running recovery thread to exit. Both ocfs2_dismount_volume() and the out_super path of ocfs2_fill_super() invoke ocfs2_recovery_exit().

3

What is the immediate mitigation indicated by the fix if affected code must be maintained?

Avoid freeing replay slots from the unlocked mount-error paths. Cleanup must occur through ocfs2_recovery_exit() only after recovery has been disabled and any running recovery thread has exited.

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