CVE-2026-139321

Not scored yetLast modified Nov 30, 2026

Description

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.

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

VendorProductVersions
LinuxLinux>= 7c7e3d31e7856a8260a254f8c71db416f7f9f5a1, < 4bdfbb76fd2f0412d47333a0b1148110d0a8017a; >= 7c7e3d31e7856a8260a254f8c71db416f7f9f5a1, < c6dc0a288d4e787c578d7ab0464b9c943ad88ecc
LinuxLinux5.17

References

Timeline

Published
Nov 30, 2026
Last modified
Nov 30, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-139322In the Linux kernel, the following vulnerability has been resolved: bpf: Reject sleepable programs for task_vma iterator A sleepable "iterCVE-2026-139323In the Linux kernel, the following vulnerability has been resolved: bpf: Don't hand out a linked element as extra element When htab_map_upCVE-2026-139324In the Linux kernel, the following vulnerability has been resolved: bpf: Don't leak the inode when token creation fails bpf_token_create()CVE-2026-139325In the Linux kernel, the following vulnerability has been resolved: bpf: Forbid sleeping in hash map for_each callbacks A sleepable prograCVE-2026-1393268.1In the Linux kernel, the following vulnerability has been resolved: bpf: Use the frame mem type in devmap egress XDP A devmap egress progrCVE-2026-139327In the Linux kernel, the following vulnerability has been resolved: bpf: Fix verifier WARN on narrow read of bpf_tcp_sock u64 fields A BPFCVE-2026-139328In the Linux kernel, the following vulnerability has been resolved: sched_ext: Fix a bypassed task stalling on a cpu its scheduler has no cCVE-2026-139329In the Linux kernel, the following vulnerability has been resolved: ALSA: jack: Protect the index scan against control removal A control fCVE-2026-139335.3Insufficient policy enforcement in Passwords in Google Chrome prior to 150.0.7871.47 allowed a remote attacker who had compromised the rendeCVE-2026-139330In the Linux kernel, the following vulnerability has been resolved: dpll: zl3073x: do not offer 0 Hz as a supported pin frequency zl3073x_CVE-2026-139331In the Linux kernel, the following vulnerability has been resolved: bpf, x86: Pass a trampoline's stack arguments by the calling conventionCVE-2026-139332In the Linux kernel, the following vulnerability has been resolved: bpf: Claim the per-CPU send_signal irq_work before filling it irq_work
CVE-2026-139321: Unscored | Vulnix