{"id":"CVE-2025-38257","published":"2025-07-09T10:42:34Z","modified":"2026-10-15T21:52:12Z","title":"s390/pkey: Prevent overflow in size calculation for memdup_user()","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\ns390/pkey: Prevent overflow in size calculation for memdup_user()\n\nNumber of apqn target list entries contained in 'nr_apqns' variable is\ndetermined by userspace via an ioctl call so the result of the product in\ncalculation of size passed to memdup_user() may overflow.\n\nIn this case the actual size of the allocated area and the value\ndescribing it won't be in sync leading to various types of unpredictable\nbehaviour later.\n\nUse a proper memdup_array_user() helper which returns an error if an\noverflow is detected. Note that it is different from when nr_apqns is\ninitially zero - that case is considered valid and should be handled in\nsubsequent pkey_handler implementations.\n\nFound by Linux Verification Center (linuxtesting.org).","provenance":"source","from":"CVE.org"},"cvss":{"score":7.3,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00293,"percentile":0.14404,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/ad1bdd24a02d5a8d119af8e4cd50933780a6d29f","tags":[]},{"url":"https://git.kernel.org/stable/c/faa1ab4a23c42e34dc000ef4977b751d94d5148c","tags":[]},{"url":"https://git.kernel.org/stable/c/88f3869649edbc4a13f6c2877091f81cd5a50f05","tags":[]},{"url":"https://git.kernel.org/stable/c/f855b119e62b004a5044ed565f2a2b368c4d3f16","tags":[]},{"url":"https://git.kernel.org/stable/c/73483ca7e07a5e39bdf612eec9d3d293e8bef649","tags":[]},{"url":"https://git.kernel.org/stable/c/7360ee47599af91a1d5f4e74d635d9408a54e489","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":[]}],"priority":{"score":8.0,"factors":[{"name":"EPSS percentile","points":2.88},{"name":"CVSS severity","points":5.11}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= f2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d, < ad1bdd24a02d5a8d119af8e4cd50933780a6d29f",">= f2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d, < faa1ab4a23c42e34dc000ef4977b751d94d5148c",">= f2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d, < 88f3869649edbc4a13f6c2877091f81cd5a50f05",">= f2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d, < f855b119e62b004a5044ed565f2a2b368c4d3f16",">= f2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d, < 73483ca7e07a5e39bdf612eec9d3d293e8bef649",">= f2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d, < 7360ee47599af91a1d5f4e74d635d9408a54e489"]},{"vendor":"Linux","product":"Linux","versions":["5.4"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-10-15T21:49:06.214372Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-20804","exploited":false,"provenance":"source"}}