Introducing Wiz for Exposure Management: Unify, prioritize, and remediate exposures everywhere.

CVE-2025-38257
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-38257 is a vulnerability discovered in the Linux kernel affecting the s390/pkey component, specifically related to size calculation for memdup_user(). The vulnerability was disclosed on July 9, 2025, and was identified by the Linux Verification Center (linuxtesting.org) (NVD).

Technical details

The vulnerability stems from an overflow issue in size calculation for memdupuser(). The number of apqn target list entries contained in 'nrapqns' variable is determined by userspace via an ioctl call, which can cause the product calculation of size to overflow. When this occurs, the actual size of the allocated area becomes inconsistent with its describing value, leading to unpredictable behavior. The vulnerability has been assigned a CVSS v3.1 base score of 5.5 (Moderate) with the vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (Red Hat).

Impact

When exploited, this vulnerability can lead to unpredictable system behavior due to the mismatch between the allocated memory area size and its descriptor value. The impact is primarily focused on system availability, as indicated by the CVSS metrics showing high impact on availability but no impact on confidentiality or integrity (Red Hat).

Mitigation and workarounds

The fix involves implementing a proper memduparrayuser() helper that returns an error if an overflow is detected. It's worth noting that when nrapqns is initially zero, this is considered a valid case and should be handled in subsequent pkeyhandler implementations (NVD).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management