mm/gup: fix out-of-bounds write for nr_pages == 0 in GUP-fast
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 5697a3b58722b15fcb06fb30368ce9f46458a95a, Kernel 5.11, Kernel 0794c5809fa6322e8b43b70601700fd6c48e69ea and 5 more.
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
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=c28b1fc70390df32e29991eedd52bd86e7aba080 <5697a3b58722b15fcb06fb30368ce9f46458a95a, >=5.10.4 <5.11, >=c28b1fc70390df32e29991eedd52bd86e7aba080 <0794c5809fa6322e8b43b70601700fd6c48e69ea, >=c28b1fc70390df32e29991eedd52bd86e7aba080 <11536b9b6bed3cc4d684a70d468493775e7d1d48, >=c28b1fc70390df32e29991eedd52bd86e7aba080 <1dfe4b276c23189394afb42d114ee8a54cc3aff2, =5.11, =bcb0f647c1fae9496e6ce499618a8da003c56088 | 5697a3b58722b15fcb06fb30368ce9f46458a95a, 5.11, 0794c5809fa6322e8b43b70601700fd6c48e69ea, 11536b9b6bed3cc4d684a70d468493775e7d1d48, 1dfe4b276c23189394afb42d114ee8a54cc3aff2 |
| linux-kernel: Kernel | >=5.11.0 <6.12.118, >=6.13.0 <6.18.64, >=6.19.0 <7.3.5, >=5.10.4 <5.11 | 6.12.118, 6.18.64, 7.3.5, 5.11 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket