CVE-2026-53106: bpf: Do not allow deleting local storage in NMI
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
bpf: Do not allow deleting local storage in NMI
Currently, local storage may deadlock when deferring freeing selem or local storage through kfree_rcu(), call_rcu() or call_rcu_tasks_trace() in NMI or reentrant. Since deleting selem in NMI is an unlikely use case, partially mitigate it by returning error when calling from bpf_xxx_storage_delete() helpers in NMI. Note that, it is still possible to deadlock through reentrant. A full mitigation requires returning error when irqs_disabled() is true, which, however is too heavy-handed for bpf_xxx_storage_delete().
The long-term solution requires _nolock versions of call_rcu. Another possible solution is to defer the free through irq_work [0], but it would grow the size of selem, which is non-ideal.
The check is only needed in bpf_selem_unlink(), which is used by helpers and syscalls. bpf_selem_unlink_nofail() is fine as it is called during map and owner tear down that never run in NMI or reentrant.
[0] https://lore.kernel.org/bpf/[email protected]/
The Linux kernel CVE team has assigned CVE-2026-53106 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.13 with commit a10787e6d58c24b51e91c19c6d16c5da89fcaa4b and fixed in 7.0.10 with commit e84acaf936970b5b0be2c93bbf255295ba9406df Issue introduced in 5.13 with commit a10787e6d58c24b51e91c19c6d16c5da89fcaa4b and fixed in 7.1 with commit 350de5b8a9befaa2a68861c51f671d4f5f751ca5
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-53106
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
kernel/bpf/bpf_local_storage.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/e84acaf936970b5b0be2c93bbf255295ba9406df https://git.kernel.org/stable/c/350de5b8a9befaa2a68861c51f671d4f5f751ca5