In the Linux kernel, the following vulnerability has been resolved:
dlm: fix buffer overflow from negative len in dlm_search_rsb_tree
commit 080e5563f878c ("dlm: validate length in dlm_search_rsb_tree")
only checks for len > DLM_RESNAME_MAXLEN, which does not catch negative
values. While the input 'len' can be negative and a negative int passed
to memcpy() is implicitly converted to a large size_t, causing a stack
buffer overflow on the key[] array.
Fix this by changing the 'len' parameter type from int to unsigned int.
This ensures negative values from callers are implicitly converted to
large unsigned values that are caught by the existing
len > DLM_RESNAME_MAXLEN check.
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 9.8
AV:N - A DLM peer sends, over lowcomms TCP 21064 or SCTP, a version-3.1 DLM_RCOM_LOOKUP whose rc_header.h_length is 32-47. dlm_midcomms_receive_buffer_3_1 passes RCOM on without a sizeof(struct dlm_rcom) check, so receive_rcom_lookup computes len = h_length - 48 < 0 and hands it through dlm_dump_rsb_name to dlm_search_rsb_tree.
AC:L - The sender sets every input itself: 3.1 framing on its own first message while node->version is unset (first contact, or after its own leave/FIN reset), rc_id 0xFFFFFFFF, and the short h_length. The DLM_RS_NODES/DLM_RS_DIR gate in dlm_receive_rcom stays set once recovery finishes, so any steady-state lockspace accepts the message with no race.
PR:N - accept_from_sock admits a connection only by addr_to_nodeid on the peer IP and ignores the source port. Neither midcomms nor dlm_receive_rcom authenticates the sender before receive_rcom_lookup, so no credential on the target is needed. This matches CVE-2026-43125, which reaches the same function through the same path.
UI:N - The overflow happens in the dlm_recv worker while it processes the received RCOM_LOOKUP for an active lockspace (GFS2, OCFS2, lvmlockd). No local user action is involved.
S:U - The corruption or BUG is confined to the kernel that parses the message. No hypervisor, IOMMU or other authority boundary is crossed.
C:H - On kernels without FORTIFY_SOURCE (the Kconfig default), memcpy(key, name, (size_t)-16) in dlm_search_rsb_tree runs away over the dlm_recv kworker stack, starting with peer-supplied rc_buf and receive-buffer bytes. Following the runaway-memcpy precedent, this corruption is treated as usable for disclosure.
I:H - The same runaway copy overwrites saved frames above the 64-byte stack array key[] with attacker-supplied bytes from the DLM receive buffer. That is an out-of-bounds kernel stack write of attacker-controlled data.
A:H - With FORTIFY_SOURCE, the fixed 64-byte key[] makes fortify_panic BUG(). Without it, the copy faults at the stack guard. Either way the dlm_recv worker dies holding rcu_read_lock and ls_recv_active, crashing or hanging the cluster node, and a peer can repeat it on every reconnect.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
None |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:N - A DLM peer sends, over lowcomms TCP 21064 or SCTP, a version-3.1 DLM_RCOM_LOOKUP whose rc_header.h_length is 32-47. dlm_midcomms_receive_buffer_3_1 passes RCOM on without a sizeof(struct dlm_rcom) check, so receive_rcom_lookup computes len = h_length - 48 < 0 and hands it through dlm_dump_rsb_name to dlm_search_rsb_tree.
AC:L - The sender sets every input itself: 3.1 framing on its own first message while node->version is unset (first contact, or after its own leave/FIN reset), rc_id 0xFFFFFFFF, and the short h_length. The DLM_RS_NODES/DLM_RS_DIR gate in dlm_receive_rcom stays set once recovery finishes, so any steady-state lockspace accepts the message with no race.
PR:N - accept_from_sock admits a connection only by addr_to_nodeid on the peer IP and ignores the source port. Neither midcomms nor dlm_receive_rcom authenticates the sender before receive_rcom_lookup, so no credential on the target is needed. This matches CVE-2026-43125, which reaches the same function through the same path.
UI:N - The overflow happens in the dlm_recv worker while it processes the received RCOM_LOOKUP for an active lockspace (GFS2, OCFS2, lvmlockd). No local user action is involved.
S:U - The corruption or BUG is confined to the kernel that parses the message. No hypervisor, IOMMU or other authority boundary is crossed.
C:H - On kernels without FORTIFY_SOURCE (the Kconfig default), memcpy(key, name, (size_t)-16) in dlm_search_rsb_tree runs away over the dlm_recv kworker stack, starting with peer-supplied rc_buf and receive-buffer bytes. Following the runaway-memcpy precedent, this corruption is treated as usable for disclosure.
I:H - The same runaway copy overwrites saved frames above the 64-byte stack array key[] with attacker-supplied bytes from the DLM receive buffer. That is an out-of-bounds kernel stack write of attacker-controlled data.
A:H - With FORTIFY_SOURCE, the fixed 64-byte key[] makes fortify_panic BUG(). Without it, the copy faults at the stack guard. Either way the dlm_recv worker dies holding rcu_read_lock and ls_recv_active, crashing or hanging the cluster node, and a peer can repeat it on every reconnect.
CVSS 3.1