CVE-2025-40019

Description

From CVE.org

In the Linux kernel, the following vulnerability has been resolved: crypto: essiv - Check ssize for decryption and in-place encryption Move the ssize check to the start in essiv_aead_crypt so that it's also checked for decryption and in-place encryption.

Statement

The ESSIV AEAD path failed to validate ssize = assoclen - ivsize for decryption and in-place encryption. A negative ssize could flow into scatterwalk_map_and_copy(), causing out-of-bounds writes/reads of the IV region and kernel crashes or memory corruption. The fix computes ivsize/ssize up front, rejects ssize < 0, and consistently uses these locals across branches, covering decrypt and in-place cases. Privilege required is local (e.g., reachable via kernel crypto consumers or AF_ALG setups), with primary impact on availability and potential integrity compromise. The system is not vulnerable if ESSIV is not in use (i.e. the essiv/aes-cbc-essiv implementation is not present or not being used by any disk/crypto consumer).

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score6.1N/AN/A
Attack VectorLocalN/AN/A
Attack ComplexityLowN/AN/A
Privileges RequiredLowN/AN/A
User InteractionNoneN/AN/A
ScopeUnchangedN/AN/A
ConfidentialityNoneN/AN/A
Integrity ImpactLowN/AN/A
Availability ImpactHighN/AN/A

Vector

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

Understanding the Weakness (CWE)

Integrity

Technical Impact: Modify Memory; Execute Unauthorized Code or Commands

Write operations could cause memory corruption. In some cases, an adversary can modify control data such as return addresses in order to execute unexpected code.

Availability

Technical Impact: DoS: Crash, Exit, or Restart

Attempting to access out-of-range, invalid, or unauthorized memory could cause the product to crash.

Other

Technical Impact: Unexpected State

Subsequent write operations can produce undefined or unexpected results.

Frequently Asked Questions

Want to get errata notifications? Sign up here.