{"id":"CVE-2026-99432","state":"PUBLISHED","title":"ocfs2/dlm: hold the lookup reference across convert AST enqueue","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2/dlm: hold the lookup reference across convert AST enqueue\n\ndlm_convert_lock_handler() drops the reference it took when it found the\nlock on res->granted at its leave label, one statement before it calls\ndlm_queue_ast().  dlm_free_dead_locks() takes res->spinlock and drops the\nlist and base references, so a peer death landing in that gap leaves the\nhandler's own put as the one that frees the lock, and __dlm_queue_ast()\nthen reads lock->lockres from freed memory.\n\nThe handler is registered next to dlm_create_lock_handler(), so a convert\nmessage buffered on a dying peer's socket arrives on the same o2net\nreceive work that o2net_disconnect_node() does not wait for.  The two can\ninterleave as follows, with the reference counts as they are before this\nfix:\n\n  Socket data-ready       Node-down thread      Receive worker\n  -----------------       ----------------      --------------\n  o2net_data_ready()\n    select sc under\n    callback read lock\n                          o2net_disconnect_node()\n                            queue shutdown\n                            begin flush; new color\n    queue sc_rx_work\n    in the new color\n    release callback lock\n                            shutdown socket\n                            flush returns\n                                                read buffered convert_lock\n                                                dlm_convert_lock_handler()\n                                                  find lock on res->granted\n                                                  dlm_lock_get()  refs = 3\n                                                  lock res->spinlock\n                                                  __dlmconvert_master()\n                                                    call_ast = 1\n                                                  unlock res->spinlock\n                          DLM node-down cleanup\n                            lock res->spinlock\n                            dlm_free_dead_locks()\n                              unlink lock\n                              put list ref  refs = 2\n                              put base ref  refs = 1\n                            unlock res->spinlock\n                                                dlm_lock_put()  refs = 0\n                                                  free lock\n                                                dlm_queue_ast()\n                                                  __dlm_queue_ast()\n                                                  read lock->lockres\n                                                  (use-after-free)\n\n__dlmconvert_master() only moves the lock between lists, so the count\nentering the gap is base, list and lookup.  Drop the lookup reference\nafter the AST is queued instead of before it and the race ends with the\none __dlm_queue_ast() took, which dlm_flush_asts() releases later with\nast_pending cleared and ast_list unlinked.  No extra get is needed, and\nthe normal case ends with the same count as before.\n\ndlmconvert_master() has the same shape but is only reached from dlmlock()\nfor a lock this node owns, which dlm_free_dead_locks() never matches.","publishedAt":"2026-11-19T14:41:07.290Z","updatedAt":"2026-11-22T11:08:15.093Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2c5c54aca9d0263f81bd4886232835ba31f7635a","status":"affected","lessThan":"ecc5b17b8d2b1f720262e991896da2c909154a4d","versionType":"git"},{"version":"2c5c54aca9d0263f81bd4886232835ba31f7635a","status":"affected","lessThan":"a3dd8d3af023837516d8715393acbaa7b252f6d7","versionType":"git"},{"version":"2c5c54aca9d0263f81bd4886232835ba31f7635a","status":"affected","lessThan":"574aa7782c780b130463e1d7c0605a9e617880d1","versionType":"git"},{"version":"2c5c54aca9d0263f81bd4886232835ba31f7635a","status":"affected","lessThan":"125fe08ff6cfa064e1212f586f01993ee45c0330","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ocfs2/dlm/dlmconvert.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.25","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.25","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.61","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.2","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ocfs2/dlm/dlmconvert.c"]}],"references":["https://git.kernel.org/stable/c/ecc5b17b8d2b1f720262e991896da2c909154a4d","https://git.kernel.org/stable/c/a3dd8d3af023837516d8715393acbaa7b252f6d7","https://git.kernel.org/stable/c/574aa7782c780b130463e1d7c0605a9e617880d1","https://git.kernel.org/stable/c/125fe08ff6cfa064e1212f586f01993ee45c0330"],"weaknesses":[],"ingestedAt":"2026-11-22T11:18:06.032Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/99xxx/CVE-2026-99432.json","commit":"247cc9beefd85903834df0592e88a44f4d599223","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99432","state":"PUBLISHED","datePublished":"2026-11-19T14:41:07.290Z","dateUpdated":"2026-11-22T11:08:15.093Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.415Z"},"containers":{"cna":{"title":"ocfs2/dlm: hold the lookup reference across convert AST enqueue","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2/dlm: hold the lookup reference across convert AST enqueue\n\ndlm_convert_lock_handler() drops the reference it took when it found the\nlock on res->granted at its leave label, one statement before it calls\ndlm_queue_ast().  dlm_free_dead_locks() takes res->spinlock and drops the\nlist and base references, so a peer death landing in that gap leaves the\nhandler's own put as the one that frees the lock, and __dlm_queue_ast()\nthen reads lock->lockres from freed memory.\n\nThe handler is registered next to dlm_create_lock_handler(), so a convert\nmessage buffered on a dying peer's socket arrives on the same o2net\nreceive work that o2net_disconnect_node() does not wait for.  The two can\ninterleave as follows, with the reference counts as they are before this\nfix:\n\n  Socket data-ready       Node-down thread      Receive worker\n  -----------------       ----------------      --------------\n  o2net_data_ready()\n    select sc under\n    callback read lock\n                          o2net_disconnect_node()\n                            queue shutdown\n                            begin flush; new color\n    queue sc_rx_work\n    in the new color\n    release callback lock\n                            shutdown socket\n                            flush returns\n                                                read buffered convert_lock\n                                                dlm_convert_lock_handler()\n                                                  find lock on res->granted\n                                                  dlm_lock_get()  refs = 3\n                                                  lock res->spinlock\n                                                  __dlmconvert_master()\n                                                    call_ast = 1\n                                                  unlock res->spinlock\n                          DLM node-down cleanup\n                            lock res->spinlock\n                            dlm_free_dead_locks()\n                              unlink lock\n                              put list ref  refs = 2\n                              put base ref  refs = 1\n                            unlock res->spinlock\n                                                dlm_lock_put()  refs = 0\n                                                  free lock\n                                                dlm_queue_ast()\n                                                  __dlm_queue_ast()\n                                                  read lock->lockres\n                                                  (use-after-free)\n\n__dlmconvert_master() only moves the lock between lists, so the count\nentering the gap is base, list and lookup.  Drop the lookup reference\nafter the AST is queued instead of before it and the race ends with the\none __dlm_queue_ast() took, which dlm_flush_asts() releases later with\nast_pending cleared and ast_list unlinked.  No extra get is needed, and\nthe normal case ends with the same count as before.\n\ndlmconvert_master() has the same shape but is only reached from dlmlock()\nfor a lock this node owns, which dlm_free_dead_locks() never matches."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2c5c54aca9d0263f81bd4886232835ba31f7635a","status":"affected","lessThan":"ecc5b17b8d2b1f720262e991896da2c909154a4d","versionType":"git"},{"version":"2c5c54aca9d0263f81bd4886232835ba31f7635a","status":"affected","lessThan":"a3dd8d3af023837516d8715393acbaa7b252f6d7","versionType":"git"},{"version":"2c5c54aca9d0263f81bd4886232835ba31f7635a","status":"affected","lessThan":"574aa7782c780b130463e1d7c0605a9e617880d1","versionType":"git"},{"version":"2c5c54aca9d0263f81bd4886232835ba31f7635a","status":"affected","lessThan":"125fe08ff6cfa064e1212f586f01993ee45c0330","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ocfs2/dlm/dlmconvert.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.25","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.25","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.61","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.2","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ocfs2/dlm/dlmconvert.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/ecc5b17b8d2b1f720262e991896da2c909154a4d"},{"url":"https://git.kernel.org/stable/c/a3dd8d3af023837516d8715393acbaa7b252f6d7"},{"url":"https://git.kernel.org/stable/c/574aa7782c780b130463e1d7c0605a9e617880d1"},{"url":"https://git.kernel.org/stable/c/125fe08ff6cfa064e1212f586f01993ee45c0330"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - DLM_CONVERT_LOCK_MSG is the input. o2net_data_ready queues sc_rx_work on the peer TCP socket, o2net_advance_rx reads the buffered convert, and o2net_process_message calls dlm_convert_lock_handler. o2net_open_listening_sock binds that socket with PF_INET/IPPROTO_TCP, so the message is routable IP rather than a local syscall.\nAC:L - A joined peer that already holds the lock on res->granted sends a downconvert, which makes __dlmconvert_master set call_ast, then stops heartbeat. o2net_hb_node_down_cb flushes o2net_wq while that convert is still buffered, and dlm_hb_node_down_cb then runs dlm_free_dead_locks; the same peer produces both sides and can repeat the attempt.\nPR:L - o2net_accept_one rejects source addresses that o2nm_get_node_by_ip does not know and nodes that fail o2hb_check_node_heartbeating_from_callback. dlm_convert_lock_handler then matches cnv->cookie and cnv->node_idx to a lock already on res->granted, so the sender must already be that heartbeating cluster member.\nUI:N - The member sends DLM_CONVERT_LOCK_MSG and stops its own heartbeat. dlm_convert_lock_handler runs on the receive work with no mount, open, or other action by a user on the victim.\nS:U - The freed object is the victim kernel's struct dlm_lock from dlm_lock_cache. The fault stays in that host kernel; it is not a guest-to-host or IOMMU boundary crossing.\nC:H - __dlm_queue_ast reads lock->lockres after dlm_lock_release has kmem_cache_free'd the lock and kfree'd the kernel lksb from dlm_create_lock_handler. dlm_flush_asts reads lock->lksb on that freed object, and a reuse of the o2dlm_lock slot before the flush returns the replacement object's fields.\nI:H - __dlm_queue_ast writes the freed lock: dlm_lock_get bumps lock_refs, list_add_tail links lock->ast_list into dlm->pending_asts, and ast_pending is set. dlm_flush_asts then walks that dangling list, so the use-after-free is a write into the o2dlm_lock cache, not a pure NULL deref.\nA:H - dlm_lock_detach_lockres clears lock->lockres before the free, so the later dlm_update_lvb and dlm_lockres_release_ast calls from dlm_flush_asts dereference NULL and oops. The same dangling ast_list entry crashes if the slab slot is reused underneath the DLM thread."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-22T11:08:15.093Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"6.12.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"6.18.61"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"7.3.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}