mm: fix unmap_mapping_range() beyond 4 GiB on 32-bit
NIST has received this entry but not started reviewing it.
In the Linux kernel, the following vulnerability has been resolved: mm: fix unmap_mapping_range() beyond 4 GiB on 32-bit Commit 9eab0421fa94 ("mm: fix unmap_mapping_range high bits shift bug") made holebegin and holelen unsigned before they are shifted, by casting them to pgoff_t. That is an unsigned long: on a 32-bit kernel the cast cuts off the upper half of the two loff_t values, so a hole which begins at 4 GiB or beyond is taken for one in the first 4 GiB of the file. truncate_pagecache() passes the new size of the file and asks for private COWed pages to be unmapped as well. If a file of 6 GiB is truncated to 5 GiB, everything from 1 GiB on is unmapped, and what a process has written to a private mapping of the range between 1 GiB and 5 GiB is lost: it reads the contents of the file again. Where the range has an end, the wrong range is unmapped instead of the right one. The page cache copes with that, as it unmaps every folio that it removes. The callers which only have unmap_mapping_range() to get rid of user mappings do not, for example drm_vma_node_unmap(), whose fake offsets reach beyond 4 GiB on 32-bit, and revoke_iomem() with physical addresses of more than 32 bits. Cast to u64 instead. Nothing changes for 64-bit kernels. Fix generated by an LLM and sent by Josef Bacik in private.
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 73704c6b35c7682fd22f97992a68b0e8451c7a52, before aeaa0d4e301c5d2d97ba40603f899abe4e118572; from 91432aebce514cab49f63324c98b4eccb80532c5, before 273121718c4c79ac0dd044d5f7998f21854b7cd6; from dafdeb7b91f1597983693a418c496b6702ea34b5, before aff28bb139a69437922311e4078f77dc92d54831; from 2247df454c7bb4b13939794fe6fae8510868d241, before 119bb87a630d25d61ed77738c73a4ba743f8e410; from 9eab0421fa94a3dde0d1f7e36ab3294fc306c99d, before cbf6c66a2ef46433092b41b87176755de32bf65b; from 9eab0421fa94a3dde0d1f7e36ab3294fc306c99d, before 0cf8d3fdd869fe079e55f8e621e45397a819d93c; and 10 more | aeaa0d4e301c5d2d97ba40603f899abe4e118572; 273121718c4c79ac0dd044d5f7998f21854b7cd6; aff28bb139a69437922311e4078f77dc92d54831; 119bb87a630d25d61ed77738c73a4ba743f8e410 |
| Linux Linux | Software | 6.7 | 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.