CVE-2025-38257 Details
Description
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).
A vulnerability in the Linux kernel's s390/pkey implementation allows for an overflow in the size calculation for the memdup_user() function. This issue arises because the 'nr_apqns' variable, which indicates the number of apqn target list entries, is determined by userspace through an ioctl call. The resulting product calculation for the size passed to memdup_user() can overflow, causing a mismatch between the allocated memory size and the expected value. This discrepancy may lead to various unpredictable behaviors. The vulnerability has been addressed by using a proper memdup_array_user() helper that returns an error if an overflow is detected, while still allowing valid cases to be handled in subsequent pkey_handler implementations.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Oct 15, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/73483ca7e07a5e39bdf612eec9d3d293e8bef649 | kernel.org | Patch |
| https://git.kernel.org/stable/c/7360ee47599af91a1d5f4e74d635d9408a54e489 | kernel.org | Patch |
| https://git.kernel.org/stable/c/88f3869649edbc4a13f6c2877091f81cd5a50f05 | kernel.org | Patch |
| https://git.kernel.org/stable/c/ad1bdd24a02d5a8d119af8e4cd50933780a6d29f | kernel.org | Patch |
| https://git.kernel.org/stable/c/f855b119e62b004a5044ed565f2a2b368c4d3f16 | kernel.org | Patch |
| https://git.kernel.org/stable/c/faa1ab4a23c42e34dc000ef4977b751d94d5148c | kernel.org | Patch |
| https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html | CVE | Mailing ListThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| NVD-CWE-noinfo | Insufficient Information to Classify Weakness | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 5.4, < 5.15.187 >= 5.16, < 6.1.143 >= 6.2, < 6.6.96 >= 6.7, < 6.12.36 >= 6.13, < 6.15.5 6.16 rc1 6.16 rc2 6.16 rc3 |
CPE
Remediation
| |
| debian debian linux | 11.0 |
CPE
Remediation
| |
Change History
9 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 15, 2026 | CVE Modified | CVE |
| Oct 15, 2026 | CVE Modified | CISA-ADP |
| Oct 15, 2026 | CVE Modified | kernel.org |
| Jul 30, 2026 | CVE Modified | kernel.org |
| Jun 17, 2026 | CVE Modified | kernel.org |
| Dec 18, 2025 | Initial Analysis | [email protected] |
| Nov 3, 2025 | CVE Modified | CVE |
| Jul 10, 2025 | CVE Modified | kernel.org |
| Jul 9, 2025 | New CVE Received | kernel.org |