Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-139322

published

bpf: Reject sleepable programs for task_vma iterator

Published
30 Nov 2026, 13:33:41 UTC
Updated
30 Nov 2026, 13:33:41 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linuxb77fb25dcb342788d72ad7533163c34b8b823a1d to < e85ae2a3a50f5f358490ba347fec6a3dc2cc63b0 · b77fb25dcb342788d72ad7533163c34b8b823a1d to < 40b788f482d3d9c959210548848228b8bd571aa4 · b77fb25dcb342788d72ad7533163c34b8b823a1d to < a6bf637ff9d78d20aa4955cfd58c72369dc8f9bd · b77fb25dcb342788d72ad7533163c34b8b823a1d to < dfcd1765911223df60845e288ad392d5237f47a3 · Other versions: unaffected Affected Not stated Linux
Linux — Linux5.18 (affected) · 0 to < 5.18 (unaffected · semver) · 6.12.119 through 6.12.* (unaffected · semver) · 6.18.65 through 6.18.* (unaffected · semver) · 7.3.6 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Reject sleepable programs for task_vma iterator A sleepable "iter.s/task_vma" program can be attached, but its ->show() callback runs with the mmap_lock of the iterated mm held for read. As soon as the program runs, bpf_iter_run_prog() calls might_fault(), and any bpf_copy_from_user() or bpf_copy_from_user_task() it does may really fault or take mmap_lock again. With lockdep this is reported as recursive locking of mmap_lock. Without lockdep, a fault on the reader's own mm, or access_process_vm() on the iterated mm, has to take mmap_lock for read again. If a writer queued up in the meantime that blocks behind the writer, which in turn waits for the read lock the iterator already holds, and the read() hangs: reader (iter.s/task_vma) other thread of the same mm task_vma_seq_get_next() mmap_read_lock(mm) mmap_write_lock(mm) <- waits bpf prog: copy_from_user() page fault mmap_read_lock(mm) <- queued behind the writer The reader waits killable, so the hang lasts until it gets a fatal signal. bpf_iter_link_attach() allows sleepable programs for the targets that set BPF_ITER_RESCHED, and task_vma sets it because cond_resched() between VMAs is fine with mmap_lock held. Rescheduling between objects and running a sleepable program inside ->show() are different properties, though, and task_vma only has the first one. The open-coded task_vma iterator does not have this problem since it hands out a snapshot of the VMA and holds no lock when it returns to the program. The vma handed to the program is only stable under mmap_lock, so the lock can't be dropped around ->show(). Add a feature flag BPF_ITER_NOSLEEP for targets which can't run sleepable programs although they can reschedule, and set it for task_vma. The check at attach time is not enough. BPF_LINK_UPDATE replaces the program of a link, and bpf_iter_link_replace() only compares the type, the attach type and the BTF id of the two programs, which are the same for a sleepable and a non-sleepable one. Do the check there as well. That also closes this way around the existing rule: so far a sleepable program could be put on a link of a target that doesn't set BPF_ITER_RESCHED, like the hash map element iterator, which runs it under rcu_read_lock(). BPF_LINK_CREATE of a sleepable program for the task_vma target, and BPF_LINK_UPDATE to one, now fail with -EINVAL, also for programs that don't touch user memory and have been working since sleepable iterator programs exist. The programs can still be loaded. They have to be loaded as non-sleepable programs, or use the open-coded iterator.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

No normalized assessments.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux b77fb25dcb342788d72ad7533163c34b8b823a1d to < e85ae2a3a50f5f358490ba347fec6a3dc2cc63b0 (affected · git)b77fb25dcb342788d72ad7533163c34b8b823a1d to < 40b788f482d3d9c959210548848228b8bd571aa4 (affected · git)b77fb25dcb342788d72ad7533163c34b8b823a1d to < a6bf637ff9d78d20aa4955cfd58c72369dc8f9bd (affected · git)b77fb25dcb342788d72ad7533163c34b8b823a1d to < dfcd1765911223df60845e288ad392d5237f47a3 (affected · git)Default: unaffected Linux · cna
Linux Linux 5.18 (affected)0 to < 5.18 (unaffected · semver)6.12.119 through 6.12.* (unaffected · semver)6.18.65 through 6.18.* (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

4

Provider assertions

1

Linux · cna

bpf: Reject sleepable programs for task_vma iterator

Provenance

Schema
5.2
Searchable
yes
Content hash
e0de502cff592680d2f09d95043cac920db3f70f008ac1c6ff693de3fe59ff68
Ingested
30 Nov 2026, 13:42:23 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected