{"id":"CVE-2026-90217","state":"PUBLISHED","title":"bpf: Compare iterator types during state pruning","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Compare iterator types during state pruning\n\nAn iterator stack slot can be MEM_RCU or PTR_UNTRUSTED. These states\nmust not be equal, or the verifier can prune an unsafe path.\n\nCompare the pointer type for STACK_ITER slots.","publishedAt":"2026-09-17T16:07:29.409Z","updatedAt":"2026-10-21T12:50:30.155Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"dfab99df147b0d364f0c199f832ff2aedfb2265a","status":"affected","lessThan":"86bbaf9e6e4fa6c0dfb352e9e11fae328069233a","versionType":"git"},{"version":"dfab99df147b0d364f0c199f832ff2aedfb2265a","status":"affected","lessThan":"e4ab436d5ba61e4910fd49d24bb64ddb34d493d6","versionType":"git"},{"version":"dfab99df147b0d364f0c199f832ff2aedfb2265a","status":"affected","lessThan":"6424b9cde9edc7f2098115bbfd1ee3d84a958380","versionType":"git"},{"version":"dfab99df147b0d364f0c199f832ff2aedfb2265a","status":"affected","lessThan":"83608e303b95d07afba1c15da0b5d9e513c2f15a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/states.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.7","versionType":"semver"},{"version":"6.12.114","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.57","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.6","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/states.c"]}],"references":["https://git.kernel.org/stable/c/86bbaf9e6e4fa6c0dfb352e9e11fae328069233a","https://git.kernel.org/stable/c/e4ab436d5ba61e4910fd49d24bb64ddb34d493d6","https://git.kernel.org/stable/c/6424b9cde9edc7f2098115bbfd1ee3d84a958380","https://git.kernel.org/stable/c/83608e303b95d07afba1c15da0b5d9e513c2f15a"],"weaknesses":[],"ingestedAt":"2026-10-29T20:13:34.582Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/90xxx/CVE-2026-90217.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-90217","state":"PUBLISHED","datePublished":"2026-09-17T16:07:29.409Z","dateUpdated":"2026-10-21T12:50:30.155Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-11T19:38:34.793Z"},"containers":{"cna":{"title":"bpf: Compare iterator types during state pruning","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Compare iterator types during state pruning\n\nAn iterator stack slot can be MEM_RCU or PTR_UNTRUSTED. These states\nmust not be equal, or the verifier can prune an unsafe path.\n\nCompare the pointer type for STACK_ITER slots."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"dfab99df147b0d364f0c199f832ff2aedfb2265a","status":"affected","lessThan":"86bbaf9e6e4fa6c0dfb352e9e11fae328069233a","versionType":"git"},{"version":"dfab99df147b0d364f0c199f832ff2aedfb2265a","status":"affected","lessThan":"e4ab436d5ba61e4910fd49d24bb64ddb34d493d6","versionType":"git"},{"version":"dfab99df147b0d364f0c199f832ff2aedfb2265a","status":"affected","lessThan":"6424b9cde9edc7f2098115bbfd1ee3d84a958380","versionType":"git"},{"version":"dfab99df147b0d364f0c199f832ff2aedfb2265a","status":"affected","lessThan":"83608e303b95d07afba1c15da0b5d9e513c2f15a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/states.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.7","versionType":"semver"},{"version":"6.12.114","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.57","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.6","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/states.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/86bbaf9e6e4fa6c0dfb352e9e11fae328069233a"},{"url":"https://git.kernel.org/stable/c/e4ab436d5ba61e4910fd49d24bb64ddb34d493d6"},{"url":"https://git.kernel.org/stable/c/6424b9cde9edc7f2098115bbfd1ee3d84a958380"},{"url":"https://git.kernel.org/stable/c/83608e303b95d07afba1c15da0b5d9e513c2f15a"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The attacker-controlled input is the BPF instruction stream copied in bpf_prog_load() from bpf(2) BPF_PROG_LOAD (__sys_bpf). bpf_check() then stacksafe() treats STACK_ITER slots with MEM_RCU and PTR_UNTRUSTED as equal; that bytecode is local syscall input, not a remote protocol payload.\nAC:L - The attacker authors both verifier paths as in iter_tasks_rcu_state_pruning: bpf_iter_task_new under bpf_rcu_read_lock, then a bpf_get_prandom_u32 branch that nested-lock/unlock (MEM_RCU) or unlock/relock (PTR_UNTRUSTED) before bpf_iter_task_next. Both sides and the branch are attacker-controlled; no victim timing is required.\nPR:L - add_subprog_and_kfunc() rejects kfunc calls unless env->bpf_capable. bpf_iter_task_new and bpf_iter_css_new are kfuncs; BPF_PROG_TYPE_SYSCALL (always sleepable) needs only bpf_token_capable(CAP_BPF). bpf_token_capable() uses ns_capable() on a delegated token userns, so this is not init-namespace root.\nUI:N - The attacker loads the crafted sleepable program with BPF_PROG_LOAD and executes it via BPF_PROG_TEST_RUN (bpf_prog_test_run_syscall) or by attaching their own fentry.s; no other user must mount a filesystem, open a file, or cooperate.\nS:U - A pruned bpf_iter_task_next() walks host task_struct lists in the same kernel that loaded the program. That is in-kernel use-after-free and privilege escalation, not a KVM/Xen guest-to-host escape or IOMMU bypass.\nC:H - After the pruned unlock/relock gap, bpf_iter_task_next() returns kit->pos from bpf_iter_task_kern, a task_struct * that may already have been RCU-freed. The program can read BTF fields of that dangling pointer, so the UAF is an arbitrary kernel disclosure.\nI:H - bpf_iter_task_next() then calls next_task()/__next_thread() (list_entry_rcu on tasks.next and thread_node) using the dangling kit->pos. Walking attacker-reclaimed task_struct list nodes is a kernel write primitive; UAF and iterator type confusion are Integrity High.\nA:H - Using the untrusted STACK_ITER after the RCU gap makes next_task() or css_next_descendant_*() dereference a freed task_struct or cgroup_subsys_state, causing a kernel oops or panic even when the UAF is not fully exploited."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-21T12:50:30.155Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.12.114"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.18.57"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"7.2.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"7.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}