CVE-2026-98046: bpf: Mark bpf_btf_find_by_name_kind() as sleepable
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
bpf: Mark bpf_btf_find_by_name_kind() as sleepable
When bpf_btf_find_by_name_kind() finds a type in module BTF, it returns a new BTF object fd through __btf_new_fd(). This reaches anon_inode_getfd(), which can sleep while allocating or expanding the current task fd table.
The helper prototype does not set might_sleep, so the verifier allows the helper in non-sleepable contexts such as BPF timer callbacks. The fd allocation can then sleep in softirq context and install the fd into the interrupted task.
Mark the helper as sleepable. This preserves calls from the main body of a sleepable syscall program while rejecting calls from its non-sleepable regions.
The Linux kernel CVE team has assigned CVE-2026-98046 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.14 with commit 3d78417b60fba249cc555468cb72d96f5cde2964 and fixed in 6.12.111 with commit 29e40175617216fbd4544529f6bfb51d1ab95ba1 Issue introduced in 5.14 with commit 3d78417b60fba249cc555468cb72d96f5cde2964 and fixed in 6.18.53 with commit 4d8784226bd3c6a707975081f986078f40456cec Issue introduced in 5.14 with commit 3d78417b60fba249cc555468cb72d96f5cde2964 and fixed in 7.2.7 with commit 17f54a8f2b9714529d56edbbe12d448ccdbbf469 Issue introduced in 5.14 with commit 3d78417b60fba249cc555468cb72d96f5cde2964 and fixed in 7.3-rc2 with commit 620614bf7672130c43b3cff375525a2202f61979
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-98046
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/btf.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/29e40175617216fbd4544529f6bfb51d1ab95ba1 https://git.kernel.org/stable/c/4d8784226bd3c6a707975081f986078f40456cec https://git.kernel.org/stable/c/17f54a8f2b9714529d56edbbe12d448ccdbbf469 https://git.kernel.org/stable/c/620614bf7672130c43b3cff375525a2202f61979