CVE-2024-49861: bpf: Fix helper writes to read-only maps
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix helper writes to read-only maps
Lonial found an issue that despite user- and BPF-side frozen BPF map
(like in case of .rodata), it was still possible to write into it from
a BPF program side through specific helpers having ARG_PTR_TO_{LONG,INT}
as arguments.
In check_func_arg() when the argument is as mentioned, the meta->raw_mode
is never set. Later, check_helper_mem_access(), under the case of
PTR_TO_MAP_VALUE as register base type, it assumes BPF_READ for the
subsequent call to check_map_access_type() and given the BPF map is
read-only it succeeds.
The helpers really need to be annotated as ARG_PTR_TO_{LONG,INT} | MEM_UNINIT
when results are written into them as opposed to read out of them. The
latter indicates that it's okay to pass a pointer to uninitialized memory
as the memory is written to anyway.
However, ARG_PTR_TO_{LONG,INT} is a special case of ARG_PTR_TO_FIXED_SIZE_MEM
just with additional alignment requirement. So it is better to just get
rid of the ARG_PTR_TO_{LONG,INT} special cases altogether and reuse the
fixed size memory types. For this, add MEM_ALIGNED to additionally ensure
alignment given these helpers write directly into the args via *<ptr> = val.
The .arg*_size has been initialized reflecting the actual sizeof(*<ptr>).
MEM_ALIGNED can only be used in combination with MEM_FIXED_SIZE annotated
argument types, since in !MEM_FIXED_SIZE cases the verifier does not know
the buffer size a priori and therefore cannot blindly write *<ptr> = val.
Security readout for executives and security teams
Plain-English summary
A flaw in the Linux kernel’s BPF verifier could let a low-privileged local user alter BPF maps intended to be read-only. Successful abuse could compromise confidentiality, integrity, and availability. The issue is not remotely exploitable according to the supplied CVSS vector and requires local access.
Executive priority
Treat as a high-priority kernel update for multi-user, shared-hosting, development, and workload-dense Linux systems. Internet exposure alone does not create the stated attack path, but local footholds could make the flaw consequential. Schedule prompt remediation through supported distribution packages.
Technical view
The verifier mishandled helper arguments that write through aligned integer or long pointers. It treated access to a frozen map value as a read, allowing verification to succeed despite the helper writing there. The kernel fixes replace special argument handling with fixed-size memory annotations, including explicit uninitialized-memory and alignment requirements.
Likely exposure
Exposure applies to Linux systems running affected kernels identified by the CVE data, particularly systems where low-privileged local users or workloads can submit BPF programs. The supplied version list is ambiguous, so administrators should confirm exposure against their distribution’s kernel advisory and package changelog.
Exploitation context
The bundle marks this CVE as absent from KEV and provides no cited evidence of active exploitation. Its CVSS 7.8 vector describes local, low-complexity exploitation requiring low privileges and no user interaction. Absence from KEV does not prove exploitation has never occurred.
Researcher notes
The issue concerns verifier enforcement for frozen BPF map values, not ordinary filesystem permissions. Review applicable stable-branch commits because the bundle lists multiple backports. The supplied affected-version representation is insufficient for precise branch-by-branch conclusions, and no source-backed exploit maturity information is provided.
Mitigation direction
Install a vendor-supported kernel update incorporating the applicable cited stable-kernel fix.
Reboot affected systems into the updated kernel after installation.
If no update is available, consult vendor guidance; the supplied sources identify no alternative workaround.
Prioritize shared systems permitting low-privileged local users or workloads.
Validation and detection
Inventory running kernel versions and compare them with vendor advisories for CVE-2024-49861.
Verify the installed kernel changelog includes CVE-2024-49861 or the applicable cited fix commit.
Confirm systems restarted and are running the updated kernel, not merely storing it.
Reassess systems after updates to ensure older vulnerable kernels are not selected at boot.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-49861 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.