CVE-2026-139797

Source
https://cve.org/CVERecord?id=CVE-2026-139797
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139797.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-139797
Downstream
Published
2026-11-30T13:38:05Z
Modified
2026-11-30T15:02:31Z
Summary
ocfs2/cluster: hold a reference on the heartbeat thread
Details

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

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139797.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d64708cc119db01fbc55017ee6e987b680ebd59c
Fixed
d8db249281cc185ad7d25051c85b3dcc3a697bee
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
8e5cb90f212fda9f6cd29915a1ed74353108ceb3
Fixed
4d1f1994f2aba4a4851c8fbea7f2c12a7c27164d
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
8abb2b7c60d2b2c0f40606048c873096c03874d2
Fixed
db6ad77a25a168756be394806bd65d8a9d267fc4
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
688bc88e2046dd6ce81ce18079b5254cb8dadc0e
Fixed
209d372db6827617329f7129253044d0fcd854bb
Fixed
aa2e38aabaae87236290e486a2b77cfa3adfbebe
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d429482a67df16a30afaf9a3f1fe239fe73b44de
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
70d7bb7a0be033e5ebe8a2c48974692b1318891c

Affected versions

v6.*
v6.1.191
v6.1.192
v6.1.193
v6.12.110
v6.12.111
v6.12.112
v6.12.113
v6.12.114
v6.12.115
v6.12.116
v6.12.117
v6.12.118
v6.18.52
v6.18.53
v6.18.54
v6.18.55
v6.18.56
v6.18.57
v6.18.58
v6.18.59
v6.18.60
v6.18.61
v6.18.62
v6.18.63
v6.18.64
v6.6.160
v6.6.161
v6.6.162
v7.*
v7.2.10
v7.2.11
v7.2.12
v7.2.13
v7.2.14
v7.2.15
v7.2.6
v7.2.7
v7.2.8
v7.2.9

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139797.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.1.191
Fixed
6.2
Type
ECOSYSTEM
Events
Introduced
6.6.160
Fixed
6.6.163
Type
ECOSYSTEM
Events
Introduced
6.12.110
Fixed
6.12.119
Type
ECOSYSTEM
Events
Introduced
6.18.52
Fixed
6.18.65
Type
ECOSYSTEM
Events
Introduced
7.2.6
Fixed
7.3
Type
ECOSYSTEM
Events
Introduced
7.3.0
Fixed
7.3.6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139797.json"