LiveActive security incident?Get immediate response
CVE Record

CVE-2025-38257: s390/pkey: Prevent overflow in size calculation for memdup_user()

In the Linux kernel, the following vulnerability has been resolved: s390/pkey: Prevent overflow in size calculation for memdup_user() Number of apqn target list entries contained in 'nr_apqns' variable is determined by userspace via an ioctl call so the result of the product in calculation of size passed to memdup_user() may overflow. In this case the actual size of the allocated area and the value describing it won't be in sync leading to various types of unpredictable behaviour later. Use a proper memdup_array_user() helper which returns an error if an overflow is detected. Note that it is different from when nr_apqns is initially zero - that case is considered valid and should be handled in subsequent pkey_handler implementations. Found by Linux Verification Center (linuxtesting.org).

HighCVSS 7.3Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A local, low-privileged user on an affected Linux s390 system may trigger an integer overflow in the protected-key subsystem. The resulting allocation mismatch can cause unpredictable kernel behavior, with potential service disruption, data exposure, or limited data modification. The issue is not described as remotely exploitable.

Executive priority

Treat this as high priority for multi-user or sensitive s390 environments because a low-privileged local actor could affect confidentiality and availability. Rapidly identify exposed s390 systems and schedule supported kernel updates. Organizations without s390 workloads should document non-exposure after verification rather than initiate broad emergency patching.

Technical view

The s390 pkey ioctl accepts a user-controlled APQN entry count. Multiplication used to size memdup_user() can overflow, leaving the allocation smaller than the recorded list size and creating unsafe behavior in later processing. The stable fix replaces this operation with memdup_array_user(), which detects overflow and returns an error.

Likely exposure

Exposure is concentrated on Linux systems using the s390 architecture and affected pkey code, particularly where low-privileged local users can invoke the relevant ioctl. Non-s390 systems are not implicated by the supplied description. The bundle's version data is ambiguous, so administrators should confirm distribution-specific backport status rather than rely solely on version numbers.

Exploitation context

The CVSS vector indicates local access, low privileges, low complexity, and no user interaction. The supplied bundle reports that this CVE is not in KEV and provides no evidence of active exploitation or a public exploit. Practical exploitation conditions and reliability are not established by these sources.

Researcher notes

The critical invariant is synchronization between the allocated APQN array size and nr_apqns. Overflow breaks that invariant before later pkey handlers consume the list. The fix deliberately preserves zero entries as valid while rejecting arithmetic overflow. The sources do not establish the precise resulting memory-safety primitive, exploitability, or affected configuration requirements.

Mitigation direction

  • Apply a vendor-supported kernel update containing the applicable stable fix for CVE-2025-38257.
  • Prioritize s390 systems that expose or use the pkey ioctl interface.
  • Follow distribution guidance for backported packages and required reboot procedures.
  • Reduce untrusted local account access until affected systems are updated.

Validation and detection

  • Confirm whether each system runs the s390 architecture and uses the pkey subsystem.
  • Record the running kernel build and compare it with vendor backport guidance.
  • Check whether the applicable stable fix is present in the deployed kernel source or package changelog.
  • After maintenance, confirm the patched kernel is installed and currently running.
  • Monitor vendor advisories for revised affected-version boundaries or exploitation information.
Prepared
Confidence
medium
Sources
9

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2025-38257 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.3 (3.1)
Known Exploited
No
Published

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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
1ADP providers
8Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.3CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H1.85.5Linux

Vulnerability scoring details

Base CVSS 3.1 score

7.3High
CVSS 3.1 vector shape for CVE-2025-38257Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CVECVE Program Container
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinuxf2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d, f2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d, f2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d, f2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d, f2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d, f2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553dunaffected
LinuxLinux5.4, 0, 5.15.187, 6.1.143, 6.6.96, 6.12.36, 6.15.5, 6.16affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.