Skip to content
Medium 5.5

bpf: arena: Allocate the fault-in page outside the lock

CVE-2026-139547 First seen on SecPulse

Affected packages

PackageAffected → Fixed
LinuxLinux —
LinuxKernel
< 7.3.6→ 7.3.6

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

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

bpf: arena: Allocate the fault-in page outside the lock

arena_vm_fault() allocated the page while holding arena->spinlock, so it
could only use the non-blocking allocator, which never reclaims. Once the
memcg is at memory.max that allocation just fails, the fault turns into
VM_FAULT_SIGSEGV, and the process gets a SIGSEGV on a perfectly valid
arena address. Hitting memory.max is routine (e.g. page cache from
reading a big file), so this kills innocent processes over memory that
reclaim could have freed.

Rework the fault handler:

  • Preallocate the page before taking the lock, like do_anonymous_page()
    does, so it can sleep and reclaim, instead of turning a routine
    memory.max into a fake segfault. The allocation uses
    __GFP_RETRY_MAYFAIL so it never invokes the OOM killer: the page is
    charged to the map's memcg, which need not be the faulting task's, so
    an OOM there could kill unrelated tasks in the map's cgroup while a
    foreign faulter could never be its victim. map->numa_node is always
    NUMA_NO_NODE for an arena (BPF_F_NUMA_NODE is rejected), so the page
    comes from the local node, as before.

  • On allocation failure fall through to the locked recheck rather than
    failing right away: a page a concurrent allocator installed meanwhile
    is used, otherwise the non-blocking fallback fails and we return
    VM_FAULT_SIGBUS. Not VM_FAULT_OOM: nothing ran the OOM killer, and the
    fault path would just…

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details