CVE-2026-139797

ocfs2/cluster: hold a reference on the heartbeat thread

No CVSS score yet EPSS 0.21%

Published 30 Nov 2026 Updated 30 Nov 2026 CNA: Linux

Check your servers for CVE-2026-139797

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-139797 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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().

Exploitation

EPSS 0.21%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 11.6% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from d64708cc119db01fbc55017ee6e987b680ebd59c, before d8db249281cc185ad7d25051c85b3dcc3a697bee
affected from 8e5cb90f212fda9f6cd29915a1ed74353108ceb3, before 4d1f1994f2aba4a4851c8fbea7f2c12a7c27164d
affected from 8abb2b7c60d2b2c0f40606048c873096c03874d2, before db6ad77a25a168756be394806bd65d8a9d267fc4
affected from 688bc88e2046dd6ce81ce18079b5254cb8dadc0e, before 209d372db6827617329f7129253044d0fcd854bb
affected from 688bc88e2046dd6ce81ce18079b5254cb8dadc0e, before aa2e38aabaae87236290e486a2b77cfa3adfbebe
affected d429482a67df16a30afaf9a3f1fe239fe73b44de
affected 70d7bb7a0be033e5ebe8a2c48974692b1318891c
affected from 6.6.160, before 6.6.163
affected from 6.12.110, before 6.12.119
affected from 6.18.52, before 6.18.65
affected from 6.1.191, before 6.2
affected from 7.2.6, before 7.3
Other versions: unaffected
Linux
affected 7.3
unaffected before 7.3
unaffected from 6.6.163 up to and including 6.6.*
unaffected from 6.12.119 up to and including 6.12.*
unaffected from 6.18.65 up to and including 6.18.*
unaffected from 7.3.6 up to and including 7.3.*
unaffected 7.4-rc1 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-139797 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-139797

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-139797
trivy image --scanners vuln IMAGE | grep CVE-2026-139797

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2026-139797 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.