CVE-2026-138891
published high CVSS 3.1 · 7.0ocfs2: exit recovery thread on mount error path
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux45dabd8fe8a825e325eda57c2243af8c6549babd to < 0d34cbc2fa9b38f569b4dd4ba843153128a52cc8 · b613d8dcdff322a28783aea971b005e025553b5a to < ac1aa784ef3e40fa3a5b8afbe41656dcb87e57ea · f1e75d128b46e3b066e7b2e7cfca10491109d44d to < cee1ff11dee837a10545ec318a049b7b3f63bfeb · f1e75d128b46e3b066e7b2e7cfca10491109d44d to < 302d6df5348ddc144c6316add71cbb00faecd8f4 · f1e75d128b46e3b066e7b2e7cfca10491109d44d to < 70d85322ef7ea9151edac53b8d1c9b8d55ebaef4 · f1e75d128b46e3b066e7b2e7cfca10491109d44d to < 4db84320615453cf205febbc59a715ace31f9782 · f1e75d128b46e3b066e7b2e7cfca10491109d44d to < 0cd83f04e3404be310a3b90b4a992de24c5df7f4 · f1e75d128b46e3b066e7b2e7cfca10491109d44d to < 6163a859649e9432e9c79c541f36dbf3bba9172f · a4d3062f0ac7f458142e87451bc03a0f7b128483 · 5.10.163 to < 5.10.275 · 5.15.107 to < 5.15.226 · 5.4.229 to < 5.5 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.19 (affected) · 0 to < 5.19 (unaffected · semver) · 5.10.275 through 5.10.* (unaffected · semver) · 5.15.226 through 5.15.* (unaffected · semver) · 6.1.193 through 6.1.* (unaffected · semver) · 6.6.163 through 6.6.* (unaffected · semver) · 6.12.117 through 6.12.* (unaffected · semver) · 6.18.63 through 6.18.* (unaffected · semver) · 7.3.4 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: ocfs2: exit recovery thread on mount error path When a mount fails after the cluster connection has been established, e.g. in ocfs2_mount_volume(), ocfs2_fill_super() unwinds via out_debugfs/out_super and frees the osb without disabling recovery. A node failure event can concurrently launch the recovery thread, which blocks in __ocfs2_wait_on_mount() waiting for the volume state to become VOLUME_MOUNTED or VOLUME_DISABLED. As the mount error path neither sets VOLUME_DISABLED nor wakes osb_mount_event, the thread can never make progress: the kthread leaks and stays blocked on the wait queue embedded in the freed osb, which may then be accessed as freed memory. Fix it by setting VOLUME_DISABLED and waking osb_mount_event on this path so the thread bails out, and replace the plain kfree(osb->recovery_map) with ocfs2_recovery_exit(), which waits for a running recovery thread to exit before the recovery map is freed.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.0 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The defect is the out_debugfs/out_super unwind in ocfs2_fill_super(), reached only through mount(2) when ocfs2_mount_volume() fails after ocfs2_mark_dead_nodes() (or the o2dlm eviction callback ocfs2_do_node_down()) has started __ocfs2_recovery_thread(). The input that drives it is an on-disk image or a local failure, and no remote protocol message carries it. AC:H - A crafted image reliably leaves the kthread stuck in __ocfs2_wait_on_mount() on the freed osb. Corruption needs the kthread to run after kfree(osb), when it reads osb->recovery_map/osb->sb and queues on osb_mount_event in freed memory. The unwind sleeps in kthread_stop() and destroy_workqueue(), and the attacker cannot control whether the scheduler delays the kthread past it. PR:N - The attacker only writes the image: a local-mount ocfs2 volume whose slot map lists a foreign node in slot 1 and has no journal:0002 inode. ocfs2_read_journal_inode() then fails in the same ocfs2_mark_dead_nodes() loop after the kthread starts. ocfs2_fs_type lacks FS_USERNS_MOUNT, so the mount privilege belongs to the victim (UI:R), not the attacker. UI:R - Someone with init-namespace CAP_SYS_ADMIN must mount the attacker-supplied volume. That mount runs ocfs2_check_volume() into the failing ocfs2_mark_dead_nodes() step and then into the out_super path that kfree()s osb under the blocked kthread. S:U - The stranded ocfs2rec kthread and the freed struct ocfs2_super are in the same kernel. No VM, IOMMU or sandbox boundary is crossed. C:H - A late-running __ocfs2_recovery_thread() reads osb->recovery_map, osb->sb and osb->vol_state from the freed, reclaimable ocfs2_super and then follows pointers taken from it. That use-after-free can be shaped into kernel memory disclosure. I:H - On that path prepare_to_wait_event() list_adds an on-stack entry through the freed osb_mount_event head. If the reclaimed vol_state reads VOLUME_DISABLED, the bail path kfree()s osb->replay_map and calls wake_up(&osb->recovery_event) on attacker-controlled memory. That gives arbitrary-free and wait-entry function-pointer primitives. A:H - Even when the race is lost, the pre-fix out_super never sets VOLUME_DISABLED or wakes osb_mount_event. Each failed mount leaks an unkillable ocfs2rec kthread stuck in D state on freed memory, which produces hung-task reports and a panic under hung_task_panic. Winning the race oopses on the freed osb.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 45dabd8fe8a825e325eda57c2243af8c6549babd to < 0d34cbc2fa9b38f569b4dd4ba843153128a52cc8 (affected · git)b613d8dcdff322a28783aea971b005e025553b5a to < ac1aa784ef3e40fa3a5b8afbe41656dcb87e57ea (affected · git)f1e75d128b46e3b066e7b2e7cfca10491109d44d to < cee1ff11dee837a10545ec318a049b7b3f63bfeb (affected · git)f1e75d128b46e3b066e7b2e7cfca10491109d44d to < 302d6df5348ddc144c6316add71cbb00faecd8f4 (affected · git)f1e75d128b46e3b066e7b2e7cfca10491109d44d to < 70d85322ef7ea9151edac53b8d1c9b8d55ebaef4 (affected · git)f1e75d128b46e3b066e7b2e7cfca10491109d44d to < 4db84320615453cf205febbc59a715ace31f9782 (affected · git)f1e75d128b46e3b066e7b2e7cfca10491109d44d to < 0cd83f04e3404be310a3b90b4a992de24c5df7f4 (affected · git)f1e75d128b46e3b066e7b2e7cfca10491109d44d to < 6163a859649e9432e9c79c541f36dbf3bba9172f (affected · git)a4d3062f0ac7f458142e87451bc03a0f7b128483 (affected · git)5.10.163 to < 5.10.275 (affected · semver)5.15.107 to < 5.15.226 (affected · semver)5.4.229 to < 5.5 (affected · semver)Default: unaffected | Linux · cna |
| Linux | Linux | 5.19 (affected)0 to < 5.19 (unaffected · semver)5.10.275 through 5.10.* (unaffected · semver)5.15.226 through 5.15.* (unaffected · semver)6.1.193 through 6.1.* (unaffected · semver)6.6.163 through 6.6.* (unaffected · semver)6.12.117 through 6.12.* (unaffected · semver)6.18.63 through 6.18.* (unaffected · semver)7.3.4 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
8- https://git.kernel.org/stable/c/0cd83f04e3404be310a3b90b4a992de24c5df7f4
- https://git.kernel.org/stable/c/0d34cbc2fa9b38f569b4dd4ba843153128a52cc8
- https://git.kernel.org/stable/c/302d6df5348ddc144c6316add71cbb00faecd8f4
- https://git.kernel.org/stable/c/4db84320615453cf205febbc59a715ace31f9782
- https://git.kernel.org/stable/c/6163a859649e9432e9c79c541f36dbf3bba9172f
- https://git.kernel.org/stable/c/70d85322ef7ea9151edac53b8d1c9b8d55ebaef4
- https://git.kernel.org/stable/c/ac1aa784ef3e40fa3a5b8afbe41656dcb87e57ea
- https://git.kernel.org/stable/c/cee1ff11dee837a10545ec318a049b7b3f63bfeb
Provider assertions
1Linux · cna
ocfs2: exit recovery thread on mount error path
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 54d9fedce8e7263dd41b3e72d58b001302980d9af25aca1ebafea6e819fbd8a3
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record