# CVE-2026-139797: ocfs2/cluster: hold a reference on the heartbeat thread

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **Published:** 2026-11-30T13:38:05.304Z
- **Modified:** 2026-11-30T14:20:14.000Z

> **AI summary (AI-generated, claude-haiku-5-5):** An attacker who can change the ocfs2 local node setting can trigger a use-after-free of the heartbeat thread task in the Linux kernel's ocfs2 cluster code.

## Who should check

- Anyone running Linux \>= d64708cc119db01fbc55017ee6e987b680ebd59c, \< d8db249281cc185ad7d25051c85b3dcc3a697bee; \>= 8e5cb90f212fda9f6cd29915a1ed74353108ceb3, \< 4d1f1994f2aba4a4851c8fbea7f2c12a7c27164d; \>= 8abb2b7c60d2b2c0f40606048c873096c03874d2, \< db6ad77a25a168756be394806bd65d8a9d267fc4; \>= 688bc88e2046dd6ce81ce18079b5254cb8dadc0e, \< 209d372db6827617329f7129253044d0fcd854bb; \>= 688bc88e2046dd6ce81ce18079b5254cb8dadc0e, \< aa2e38aabaae87236290e486a2b77cfa3adfbebe; d429482a67df16a30afaf9a3f1fe239fe73b44de; 70d7bb7a0be033e5ebe8a2c48974692b1318891c; \>= 6.6.160, \< 6.6.163; \>= 6.12.110, \< 6.12.119; \>= 6.18.52, \< 6.18.65; …
- Anyone running Linux 7.3

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

## Affected and fixed versions

- Linux: \>= d64708cc119db01fbc55017ee6e987b680ebd59c, \< d8db249281cc185ad7d25051c85b3dcc3a697bee; \>= 8e5cb90f212fda9f6cd29915a1ed74353108ceb3, \< 4d1f1994f2aba4a4851c8fbea7f2c12a7c27164d; \>= 8abb2b7c60d2b2c0f40606048c873096c03874d2, \< db6ad77a25a168756be394806bd65d8a9d267fc4; \>= 688bc88e2046dd6ce81ce18079b5254cb8dadc0e, \< 209d372db6827617329f7129253044d0fcd854bb; \>= 688bc88e2046dd6ce81ce18079b5254cb8dadc0e, \< aa2e38aabaae87236290e486a2b77cfa3adfbebe; d429482a67df16a30afaf9a3f1fe239fe73b44de; 70d7bb7a0be033e5ebe8a2c48974692b1318891c; \>= 6.6.160, \< 6.6.163; \>= 6.12.110, \< 6.12.119; \>= 6.18.52, \< 6.18.65; … (cvelist)
- Linux: 7.3 (cvelist)

## Technologies

Linux kernel

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-139797. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-139797.md
Affected: Linux >= d64708cc119db01fbc55017ee6e987b680ebd59c, < d8db249281cc185ad7d25051c85b3dcc3a697bee; >= 8e5cb90f212fda9f6cd29915a1ed74353108ceb3, < 4d1f1994f2aba4a4851c8fbea7f2c12a7c27164d; >= 8abb2b7c60d2b2c0f40606048c873096c03874d2, < db6ad77a25a168756be394806bd65d8a9d267fc4; >= 688bc88e2046dd6ce81ce18…
Fixed in: Linux 4d1f1994f2aba4a4851c8fbea7f2c12a7c27164d, Linux 209d372db6827617329f7129253044d0fcd854bb, Linux 6.6.163, Linux 6.12.119, Linux 6.18.65

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-139797 being exploited?

There is no confirmed exploitation: CVE-2026-139797 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-139797?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-139797?

Linux \>= d64708cc119db01fbc55017ee6e987b680ebd59c, \< d8db249281cc185ad7d25051c85b3dcc3a697bee; \>= 8e5cb90f212fda9f6cd29915a1ed74353108ceb3, \< 4d1f1994f2aba4a4851c8fbea7f2c12a7c27164d; \>= 8abb2b7c60d2b2c0f40606048c873096c03874d2, \< db6ad77a25a168756be394806bd65d8a9d267fc4; \>= 688bc88e2046dd6ce81ce18079b5254cb8dadc0e, \< 209d372db6827617329f7129253044d0fcd854bb; \>= 688bc88e2046dd6ce81ce18079b5254cb8dadc0e, \< aa2e38aabaae87236290e486a2b77cfa3adfbebe; d429482a67df16a30afaf9a3f1fe239fe73b44de; 70d7bb7a0be033e5ebe8a2c48974692b1318891c; \>= 6.6.160, \< 6.6.163; \>= 6.12.110, \< 6.12.119; \>= 6.18.52, \< 6.18.65; …; Linux 7.3.

### Is there a fix for CVE-2026-139797?

Yes. Fixed in Linux 4d1f1994f2aba4a4851c8fbea7f2c12a7c27164d, Linux 209d372db6827617329f7129253044d0fcd854bb, Linux 6.6.163, Linux 6.12.119, Linux 6.18.65. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-139797?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/d8db249281cc185ad7d25051c85b3dcc3a697bee>
- other: <https://git.kernel.org/stable/c/4d1f1994f2aba4a4851c8fbea7f2c12a7c27164d>
- other: <https://git.kernel.org/stable/c/db6ad77a25a168756be394806bd65d8a9d267fc4>
- other: <https://git.kernel.org/stable/c/209d372db6827617329f7129253044d0fcd854bb>
- other: <https://git.kernel.org/stable/c/aa2e38aabaae87236290e486a2b77cfa3adfbebe>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-139797>

HTML: <https://flawdb.com/CVE-2026-139797> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-139797>
