CVE-2026-139768

dlm: fix buffer overflow from negative len in dlm_search_rsb_tree

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability is a stack-based buffer overflow in the DLM subsystem of the Linux kernel caused by the absence of a check for negative length values in dlm_search_rsb_tree. A caller can supply a negative integer for the len parameter, and on assignment to memcpy the negative value is implicitly converted to a very large unsigned size_t, causing more data to be copied into the key[] buffer than it can hold. This overflow corrupts the kernel stack and may allow an attacker to execute arbitrary code in kernel mode. As the flaw occurs in a core kernel routine, any Linux kernel built without the commit that changes the len parameter from int to unsigned is subject to the issue. Distribution kernels that have not incorporated this patch are vulnerable regardless of the distribution version. The entry provides no CVSS score or EPSS value and is not listed in the CISA KEV catalog. While no public exploits are known, a local attacker who can invoke the vulnerable function with a negative length argument could potentially leverage the overflow to gain elevated privileges; with sufficient skill a remote execution vector might also be engineered. The exploitability hinges on the ability to provide a negative length, typically requiring local code execution or privileged access to the DLM interface.

Affected Systems

All Linux kernels compiled before the upstream commit that changed the len parameter from int to unsigned are affected. Since the affected code resides in core kernel logic, any distribution whose kernel includes the older DLM implementation is at risk, regardless of the distribution version. No specific kernel version list is provided, so the safest assumption is that any kernel lacking the fix is vulnerable.

Risk and Exploitability

The data set does not supply a CVSS score, and the EPSS value is unknown. The flaw is not currently listed in the KEV catalog and no publicly known exploits are available, but the nature of a stack buffer overflow in the kernel gives a powerful local attacker a path to privilege escalation, and a highly skilled attacker could potentially advance to remote code execution on the host. The attack requires the ability to invoke the vulnerable function with a negative length argument, which typically implies local code execution or privileged access to the kernel module interface. In the absence of an identified exploitation vector, the estimated likelihood of exploitation remains uncertain but warrants immediate remediation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a kernel that includes the commit changing len to unsigned (any release after 080e5563f878c).
  • If the DLM subsystem is not required, disable it by compiling the kernel with CONFIG_DLM disabled.
  • If an upgrade is not yet possible, copy the upstream patch into the current kernel source tree, rebuild, and load the patched module.

Generated by OpenCVE AI on December 1, 2026 at 02:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-119
Type Values Removed Values Added
Description 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.
Title dlm: fix buffer overflow from negative len in dlm_search_rsb_tree
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:37 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:20 PM
Modified
Nov 30, 2026, 2:20 PM