In the Linux kernel, the following vulnerability has been resolved:
io_uring/zcrx: fix user_ref race between scrub and refill paths
The io_zcrx_put_niov_uref() function uses a non-atomic check-then-decrement pattern (atomic_read followed by separate atomic_dec) to manipulate user_refs. This is serialized against other callers by rq_lock, but io_zcrx_scrub() modifies the same counter with atomic_xchg() WITHOUT holding rq_lock.
On SMP systems, the following race exists:
CPU0 (refill, holds rq_lock) CPU1 (scrub, no rq_lock) put_niov_uref: atomic_read(uref) - 1 // window opens atomic_xchg(uref, 0) - 1 return_niov_freelist(niov) [PUSH #1] // window closes atomic_dec(uref) - wraps to -1 returns true return_niov(niov) return_niov_freelist(niov) [PUSH #2: DOUBLE-FREE]
The same niov is pushed to the freelist twice, causing free_count to exceed nr_iovs. Subsequent freelist pushes then perform an out-of-bounds write (a u32 value) past the kvmalloc'd freelist array into the adjacent slab object.
Fix this by replacing the non-atomic read-then-dec in io_zcrx_put_niov_uref() with an atomic_try_cmpxchg loop that atomically tests and decrements user_refs. This makes the operation safe against concurrent atomic_xchg from scrub without requiring scrub to acquire rq_lock.
[pavel: removed a warning and a comment]
CVSS Details
- CVSS 3.1 Base Score: 4.7
- CVSS 3.1 Vector: (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Amazon_linux_2023 | — | Upgrade kernel6.18-libbpf-staticUpgrade kernel6.18Upgrade kernel6.18-modules-extra-commonUpgrade kernel6.18-libbpf-debuginfoUpgrade kernel6.18-libbpfUpgrade kernel6.18-tools-develUpgrade kernel6.18-develUpgrade kernel6.18-debuginfo-common-x86_64Upgrade bpftool6.18Upgrade perf6.18Upgrade kernel6.18-toolsUpgrade kernel6.18-libbpf-develUpgrade kernel6.18-tools-debuginfoUpgrade perf6.18-debuginfoUpgrade kernel6.18-headersUpgrade python3-perf6.18Upgrade kernel6.18-modules-extraUpgrade kernel6.18-debuginfo-common-aarch64Upgrade kernel6.18-debuginfoUpgrade bpftool6.18-debuginfoUpgrade python3-perf6.18-debuginfoUpgrade kernel-livepatch-6.18.16-18.222 | May 19, 2026 | May 6, 2026 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub