# CVE-2026-46318: Revert "mm/hugetlbfs: update hugetlbfs to use mmap_prepare"

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.10%, higher than 0% of CVEs (2026-12-01)
- Published: 2026-06-09T12:11:11.181Z
- Modified: 2026-07-23T08:10:00.137Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

Revert "mm/hugetlbfs: update hugetlbfs to use mmap_prepare"

This reverts commit ea52cb24cd3f ("mm/hugetlbfs: update hugetlbfs to use
mmap_prepare") with conflict resolution to account for changes in commit
ea52cb24cd3f ("mm/hugetlbfs: update hugetlbfs to use mmap_prepare").

The patch incorrectly handled hugetlb VMA lock allocation at the
mmap_prepare stage, where a failed allocation occurring after mmap_prepare
is called might result in the lock leaking.

There is no risk of a merge causing a similar issues, as
VMA_DONTEXPAND_BIT is set for hugetlb mappings.

As a first step in addressing this issue, simply revert the change so we
can rework how we do this having corrected the underlying issues.

We maintain the VMA flags changes as best we can, accounting for the fact
that we were working with a VMA descriptor previously and propagating
like-for-like changes for this.

Note that we invoke vma_set_flags() and do not call vma_start_write() as
vm_flags_set() does.  This is OK as it's being done in an .mmap hook where
the VMA is not yet linked into the tree so nobody else can be accessing
it.

(As written by CVE List.)

## Affected

- Linux Linux: from ea52cb24cd3fb121283754ab82b2cb3044609359 before 3af5fc3f0ac98c624c109c8c0796fa46e814344c; from ea52cb24cd3fb121283754ab82b2cb3044609359 before 83f9efcce93f8574be2279090ee2aec58b86cda7; 6.19 (not affected: before 6.19; from 7.0.12 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 6.19 before 7.0.12; 7.1

## References

- <https://git.kernel.org/stable/c/3af5fc3f0ac98c624c109c8c0796fa46e814344c> (patch)
- <https://git.kernel.org/stable/c/83f9efcce93f8574be2279090ee2aec58b86cda7> (patch)

## Sources

- CVE List: [CVE-2026-46318](https://www.cve.org/CVERecord?id=CVE-2026-46318), CVE Terms of Use, modified 2026-06-14
- NVD: [CVE-2026-46318](https://nvd.nist.gov/vuln/detail/CVE-2026-46318), Public domain, modified 2026-07-23

---

Page: https://cve.day/CVE-2026-46318 · Whole record: https://cve.day/CVE-2026-46318.json · Rebuilt by cve.day 2026-11-25T22:59:24.096Z
