ocfs2/cluster: hold a reference on the heartbeat thread
- CVE-2026-139797
- GHSA-jjpg-8jj3-pxqc
- EUVD-2026-139503
Description
In the Linux kernel, the following vulnerability has been resolved: ocfs2/cluster: hold a reference on the heartbeat thread Since commit 688bc88e2046 ("ocfs2/cluster: keep heartbeat local node stable"), o2hb_thread() leaves its loop and returns when the local node changes, for example after "echo 0 > node/<name>/local". The thread was started with kthread_run() and nothing holds a reference to its task_struct, so the task is freed once it exits, while reg->hr_task still points to it. Reading the region's pid attribute then reads the freed task, and removing the region calls kthread_stop() on it: BUG: KASAN: slab-use-after-free in o2hb_region_pid_show+0xb3/0xc0 refcount_t: addition on 0; use-after-free. Oops: Oops: 0000 [#1] SMP KASAN NOPTI RIP: 0010:kthread_stop+0xb1/0x390 The thread could already return by itself before, when heartbeat start was aborted or on an unclean stop, but the local node change makes it reachable from userspace at any time. Create the thread, take a reference on it and only then wake it, so the reference cannot race with the thread exiting. Drop it with kthread_stop_put().
Text from the CVE.org record.
Recommendation
Linux
- If you run 6.18.xupdate to 6.18.65 or laterPatch update: breaking changes are unlikely
- If you run 6.12.xupdate to 6.12.119 or laterPatch update: breaking changes are unlikely
- If you run 6.6.xupdate to 6.6.163 or laterPatch update: breaking changes are unlikely
- If you run a version from 6.1.191 to before 6.2update to 6.2 or laterMinor version change: check the release notes
Some affected versions have no stated fix.
Taken from the version ranges of the CVE.org record. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
Linux
Affected versions Fixed in from 6.18.52 to before 6.18.65 6.18.65 from 6.12.110 to before 6.12.119 6.12.119 from 6.6.160 to before 6.6.163 6.6.163 from 6.1.191 to before 6.2 6.2 from 7.2.6 to before 7.3 none stated 7.3 none stated before 7.3: not affected none stated from 6.6.163 up to 6.6.*: not affected none stated and 4 more
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.