Re: [BUG io_uring] Failed RECVSEND_BUNDLE can persistently shrink non-INC pbuf ring len and affect later READ operations
Jens Axboe <[email protected]>
| Newsgroups | org.kernel.vger.io-uring,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 6/7/26 3:22 PM, Nyakundi Emmanuel wrote: > On Sun, 7 Jun 2026, Federico Brasili wrote: >> I found a reproducible io_uring provided-buffer ring issue on Ubuntu >> kernel 7.0.0-22-generic. >> >> A failed IORING_RECVSEND_BUNDLE receive on a non-INC provided-buffer >> ring can persistently shrink the user-visible buffer descriptor length. > > Confirmed reproducible on: > > Linux archlinux 7.0.11-arch1-1 #1 SMP PREEMPT_DYNAMIC > Tue, 02 Jun 2026 18:26:58 +0000 x86_64 > Arch Linux (rolling) > > Output from your reproducer, run unprivileged: > > [INIT] entry0 len=4096 bid=0 entry1 len=4096 bid=1 tail=2 > [STEP1] poison empty socket: BUNDLE len=1 expect -EAGAIN but entry0 len may truncate > [CQE1] res=-11 flags=0x0 user=0x1111 > [AFTER1] entry0 len=1 entry1 len=4096 tail=2 changed_buf0=0 changed_buf1=0 guard_before=0 guard_after=0 > [STEP2] wrote pipe bytes=4096, now IORING_OP_READ len=4096 after recv-BUNDLE poisoning > [CQE_READ] res=1 flags=0x1 user=0x6666 > [AFTER_READ] entry0 len=1 entry1 len=4096 tail=2 changed_buf0=1 changed_buf1=0 guard_before=0 guard_after=0 > [STEP3] wrote second pipe chunk bytes=4096, second IORING_OP_READ len=4096 without republish > [CQE_READ2] res=4096 flags=0x10001 user=0x7777 > [AFTER_READ2] entry0 len=1 entry1 len=4096 tail=2 changed_buf0=1 changed_buf1=4096 guard_before=0 guard_after=0 > > entry0.len persistently corrupted 4096 -> 1 after -EAGAIN RECV_BUNDLE. > Subsequent IORING_OP_READ consumed the poisoned length as reported. > > This confirms the issue is not Ubuntu-specific and reproduces on a > stock upstream-tracking kernel. Which is entirely expected, it's just a generic kernel bug and I doubt that ubuntu is shipping any specific patches here that aren't already in stable or upstream. -- Jens Axboe