PT-2026-163362
CVE-2026-139321
·
Publicado
2026-11-30
·
Atualizado
2026-11-30
Descrição por
Pontuação
N/A
Não disponívelNão há classificações de severidade ou métricas disponíveis. Quando houver, atualizaremos as informações correspondentes na página.
In the Linux kernel, the following vulnerability has been resolved:
bpf: Forbid sleeping in bpf find vma() callbacks
A sleepable program can call bpf find vma() and use a sleepable helper
such as bpf copy from user() or bpf copy from user task() in the
callback. The verifier accepts this, but bpf find vma() runs the callback
with the mmap lock of the mm held for read. If the user copy faults on
that mm, the fault handler has to take mmap lock again. Lockdep reports
recursive locking, and if a writer queued up in between, the fault blocks
behind the writer, which waits for the read lock the helper already
holds:
sleepable prog other thread of the same mm
bpf find vma(current, ...)
mmap read trylock(mm)
mmap write lock(mm) <- waits
callback: copy from user()
page fault
mmap read lock(mm) <- queued behind the writer
This is the same problem as with sleepable task vma iterator programs.
The verifier checks synchronous callbacks in the caller's context, so
in sleepable context() is true in the callback of a sleepable program.
Verify the callback like a hash map for each callback, as running in an
RCU read-side critical section where sleeping is not allowed, and actually
hold rcu read lock() around it, so that global functions the callback
calls, which are then verified for a non-sleepable context, see the RCU
protection they are verified with.
Non-sleepable programs already run the callback under RCU, nothing changes
for them. A sleepable program whose bpf find vma() callback calls any
helper, kfunc or global function that may sleep is now rejected by the
verifier, including ones that would be harmless under mmap lock as they
don't touch user memory.
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾