7.8high
io_uring/memmap: cast nr_pages to size_t before shifting
- Severity
- 7.8high CVSS:3.1 by Linux
- Exploit likelihood
- 0.16% (higher than 5% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: io_uring/memmap: cast nr_pages to size_t before shifting If the allocated size exceeds UINT_MAX, then it's necessary to cast the mr->nr_pages value to size_t to prevent it from overflowing. In practice this isn't much of a concern as the required memory size will have been validated upfront, and accounted to the user. And > 4GB sizes will be necessary to make the lack of a cast a problem, which greatly exceeds normal user locked_vm settings that are generally in the kb to mb range. However, if root is used, then accounting isn't done, and then it's possible to hit this issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 087f997870a948820ec366701d178f402c6a23a3 before c6a2706e08b8a1b2d3740161c0977d38e596c1ee, from 087f997870a948820ec366701d178f402c6a23a3 before a69a9b53c54e2d33e2a5b1ea4a9a71fd01c6cf3a, from 087f997870a948820ec366701d178f402c6a23a3 before 33503c083fda048c77903460ac0429e1e2c0e341, 6.14 Not affected: before 6.14, from 6.15.11 up to 6.15.*, from 6.16.2 up to 6.16.*, from 6.17 up to * | CVE List |
| linux linux_kernel | from 6.14 before 6.15.11, from 6.16 before 6.16.2 | NVD |
All scores
| Linux | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: io_uring/memmap: cast nr_pages to size_t before shifting If the allocated size exceeds UINT_MAX, then it's necessary to cast the mr->nr_pages value to size_t to prevent it from overflowing. In practice this isn't much of a concern as the required memory size will have been validated upfront, and accounted to the user. And > 4GB sizes will be necessary to make the lack of a cast a problem, which greatly exceeds normal user locked_vm settings that are generally in the kb to mb range. However, if root is used, then accounting isn't done, and then it's possible to hit this issue.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: io_uring/memmap: convertir nr_pages a size_t antes de desplazar Si el tamaño asignado excede UINT_MAX, entonces es necesario convertir el valor mr->nr_pages a size_t para evitar que desborde. En la práctica, esto no es motivo de gran preocupación, ya que el tamaño de memoria requerido habrá sido validado previamente y contabilizado al usuario. Y tamaños > 4GB serán necesarios para que la falta de una conversión sea un problema, lo que excede en gran medida la configuración normal de locked_vm del usuario, que generalmente está en el rango de kb a mb. Sin embargo, si se usa root, entonces la contabilidad no se realiza, y entonces es posible encontrarse con este problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-39793 changed 2026-08-05 | CVE Terms of Use |
| NVD | CVE-2025-39793 changed 2026-10-19 | Public domain |