{"id":"CVE-2026-45837","aliases":["CVE-2026-45837"],"related":[],"kind":"vulnerability","state":"published","title":"bpf: Fix use-after-free in arena_vm_close on fork","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix use-after-free in arena_vm_close on fork\n\narena_vm_open() only bumps vml->mmap_count but never registers the\nchild VMA in arena->vma_list. The vml->vma always points at the\nparent VMA, so after parent munmap the pointer dangles. If the child\nthen calls bpf_arena_free_pages(), zap_pages() reads the stale\nvml->vma triggering use-after-free.\n\nFix this by preventing the arena VMA from being inherited across\nfork with VM_DONTCOPY, and preventing VMA splits via the may_split\ncallback.\n\nAlso reject mremap with a .mremap callback returning -EINVAL. A\nsame-size mremap(MREMAP_FIXED) on the full arena VMA reaches\ncopy_vma() through the following path:\n\n  check_prep_vma()       - returns 0 early: new_len == old_len\n                           skips VM_DONTEXPAND check\n  prep_move_vma()        - vm_start == old_addr and\n                           vm_end == old_addr + old_len\n                           so may_split is never called\n  move_vma()\n    copy_vma_and_data()\n      copy_vma()\n        vm_area_dup()    - copies vm_private_data (vml pointer)\n        vm_ops->open()   - bumps vml->mmap_count\n      vm_ops->mremap()   - returns -EINVAL, rollback unmaps new VMA\n\nThe refcount ensures the rollback's arena_vm_close does not free\nthe vml shared with the original VMA.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix use-after-free in arena_vm_close on fork\n\narena_vm_open() only bumps vml->mmap_count but never registers the\nchild VMA in arena->vma_list. The vml->vma always points at the\nparent VMA, so after parent munmap the pointer dangles. If the child\nthen calls bpf_arena_free_pages(), zap_pages() reads the stale\nvml->vma triggering use-after-free.\n\nFix this by preventing the arena VMA from being inherited across\nfork with VM_DONTCOPY, and preventing VMA splits via the may_split\ncallback.\n\nAlso reject mremap with a .mremap callback returning -EINVAL. A\nsame-size mremap(MREMAP_FIXED) on the full arena VMA reaches\ncopy_vma() through the following path:\n\n  check_prep_vma()       - returns 0 early: new_len == old_len\n                           skips VM_DONTEXPAND check\n  prep_move_vma()        - vm_start == old_addr and\n                           vm_end == old_addr + old_len\n                           so may_split is never called\n  move_vma()\n    copy_vma_and_data()\n      copy_vma()\n        vm_area_dup()    - copies vm_private_data (vml pointer)\n        vm_ops->open()   - bumps vml->mmap_count\n      vm_ops->mremap()   - returns -EINVAL, rollback unmaps new VMA\n\nThe refcount ensures the rollback's arena_vm_close does not free\nthe vml shared with the original VMA.","source":"cvelist"}],"published":"2026-05-27T09:24:32.833Z","modified":"2026-06-26T19:09:14.590Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"317460317a02a1af512697e6e964298dedd8a163","fixed":"723b9fa930cc277c15ce6b9ec9feec828cfac9d7","status":"affected"},{"type":"git","introduced":"317460317a02a1af512697e6e964298dedd8a163","fixed":"d18099f19e53250f8ad2801498b88cec29d9107a","status":"affected"},{"type":"git","introduced":"317460317a02a1af512697e6e964298dedd8a163","fixed":"201128fcc7b213d27ab77bc4e89488b41796480f","status":"affected"},{"type":"git","introduced":"317460317a02a1af512697e6e964298dedd8a163","fixed":"4fddde2a732de60bb97e3307d4eb69ac5f1d2b74","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.9","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.9","status":"unaffected"},{"type":"semver","introduced":"6.12.88","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.30","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.0.7","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.9","fixed":"6.12.88"},{"status":"affected","introduced":"6.13","fixed":"6.18.30"},{"status":"affected","introduced":"6.19","fixed":"7.0.7"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/723b9fa930cc277c15ce6b9ec9feec828cfac9d7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d18099f19e53250f8ad2801498b88cec29d9107a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/201128fcc7b213d27ab77bc4e89488b41796480f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4fddde2a732de60bb97e3307d4eb69ac5f1d2b74","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45837","url":"https://www.cve.org/CVERecord?id=CVE-2026-45837","licence":"CVE Terms of Use","modified":"2026-06-14T17:46:01.781Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45837","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45837","licence":"Public domain","modified":"2026-06-26T19:09:14.590Z"}],"updatedAt":"2026-11-25T22:59:22.457Z","epss":{"score":0.00116,"percentile":0.01796,"date":"2026-12-01T12:00:22.000Z"}}