{"api_version":"1","generated_at":"2026-11-30T15:13:34+00:00","cve":"CVE-2026-139797","urls":{"html":"https://cve.report/CVE-2026-139797","api":"https://cve.report/api/cve/CVE-2026-139797.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139797","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139797"},"summary":{"title":"ocfs2/cluster: hold a reference on the heartbeat thread","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2/cluster: hold a reference on the heartbeat thread\n\nSince commit 688bc88e2046 (\"ocfs2/cluster: keep heartbeat local node\nstable\"), o2hb_thread() leaves its loop and returns when the local node\nchanges, for example after \"echo 0 > node/<name>/local\".  The thread was\nstarted with kthread_run() and nothing holds a reference to its\ntask_struct, so the task is freed once it exits, while reg->hr_task still\npoints to it.\n\nReading the region's pid attribute then reads the freed task, and removing\nthe region calls kthread_stop() on it:\n\n  BUG: KASAN: slab-use-after-free in o2hb_region_pid_show+0xb3/0xc0\n  refcount_t: addition on 0; use-after-free.\n  Oops: Oops: 0000 [#1] SMP KASAN NOPTI\n  RIP: 0010:kthread_stop+0xb1/0x390\n\nThe thread could already return by itself before, when heartbeat start was\naborted or on an unclean stop, but the local node change makes it\nreachable from userspace at any time.\n\nCreate the thread, take a reference on it and only then wake it, so the\nreference cannot race with the thread exiting.  Drop it with\nkthread_stop_put().","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:20:14","updated_at":"2026-11-30 14:20:14"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/209d372db6827617329f7129253044d0fcd854bb","name":"https://git.kernel.org/stable/c/209d372db6827617329f7129253044d0fcd854bb","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/d8db249281cc185ad7d25051c85b3dcc3a697bee","name":"https://git.kernel.org/stable/c/d8db249281cc185ad7d25051c85b3dcc3a697bee","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/aa2e38aabaae87236290e486a2b77cfa3adfbebe","name":"https://git.kernel.org/stable/c/aa2e38aabaae87236290e486a2b77cfa3adfbebe","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/4d1f1994f2aba4a4851c8fbea7f2c12a7c27164d","name":"https://git.kernel.org/stable/c/4d1f1994f2aba4a4851c8fbea7f2c12a7c27164d","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/db6ad77a25a168756be394806bd65d8a9d267fc4","name":"https://git.kernel.org/stable/c/db6ad77a25a168756be394806bd65d8a9d267fc4","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139797","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139797","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d64708cc119db01fbc55017ee6e987b680ebd59c d8db249281cc185ad7d25051c85b3dcc3a697bee git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 8e5cb90f212fda9f6cd29915a1ed74353108ceb3 4d1f1994f2aba4a4851c8fbea7f2c12a7c27164d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 8abb2b7c60d2b2c0f40606048c873096c03874d2 db6ad77a25a168756be394806bd65d8a9d267fc4 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 688bc88e2046dd6ce81ce18079b5254cb8dadc0e 209d372db6827617329f7129253044d0fcd854bb git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 688bc88e2046dd6ce81ce18079b5254cb8dadc0e aa2e38aabaae87236290e486a2b77cfa3adfbebe git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d429482a67df16a30afaf9a3f1fe239fe73b44de git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 70d7bb7a0be033e5ebe8a2c48974692b1318891c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.6.160 6.6.163 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.12.110 6.12.119 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.18.52 6.18.65 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.1.191 6.2 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.2.6 7.3 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.3","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.119 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["fs/ocfs2/cluster/heartbeat.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"d8db249281cc185ad7d25051c85b3dcc3a697bee","status":"affected","version":"d64708cc119db01fbc55017ee6e987b680ebd59c","versionType":"git"},{"lessThan":"4d1f1994f2aba4a4851c8fbea7f2c12a7c27164d","status":"affected","version":"8e5cb90f212fda9f6cd29915a1ed74353108ceb3","versionType":"git"},{"lessThan":"db6ad77a25a168756be394806bd65d8a9d267fc4","status":"affected","version":"8abb2b7c60d2b2c0f40606048c873096c03874d2","versionType":"git"},{"lessThan":"209d372db6827617329f7129253044d0fcd854bb","status":"affected","version":"688bc88e2046dd6ce81ce18079b5254cb8dadc0e","versionType":"git"},{"lessThan":"aa2e38aabaae87236290e486a2b77cfa3adfbebe","status":"affected","version":"688bc88e2046dd6ce81ce18079b5254cb8dadc0e","versionType":"git"},{"status":"affected","version":"d429482a67df16a30afaf9a3f1fe239fe73b44de","versionType":"git"},{"status":"affected","version":"70d7bb7a0be033e5ebe8a2c48974692b1318891c","versionType":"git"},{"lessThan":"6.6.163","status":"affected","version":"6.6.160","versionType":"semver"},{"lessThan":"6.12.119","status":"affected","version":"6.12.110","versionType":"semver"},{"lessThan":"6.18.65","status":"affected","version":"6.18.52","versionType":"semver"},{"lessThan":"6.2","status":"affected","version":"6.1.191","versionType":"semver"},{"lessThan":"7.3","status":"affected","version":"7.2.6","versionType":"semver"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["fs/ocfs2/cluster/heartbeat.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"7.3"},{"lessThan":"7.3","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.119","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"6.6.160","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.119","versionStartIncluding":"6.12.110","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"6.18.52","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"7.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"7.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.191","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.2.6","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2/cluster: hold a reference on the heartbeat thread\n\nSince commit 688bc88e2046 (\"ocfs2/cluster: keep heartbeat local node\nstable\"), o2hb_thread() leaves its loop and returns when the local node\nchanges, for example after \"echo 0 > node/<name>/local\".  The thread was\nstarted with kthread_run() and nothing holds a reference to its\ntask_struct, so the task is freed once it exits, while reg->hr_task still\npoints to it.\n\nReading the region's pid attribute then reads the freed task, and removing\nthe region calls kthread_stop() on it:\n\n  BUG: KASAN: slab-use-after-free in o2hb_region_pid_show+0xb3/0xc0\n  refcount_t: addition on 0; use-after-free.\n  Oops: Oops: 0000 [#1] SMP KASAN NOPTI\n  RIP: 0010:kthread_stop+0xb1/0x390\n\nThe thread could already return by itself before, when heartbeat start was\naborted or on an unclean stop, but the local node change makes it\nreachable from userspace at any time.\n\nCreate the thread, take a reference on it and only then wake it, so the\nreference cannot race with the thread exiting.  Drop it with\nkthread_stop_put()."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:38:05.304Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/d8db249281cc185ad7d25051c85b3dcc3a697bee"},{"url":"https://git.kernel.org/stable/c/4d1f1994f2aba4a4851c8fbea7f2c12a7c27164d"},{"url":"https://git.kernel.org/stable/c/db6ad77a25a168756be394806bd65d8a9d267fc4"},{"url":"https://git.kernel.org/stable/c/209d372db6827617329f7129253044d0fcd854bb"},{"url":"https://git.kernel.org/stable/c/aa2e38aabaae87236290e486a2b77cfa3adfbebe"}],"title":"ocfs2/cluster: hold a reference on the heartbeat thread","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139797","datePublished":"2026-11-30T13:38:05.304Z","dateReserved":"2026-11-30T13:22:15.953Z","dateUpdated":"2026-11-30T13:38:05.304Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:20:14","lastModifiedDate":"2026-11-30 14:20:14","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139797","Ordinal":"1","Title":"ocfs2/cluster: hold a reference on the heartbeat thread","CVE":"CVE-2026-139797","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139797","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2/cluster: hold a reference on the heartbeat thread\n\nSince commit 688bc88e2046 (\"ocfs2/cluster: keep heartbeat local node\nstable\"), o2hb_thread() leaves its loop and returns when the local node\nchanges, for example after \"echo 0 > node/<name>/local\".  The thread was\nstarted with kthread_run() and nothing holds a reference to its\ntask_struct, so the task is freed once it exits, while reg->hr_task still\npoints to it.\n\nReading the region's pid attribute then reads the freed task, and removing\nthe region calls kthread_stop() on it:\n\n  BUG: KASAN: slab-use-after-free in o2hb_region_pid_show+0xb3/0xc0\n  refcount_t: addition on 0; use-after-free.\n  Oops: Oops: 0000 [#1] SMP KASAN NOPTI\n  RIP: 0010:kthread_stop+0xb1/0x390\n\nThe thread could already return by itself before, when heartbeat start was\naborted or on an unclean stop, but the local node change makes it\nreachable from userspace at any time.\n\nCreate the thread, take a reference on it and only then wake it, so the\nreference cannot race with the thread exiting.  Drop it with\nkthread_stop_put().","Type":"Description","Title":"ocfs2/cluster: hold a reference on the heartbeat thread"}]}}}