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

bpf: Cancel special fields on map value recycle

Map update and delete paths currently call bpf_obj_free_fields() when a
value is being replaced or recycled. That makes field destruction depend
on the context of the update/delete operation. For tracing programs this
can include NMI context, where referenced kptr destructors, uptr
unpinning, and graph root destruction are not generally safe.

Introduce bpf_obj_cancel_fields() for the reusable-value path. It only
performs NMI-safe cleanup for timer, workqueue, and task_work fields.
Fields that need full destruction are left attached to the recycled value
and are destroyed by the final cleanup path instead.

Switch array and hashtab update/delete/recycle paths to this cancel
helper. Keep bpf_obj_free_fields() for final map destruction and for
bpf_mem_alloc destructors. Preallocated hashtabs do not have allocator
destructors, so teardown continues to walk the normal and extra elements
and fully destroy their fields.

This deliberately relaxes the eager-free semantics of map update/delete
for special fields. Programs that relied on a recycled map slot becoming
empty immediately after update/delete were relying on behavior that
cannot be implemented safely from every BPF execution context without
offloading arbitrary destructors.

There is a chance this change breaks programs making assumptions
regarding the eager freeing of fields. If so, we can relax semantics to
cancellation only when irqs_disabled() is true in the future. However,
theoretically, map values that get reused eagerly already have weaker
guarantees as parallel users can recreate freed fields before the new
element becomes visible again.
Published: 2026-08-15
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In the Linux kernel, map values for BPF programs were freed by calling bpf_obj_free_fields() during updates or deletions. That cleanup could invoke destructors that are not safe when executed in Non‑Maskable Interrupt contexts, potentially leading to unsafe memory operations or kernel corruption. The commit introduces bpf_obj_cancel_fields() which limits destructive cleanup to NMI‑safe operations for specific fields and defers full destruction to a later, safer path, thereby mitigating the unsafe destructor calls. Programs that relied on immediate map slot clearance after updates or deletes may need to be adjusted because the eager‑free semantics are relaxed.

Affected Systems

All Linux kernels that have not yet incorporated the bpf_obj_cancel_fields() commit are vulnerable. This includes every Linux distribution whose kernel version predates the changes introduced by commit 9ea734e2cc0143d7429ab7dc0b20c85e5836183c and commit a3a81d247651218e47153f2d2afd7aee236726fd. Users of standard distributions such as Ubuntu, Debian, Red Hat, Fedora, and others running those pre‑patch kernels are affected.

Risk and Exploitability

The CVSS score of 7.8 indicates medium to high severity, but the EPSS score of less than 1 % and its absence from the CISA KEV catalog suggest that exploitation is currently unlikely. An attacker who can load privileged BPF programs could manipulate map update or delete operations in a context that triggers the unsafe cleanup, potentially causing kernel memory corruption or privilege escalation. The likely attack vector is the execution of a crafted BPF program that performs map updates or deletions, inferred because the vulnerability is located in privileged kernel code that processes BPF map operations.

Generated by OpenCVE AI on August 22, 2026 at 02:41 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply a kernel update that includes the bpf_obj_cancel_fields() patch
  • Update or refactor existing BPF programs to avoid assumptions that map values are immediately freed after updates or deletes
  • If an upgrade cannot be performed immediately, disable or tightly restrict BPF program loading and monitor map update/delete activity until the kernel is patched

Generated by OpenCVE AI on August 22, 2026 at 02:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 22 Aug 2026 01:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Wed, 19 Aug 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-763
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 17 Aug 2026 16:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Mon, 17 Aug 2026 14:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-362
CWE-416

Mon, 17 Aug 2026 06:00:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Sat, 15 Aug 2026 17:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-362
CWE-416

Sat, 15 Aug 2026 06:15:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Cancel special fields on map value recycle Map update and delete paths currently call bpf_obj_free_fields() when a value is being replaced or recycled. That makes field destruction depend on the context of the update/delete operation. For tracing programs this can include NMI context, where referenced kptr destructors, uptr unpinning, and graph root destruction are not generally safe. Introduce bpf_obj_cancel_fields() for the reusable-value path. It only performs NMI-safe cleanup for timer, workqueue, and task_work fields. Fields that need full destruction are left attached to the recycled value and are destroyed by the final cleanup path instead. Switch array and hashtab update/delete/recycle paths to this cancel helper. Keep bpf_obj_free_fields() for final map destruction and for bpf_mem_alloc destructors. Preallocated hashtabs do not have allocator destructors, so teardown continues to walk the normal and extra elements and fully destroy their fields. This deliberately relaxes the eager-free semantics of map update/delete for special fields. Programs that relied on a recycled map slot becoming empty immediately after update/delete were relying on behavior that cannot be implemented safely from every BPF execution context without offloading arbitrary destructors. There is a chance this change breaks programs making assumptions regarding the eager freeing of fields. If so, we can relax semantics to cancellation only when irqs_disabled() is true in the future. However, theoretically, map values that get reused eagerly already have weaker guarantees as parallel users can recreate freed fields before the new element becomes visible again.
Title bpf: Cancel special fields on map value recycle
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-17T05:45:47.130Z

Reserved: 2026-08-15T05:44:03.883Z

Link: CVE-2026-74314

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-15T06:22:31.617

Modified: 2026-08-17T06:19:25.733

Link: CVE-2026-74314

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-15T00:00:00Z

Links: CVE-2026-74314 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-22T02:45:03Z

Weaknesses
  • CWE-763

    Release of Invalid Pointer or Reference