Overview
About vulnerability
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 BUG_ON in ocfs2_refcount_cal_cow_clusters(). The problem occurs when:
- copy_file_range() creates a reflinked extent with OCFS2_EXT_REFCOUNTED
- ioctl(FITRIM) triggers ocfs2_move_extents()
- __ocfs2_move_extents_range() reads and caches the extent (flags=0x2)
- ocfs2_move_extent()/ocfs2_defrag_extent() calls __ocfs2_move_extent() which clears OCFS2_EXT_REFCOUNTED flag on disk (flags=0x0)
- The extent map cache is not invalidated after the move
- Later write() operations read stale cached flags (0x2) but disk has updated flags (0x0), causing a mismatch
- BUG_ON(!(rec->e_flags & OCFS2_EXT_REFCOUNTED)) triggers Fix by clearing the extent map cache after each extent move/defrag operation in __ocfs2_move_extents_range(). This ensures subsequent operations read fresh extent data from disk.
Details
KernelCare state
Live-patch status from KernelCare for each operating system.
| Operating system | Status | Covered kernels |
|---|---|---|
| Debian 11 | Released |
36 kernels
|
| Debian 11 cloud | Released |
16 kernels
|
| Debian 13 | Planned | — |
| Oracle Linux 7 UEK 6 | Released |
112 kernels
|
| Oracle Linux 8 UEK 6 | Released |
138 kernels
|
| Proxmox VE 7 5.15 | Released |
47 kernels
|
| Ubuntu 20.04 HWE AWS | Released |
57 kernels
|
| Ubuntu 20.04 HWE Azure | Released |
40 kernels
|
| Ubuntu 22.04 | Released |
88 kernels
|
| Ubuntu 22.04 AWS | Released |
79 kernels
|
| Ubuntu 22.04 Azure | Released |
73 kernels
|
| Ubuntu 24.04 | Planned | — |
| Ubuntu 24.04 AWS | Planned | — |