CVE-2026-80638: ocfs2: fix out-of-bounds write in ocfs2_remove_refcount_extent
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: fix out-of-bounds write in ocfs2removerefcountextent
[BUG] Unlinking a refcounted file whose refcount tree has leaf blocks triggers a fortify panic due to an out-of-bounds write.
[CAUSE] When the last leaf block is removed from a refcount tree, ocfs2removerefcountextent() converts the root back to leaf mode with a bulk memset on &rb->rfrecords. rfrecords sits in an anonymous union with rflist. rflist.ltreedepth aliases rfrecords.rlcount, and is 0 for a single-level tree. With rlcount equal to 0, the memset writes past the 16-byte declared size of rfrecords, which the fortify checker catches.
[FIX] Replace the bulk memset on &rb->rfrecords with a correctly-bounded memset on rlrecs[] alone, after setting rlcount to the correct value.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to the failure condition?
The condition applies to Linux kernel systems using OCFS2 where a refcounted file has a refcount tree containing leaf blocks. It is triggered when that file is unlinked and the final leaf block is removed from the refcount tree.
What symptom indicates that this issue has been encountered?
The described symptom is a fortify panic caused by an out-of-bounds write during unlinking. The affected path is ocfs2_remove_refcount_extent().
Is a particular OCFS2 tree state required?
Yes. The failure occurs when removing the last leaf block causes the refcount tree root to be converted back to leaf mode; in that state, the aliased record count is zero and the original bulk memset exceeds the declared rf_records size.