CVE Database›Document archive›CVE-2025-39931

CVE-2025-39931

kernel: crypto: af_alg - Set merge to zero early in af_alg_sendmsg

Loading…

Severity

Moderate

Red Hat Product Security

6.1

CVSS 3.1

Review impact separately from score.

Published · October 4, 2025

Updated · July 30, 2026

Description

In the Linux kernel, the following vulnerability has been resolved:

crypto: af_alg - Set merge to zero early in af_alg_sendmsg

If an error causes af_alg_sendmsg to abort, ctx->merge may contain a garbage value from the previous loop. This may then trigger a crash on the next entry into af_alg_sendmsg when it attempts to do a merge that can't be done.

Fix this by setting ctx->merge to zero near the start of the loop.

Statement

The patch fixes a use of an uninitialized ctx->merge field in af_alg_sendmsg(). If a previous iteration aborted early, the next call could reuse a stale merge flag, causing the kernel to attempt merging data across invalid buffers, leading to crashes or memory corruption.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 6.1
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:H

CWE-457 · Use of Uninitialized Variable