mm/gup: fix out-of-bounds write for nr_pages == 0 in GUP-fast
NIST has received this entry but not started reviewing it.
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 ]
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable, 2 products in all. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Linux Linux | Software | from bcb0f647c1fae9496e6ce499618a8da003c56088, before 0452d6d24ee4d65226824bcbefaf187707b72ced; from c28b1fc70390df32e29991eedd52bd86e7aba080, before 6ac370032a68a343be599d8476ded2c36b43b53a; from c28b1fc70390df32e29991eedd52bd86e7aba080, before 21854ef8dc4e9398d84e4129db52dad69622fd9b; from c28b1fc70390df32e29991eedd52bd86e7aba080, before 32717a0763b2170eae5693fe4afbeecaa168ffdc; from c28b1fc70390df32e29991eedd52bd86e7aba080, before 11536b9b6bed3cc4d684a70d468493775e7d1d48; from c28b1fc70390df32e29991eedd52bd86e7aba080, before 0794c5809fa6322e8b43b70601700fd6c48e69ea; and 3 more | 0452d6d24ee4d65226824bcbefaf187707b72ced; 6ac370032a68a343be599d8476ded2c36b43b53a; 21854ef8dc4e9398d84e4129db52dad69622fd9b; 32717a0763b2170eae5693fe4afbeecaa168ffdc |
| Linux Linux | Software | 5.11 | not recorded |
The 7.8 severity score (high) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | On the machine | The attacker needs access to the computer itself, for example a login or a file they can get you to open. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Login needed | Low | The attacker needs an ordinary user account. |
| Someone has to act | None | Nobody has to click or open anything. It can happen on its own. |
| Reaches beyond the program | Unchanged | The damage stays inside the vulnerable program. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | High | The attacker can take the service down completely. |
| Ease of attack | 1.8 | A score for how easy it is to use the flaw. Higher is easier. |
| Damage | 5.9 | A score for how bad the harm is if it works. Higher is worse. |
NIST lists 8 sources for this flaw, none tagged as a vendor patch.