CVE-2026-139797
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().
Affected versions
Linux kernel versions
6.6.160,
6.12.110,
6.18.52,
6.1.191,
7.2.6,
7.3
and later are affected. Fixed in
6.6.163,
6.12.119,
6.18.65,
7.3.6,
7.4-rc1
and their respective stable series.
References
6 totalFrequently asked questions
-
What is CVE-2026-139797?
CVE-2026-139797 is a unscored severity Linux kernel vulnerability . It affects Linux kernel versions from 6.6.160 onward and has been patched in 6.6.163, 6.12.119, 6.18.65 and others. CVE-2026-139797 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
Is there a patch available for CVE-2026-139797?
Yes. CVE-2026-139797 has been patched. Fixed versions include 6.6.163, 6.12.119, 6.18.65 and others. If you are running Linux kernel 6.6.160 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2026-139797 actively exploited?
No. CVE-2026-139797 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.