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

Published Nov 30, 2026
·
Updated

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"), o2hbthread() leaves its loop and returns when the local node changes, for example after "echo 0 > node/<name>/local". The thread was started with kthreadrun() and nothing holds a reference to its taskstruct, so the task is freed once it exits, while reg->hrtask still points to it.

Reading the region's pid attribute then reads the freed task, and removing the region calls kthreadstop() on it:

BUG: KASAN: slab-use-after-free in o2hbregionpidshow+0xb3/0xc0 refcountt: addition on 0; use-after-free. Oops: Oops: 0000 [#1] SMP KASAN NOPTI RIP: 0010:kthreadstop+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 kthreadstopput().

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In ocfs2/cluster, create the heartbeat thread, take a reference to it before waking it, and drop the reference with kthread_stop_put().

Event History

Nov 30, 2026
CVE Published
via MITRE·01:38 PM
Data Sourced
via MITRE·01:38 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203