# CVE-2026-98007: bpf: Reject non-scalar bpf_loop iteration counts

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2026-09-25T10:23:32.939Z
- Modified: 2026-10-19T10:17:52.070Z
- Assigned by: Linux

## Description

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

bpf: Reject non-scalar bpf_loop iteration counts

bpf_loop() declares its nr_loops argument as ARG_ANYTHING. Privileged
programs may pass pointer values to such arguments, so check_func_arg()
lets a pointer-valued R1 reach the helper-specific checks.

Since commit bb124da69c47 ("bpf: keep track of max number of bpf_loop
callback iterations"), the verifier marks R1 precise and reads its upper
bound to limit callback simulation. Precision backtracking only accepts
scalar registers, so passing a pointer instead triggers the "backtracking
misuse" verifier warning. Kernels with panic_on_warn enabled subsequently
panic.

Introduce ARG_SCALAR for helper arguments that only accept scalar values
and use it for bpf_loop() nr_loops. Generic helper argument validation then
rejects pointers before loop inlining and precision processing.

(As written by CVE List.)

## Affected

- Linux Linux: from bfc5c19b4b48840627af0d0f1c8f4461b276e508 before 2ff38b3552af53238aee6c877ae64cc798d46fce; from bb124da69c47dd98d69361ec13244ece50bec63e before 656d40d1ca228ee21a9b3280432479fc9eae75ab; from bb124da69c47dd98d69361ec13244ece50bec63e before e2e1161e03fecff6d2229a81b024337144bfcd97; from bb124da69c47dd98d69361ec13244ece50bec63e before f8ae8275c721334ee50fafdd986fb83294eb941a; from bb124da69c47dd98d69361ec13244ece50bec63e before c3fd8e5fd100f122bad503bdc0e9277219533253; from 6.6.15 before 6.6.158; 6.7 (not affected: before 6.7; from 6.6.158 up to 6.6.*; from 6.12.111 up to 6.12.*; from 6.18.53 up to 6.18.*; from 7.2.7 up to 7.2.*; from 7.3 up to *)

## References

- <https://git.kernel.org/stable/c/2ff38b3552af53238aee6c877ae64cc798d46fce>
- <https://git.kernel.org/stable/c/656d40d1ca228ee21a9b3280432479fc9eae75ab>
- <https://git.kernel.org/stable/c/e2e1161e03fecff6d2229a81b024337144bfcd97>
- <https://git.kernel.org/stable/c/f8ae8275c721334ee50fafdd986fb83294eb941a>
- <https://git.kernel.org/stable/c/c3fd8e5fd100f122bad503bdc0e9277219533253>

## Sources

- CVE List: [CVE-2026-98007](https://www.cve.org/CVERecord?id=CVE-2026-98007), CVE Terms of Use, modified 2026-10-19
- NVD: [CVE-2026-98007](https://nvd.nist.gov/vuln/detail/CVE-2026-98007), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2026-98007 · Whole record: https://cve.day/CVE-2026-98007.json · Rebuilt by cve.day 2026-11-25T22:59:41.019Z
