# CVE-2026-45837: bpf: Fix use-after-free in arena_vm_close on fork

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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.12%, higher than 1% of CVEs (2026-12-01)
- Published: 2026-05-27T09:24:32.833Z
- Modified: 2026-06-26T19:09:14.590Z
- Weaknesses: CWE-416
- Assigned by: Linux

## Description

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

bpf: Fix use-after-free in arena_vm_close on fork

arena_vm_open() only bumps vml->mmap_count but never registers the
child VMA in arena->vma_list. The vml->vma always points at the
parent VMA, so after parent munmap the pointer dangles. If the child
then calls bpf_arena_free_pages(), zap_pages() reads the stale
vml->vma triggering use-after-free.

Fix this by preventing the arena VMA from being inherited across
fork with VM_DONTCOPY, and preventing VMA splits via the may_split
callback.

Also reject mremap with a .mremap callback returning -EINVAL. A
same-size mremap(MREMAP_FIXED) on the full arena VMA reaches
copy_vma() through the following path:

  check_prep_vma()       - returns 0 early: new_len == old_len
                           skips VM_DONTEXPAND check
  prep_move_vma()        - vm_start == old_addr and
                           vm_end == old_addr + old_len
                           so may_split is never called
  move_vma()
    copy_vma_and_data()
      copy_vma()
        vm_area_dup()    - copies vm_private_data (vml pointer)
        vm_ops->open()   - bumps vml->mmap_count
      vm_ops->mremap()   - returns -EINVAL, rollback unmaps new VMA

The refcount ensures the rollback's arena_vm_close does not free
the vml shared with the original VMA.

(As written by CVE List.)

## Affected

- Linux Linux: from 317460317a02a1af512697e6e964298dedd8a163 before 723b9fa930cc277c15ce6b9ec9feec828cfac9d7; from 317460317a02a1af512697e6e964298dedd8a163 before d18099f19e53250f8ad2801498b88cec29d9107a; from 317460317a02a1af512697e6e964298dedd8a163 before 201128fcc7b213d27ab77bc4e89488b41796480f; from 317460317a02a1af512697e6e964298dedd8a163 before 4fddde2a732de60bb97e3307d4eb69ac5f1d2b74; 6.9 (not affected: before 6.9; from 6.12.88 up to 6.12.*; from 6.18.30 up to 6.18.*; from 7.0.7 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 6.9 before 6.12.88; from 6.13 before 6.18.30; from 6.19 before 7.0.7

## References

- <https://git.kernel.org/stable/c/723b9fa930cc277c15ce6b9ec9feec828cfac9d7> (patch)
- <https://git.kernel.org/stable/c/d18099f19e53250f8ad2801498b88cec29d9107a> (patch)
- <https://git.kernel.org/stable/c/201128fcc7b213d27ab77bc4e89488b41796480f> (patch)
- <https://git.kernel.org/stable/c/4fddde2a732de60bb97e3307d4eb69ac5f1d2b74> (patch)

## Sources

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

---

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