PT-2026-163363

CVE-2026-139322

·

تاريخ النشر

2026-11-30

·

تاريخ التحديث

2026-11-30

الوصف من

الدرجة
N/A
غير متوفر

لا تتوفر حاليًا تقييمات أو مقاييس للخطورة. سنحدّث المعلومات المقابلة في الصفحة فور توفرها.

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.
المورّدون
المنتجات المتأثرة
المعرّفات ذات الصلة
وجدت خطأً في الوصف؟ لديك ما تضيفه؟ لا تتردد في مراسلتنا 👾