CVE-2026-99662
mm/gup: fix out-of-bounds write for nr_pages == 0 in GUP-fast
What happened?
In the Linux kernel, the following vulnerability has been resolved:
mm/gup: fix out-of-bounds write for nr_pages == 0 in GUP-fast
With nr_pages == 0, GUP-fast still enters its page table walk and can write past the caller's page array. The old end <= start check caught empty ranges, but was replaced with an overflow check.
Users such as OrangeFS can pass a zero page count derived from a userspace-supplied length. So let's return zero for nr_pages == 0 before starting the walk, just like GUP-slow.
Fix generated by an LLM and sent by Chris Mason in private.
[ david: simplify description ]
Affected software and versions
| Software | Version information | Fixed version |
|---|---|---|
| LinuxLinux | affected: bcb0f647c1fae9496e6ce499618a8da003c56088 to < 0452d6d24ee4d65226824bcbefaf187707b72ced; affected: c28b1fc70390df32e29991eedd52bd86e7aba080 to < 6ac370032a68a343be599d8476ded2c36b43b53a; affected: c28b1fc70390df32e29991eedd52bd86e7aba080 to < 21854ef8dc4e9398d84e4129db52dad69622fd9b; affected: c28b1fc70390df32e29991eedd52bd86e7aba080 to < 32717a0763b2170eae5693fe4afbeecaa168ffdc; affected: c28b1fc70390df32e29991eedd52bd86e7aba080 to < 11536b9b6bed3cc4d684a70d468493775e7d1d48; affected: c28b1fc70390df32e29991eedd52bd86e7aba080 to < 0794c5809fa6322e8b43b70601700fd6c48e69ea; affected: c28b1fc70390df32e29991eedd52bd86e7aba080 to < 5697a3b58722b15fcb06fb30368ce9f46458a95a; affected: c28b1fc70390df32e29991eedd52bd86e7aba080 to < 1dfe4b276c23189394afb42d114ee8a54cc3aff2; affected: 5.10.4 to < 5.10.275 | See vendor advisory |
| LinuxLinux | affected: 5.11; unaffected: 0 to < 5.11; unaffected: 5.10.275 to ≤ 5.10.*; unaffected: 5.15.226 to ≤ 5.15.*; unaffected: 6.1.193 to ≤ 6.1.*; unaffected: 6.6.163 to ≤ 6.6.*; unaffected: 6.12.118 to ≤ 6.12.*; unaffected: 6.18.64 to ≤ 6.18.*; unaffected: 7.3.5 to ≤ 7.3.*; unaffected: 7.4-rc2 to ≤ * | See vendor advisory |
Version information comes from the source record and can include unaffected products and exceptions. Distribution packages may contain backported fixes: an older upstream version alone does not prove a server is affected.
Is it being exploited?
This CVE was not listed in the CISA catalogue at our last retrieval. This does not establish that exploitation is absent.
How to respond
- Confirm the product, installed package version, and any configuration requirements in the vendor advisory.
- Follow the vendor’s remediation or workaround guidance in the references below. Structured fixed-version data is unavailable here; the publisher’s description may include a fix or workaround.
- Restart affected services if required, then verify the running version. Known exploitation may warrant investigation as well as patching.
Sources and remediation references
- https://www.cve.org/CVERecord?id=CVE-2026-99662
- https://git.kernel.org/stable/c/0452d6d24ee4d65226824bcbefaf187707b72ced
- https://git.kernel.org/stable/c/6ac370032a68a343be599d8476ded2c36b43b53a
- https://git.kernel.org/stable/c/21854ef8dc4e9398d84e4129db52dad69622fd9b
- https://git.kernel.org/stable/c/32717a0763b2170eae5693fe4afbeecaa168ffdc
- https://git.kernel.org/stable/c/11536b9b6bed3cc4d684a70d468493775e7d1d48
- https://git.kernel.org/stable/c/0794c5809fa6322e8b43b70601700fd6c48e69ea
- https://git.kernel.org/stable/c/5697a3b58722b15fcb06fb30368ce9f46458a95a
- https://git.kernel.org/stable/c/1dfe4b276c23189394afb42d114ee8a54cc3aff2