{"id":"CVE-2026-139621","aliases":["CVE-2026-139621"],"related":[],"kind":"vulnerability","state":"published","title":"bpf: Don't converge a loop on an iterator that was created anew","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Don't converge a loop on an iterator that was created anew\n\nWhen the verifier reaches bpf_iter_*_next() in a state that is equal to\na state that is still being explored it concludes that the loop\nconverged, since an active iterator will be drained eventually.\nstates_equal() matches ids through idmap, so the same is concluded for\nan iterator that was destroyed and created again since the old state:\n\n  bpf_iter_num_new(&it, 0, 10);\n  loop:\n          if (bpf_ktime_get_ns())\n                  goto remake;\n  next:\n          if (!bpf_iter_num_next(&it))\n                  goto out;\n          goto loop;\n  remake:\n          bpf_iter_num_destroy(&it);\n          bpf_iter_num_new(&it, 0, 10);\n          goto next;\n\nSuch prog is accepted when the call of bpf_iter_num_next() is the first\nprune point after bpf_iter_num_new() and it never returns. Otherwise\nit's rejected with \"infinite loop detected\".\n\nRequire the iterator to have the same id in both states.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Don't converge a loop on an iterator that was created anew\n\nWhen the verifier reaches bpf_iter_*_next() in a state that is equal to\na state that is still being explored it concludes that the loop\nconverged, since an active iterator will be drained eventually.\nstates_equal() matches ids through idmap, so the same is concluded for\nan iterator that was destroyed and created again since the old state:\n\n  bpf_iter_num_new(&it, 0, 10);\n  loop:\n          if (bpf_ktime_get_ns())\n                  goto remake;\n  next:\n          if (!bpf_iter_num_next(&it))\n                  goto out;\n          goto loop;\n  remake:\n          bpf_iter_num_destroy(&it);\n          bpf_iter_num_new(&it, 0, 10);\n          goto next;\n\nSuch prog is accepted when the call of bpf_iter_num_next() is the first\nprune point after bpf_iter_num_new() and it never returns. Otherwise\nit's rejected with \"infinite loop detected\".\n\nRequire the iterator to have the same id in both states.","source":"cvelist"}],"published":"2026-11-30T13:36:26.614Z","modified":"2026-11-30T14:19:44.950Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"06accc8779c1d558a5b5a21f2ac82b0c95827ddd","fixed":"f5d3e5382dbca1a639fe124a38acd526155a5103","status":"affected"},{"type":"git","introduced":"06accc8779c1d558a5b5a21f2ac82b0c95827ddd","fixed":"fe416645a7c67cd7d1127ea707e7027145ddf2c5","status":"affected"},{"type":"git","introduced":"06accc8779c1d558a5b5a21f2ac82b0c95827ddd","fixed":"cc3ad4a2f4812f1efeb6fff6eba6260f8fc6faa6","status":"affected"},{"type":"git","introduced":"06accc8779c1d558a5b5a21f2ac82b0c95827ddd","fixed":"6f3ee3516305da3043f1787e3890381a54151730","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.4","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.4","status":"unaffected"},{"type":"semver","introduced":"6.12.120","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.66","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/f5d3e5382dbca1a639fe124a38acd526155a5103","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fe416645a7c67cd7d1127ea707e7027145ddf2c5","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cc3ad4a2f4812f1efeb6fff6eba6260f8fc6faa6","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6f3ee3516305da3043f1787e3890381a54151730","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139621","url":"https://www.cve.org/CVERecord?id=CVE-2026-139621","licence":"CVE Terms of Use","modified":"2026-11-30T13:36:26.614Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139621","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139621","licence":"Public domain","modified":"2026-11-30T14:19:44.950Z"}],"updatedAt":"2026-11-30T14:33:05.766Z","epss":{"score":0.00168,"percentile":0.06327,"date":"2026-12-01T12:00:22.000Z"}}