CVE-2026-45837

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

State
Published
Severity
Not scored
Published
May 27, 2026
Updated
Jun 14, 2026
Reserved
May 13, 2026

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 317460317a02a1af512697e6e964298dedd8a163 to before 723b9fa930cc277c15ce6b9ec9feec828cfac9d7Affected
  • 317460317a02a1af512697e6e964298dedd8a163 to before d18099f19e53250f8ad2801498b88cec29d9107aAffected
  • 317460317a02a1af512697e6e964298dedd8a163 to before 201128fcc7b213d27ab77bc4e89488b41796480fAffected
  • 317460317a02a1af512697e6e964298dedd8a163 to before 4fddde2a732de60bb97e3307d4eb69ac5f1d2b74Affected
LinuxLinux
  • 6.9Affected
  • before 6.9Not affected
  • 6.12.88 through 6.12.*Not affected
  • 6.18.30 through 6.18.*Not affected
  • 7.0.7 through 7.0.*Not affected
  • 7.1 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.