VDB

CVE-2025-38257

CVE-2025-38257 PUBLISHED CVSS 7.3 HIGH

s390/pkey: Prevent overflow in size calculation for memdup_user()

Reported by linux · Published July 9, 2025

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).

Risk scores

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

Affected products

VendorProductVersions
LinuxLinuxf2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d, f2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d, f2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d
LinuxLinux5.4, 0, 5.15.187
linuxlinux_kernel5.4, 5.4, 5.4
LinuxLinux*, *, *

Timeline

  • Jul 8, 2025 CVE Published
  • Jul 9, 2025 EPSS Score (30 in total, the first dated here)
  • Oct 12, 2025 PoC Published (17 in total, the first dated here)
  • Mar 29, 2026 Distribution Patch (182 in total, the first dated here)
  • Mar 29, 2026 Security Advisory (190 in total, the first dated here)
  • Jun 9, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2025-38257
vulnetix vdb fixes CVE-2025-38257

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-38257/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›