AZL-117337: CVE-2026-139768 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
dlm: fix buffer overflow from negative len in dlmsearchrsbtree
commit 080e5563f878c ("dlm: validate length in dlmsearchrsbtree") only checks for len > DLMRESNAMEMAXLEN, 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 sizet, 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 > DLMRESNAMEMAXLEN check.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Change the `len` parameter type from `int` to `unsigned int` so negative values are converted to large unsigned values and caught by the existing `len > DLM_RESNAME_MAXLEN` check.
Event History
Frequently Asked Questions
What input condition is required to trigger the overflow?
A caller must pass a negative resource-name length to dlm_search_rsb_tree. The signed negative value can be converted to a large size_t when passed to memcpy(), overflowing the stack-based key[] buffer.
Why did the existing length validation not prevent this?
The existing check rejected lengths greater than DLM_RESNAME_MAXLEN but did not reject negative signed integers. Changing the parameter to unsigned int causes negative caller values to become large unsigned values, which the existing maximum-length check catches.