Skip to content
Medium 4.7

ocfs2: defer suballocator block group reclaim to workqueue

CVE-2026-139508 First seen on SecPulse

Affected packages

PackageAffected → Fixed
LinuxLinux —
LinuxKernel
≥ 7.0.0, < 7.3.6→ 7.3.6

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

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

ocfs2: defer suballocator block group reclaim to workqueue

When the last bit in a suballocator block group is freed,
_ocfs2_free_suballoc_bits() reclaims the group back to the global bitmap.
The reclaim takes inode_lock() on the global bitmap inode while running
inside the freeing transaction, adding a lock dependency of

j_trans_barrier -> global bitmap inode i_rwsem

This forms a circular dependency with paths such as
ocfs2_shutdown_local_alloc(), which take the global bitmap inode lock
before starting a transaction:

Task1 (dealloc):
ocfs2_run_deallocs
ocfs2_free_cached_blocks
ocfs2_start_trans
down_read(j_trans_barrier)
_ocfs2_free_suballoc_bits
_ocfs2_reclaim_suballoc_to_main
inode_lock(main_bm_inode) <- wait on Task2

Task2 (dismount):
ocfs2_shutdown_local_alloc
inode_lock(main_bm_inode)
ocfs2_start_trans
down_read(j_trans_barrier) <- wait on Task3

Task3 (ocfs2cmt):
ocfs2_commit_cache
down_write(j_trans_barrier) <- wait on Task1's handle
jbd2_journal_flush

Task1 waits for Task2's inode_lock(), Task2 waits for the j_trans_barrier
down_write() held by ocfs2cmt, and ocfs2cmt waits for Task1's running
transaction to commit - a real deadlock, observed with aio-stress direct
IO writes racing dismount.

Fix it by deferring the reclaim to the per-superblock ocfs2_wq workqueue,
so the freeing transac…

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details