ocfs2/cluster: hold a reference on the heartbeat thread

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Nov 30, 2026

Read the record on cve.org

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

ProductVersions
Linux Linuxd64708cc119db01fbc55017ee6e987b680ebd59c to before d8db249281cc185ad7d25051c85b3dcc3a697bee Affected8e5cb90f212fda9f6cd29915a1ed74353108ceb3 to before 4d1f1994f2aba4a4851c8fbea7f2c12a7c27164d Affected8abb2b7c60d2b2c0f40606048c873096c03874d2 to before db6ad77a25a168756be394806bd65d8a9d267fc4 Affected688bc88e2046dd6ce81ce18079b5254cb8dadc0e to before 209d372db6827617329f7129253044d0fcd854bb Affected688bc88e2046dd6ce81ce18079b5254cb8dadc0e to before aa2e38aabaae87236290e486a2b77cfa3adfbebe Affectedd429482a67df16a30afaf9a3f1fe239fe73b44de Affected70d7bb7a0be033e5ebe8a2c48974692b1318891c Affected6.6.160 to before 6.6.163 Affected6.12.110 to before 6.12.119 Affected6.18.52 to before 6.18.65 Affected6.1.191 to before 6.2 Affected7.2.6 to before 7.3 Affected
Linux Linux7.3 Affectedbefore 7.3 Not Affected6.6.163 through 6.6.* Not Affected6.12.119 through 6.12.* Not Affected6.18.65 through 6.18.* Not Affected7.3.6 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.