** Description changed:
+ [Impact]
+
+ On the resolute 7.0 kernels, a registered io_uring eventfd signals
+ deferred task work only one time in the life of the registration. After
+ the first signal, the eventfd doesn't become readable when new task work
+ is queued. A program that waits on the eventfd with poll() or epoll
+ doesn't wake. Its completions wait until it calls io_uring_enter() for
+ another reason. An event loop that watches an io_uring through its
+ eventfd can stall.
+
+ The defect shows on a ring with IORING_SETUP_SINGLE_ISSUER |
+ IORING_SETUP_DEFER_TASKRUN | IORING_SETUP_TASKRUN_FLAG and an eventfd
+ registered with IORING_REGISTER_EVENTFD. The trigger is a request that
+ waits in poll and then wakes, for example a receive on a socket that has
+ no data yet.
+
+ Cause: resolute carries upstream cd305ee3633a ("io_uring: defer eventfd
+ signaling when queued from a wakeup handler"), from the 6.18.49 stable
+ update. When a wakeup handler queues task work, __io_eventfd_signal()
+ sets IO_EVENTFD_OP_SIGNAL_BIT and defers the signal to an RCU callback.
+ io_eventfd_do_signal() never clears the bit. Thus the kernel skips each
+ later deferred signal.
+
+ [Fix]
+
+ Upstream commit 04fe9aeb4f3c ("io_uring/eventfd: reset deferred signal
+ state"), in v7.1. It adds one line: io_eventfd_do_signal() clears the
+ bit before it signals.
+
+ The patch applies cleanly to resolute master-next (Ubuntu-7.0.0-44.44).
+ The stable maintainers queued it for 6.18.y and 6.12.y on 2026-11-14.
+ The current stable releases, 6.18.63 and 6.12.117, don't have it yet.
+
+ [Test Plan]
+
+ 1. Make a ring with IORING_SETUP_SINGLE_ISSUER | IORING_SETUP_DEFER_TASKRUN |
IORING_SETUP_TASKRUN_FLAG.
+ 2. Register an eventfd w/ IORING_REGISTER_EVENTFD.
+ 3. Submit IORING_OP_POLL_ADD (POLLIN) on the read end of an empty pipe.
+ 4. Write one byte to the pipe.
+ 5. Call poll() on the eventfd with a timeout of 1 second.
+ 6. Read the eventfd. Call io_uring_enter() with IORING_ENTER_GETEVENTS and
reap the completion. Drain the pipe.
+ 7. Do steps 3 to 6 again on the same ring and registration.
+
+ Expected result: poll() reports the eventfd readable in both rounds. On
+ an affected kernel, the first round passes and the second poll() times
+ out.
+
+ I ran this test on kernel.org 6.18.63 and 6.12.117 (x86_64, QEMU), w/
+ and w/o the patch. Without the patch, the second round times out. With
+ the patch, both rounds pass. A second test waits only on the eventfd for
+ two TCP receives that first get -EAGAIN. It gives the same exact
+ results. I will run both tests on a candidate kernel on EC2, x86_64 and
+ arm64.
+
+ [Where problems could occur]
+
+ The change touches only the deferred eventfd signal path of io_uring.
+ Only programs that register an eventfd on a ring use that path. The bit
+ now clears before the deferred signal. Thus a wakeup that comes while
+ the callback runs can queue one more deferred signal. That signal holds
+ its own reference to the eventfd, so the eventfd is not freed early. A
+ regression would show as an extra eventfd signal. An extra signal only
+ makes a program check its completion queue one more time.
+
+ [Other Info]
+
+ Run evidence: linux-aws 7.0.0-1016-aws on EC2, x86_64 and arm64.
+ Source evidence: linux-aws 7.0.0-1018.19 (proposed) and linux master-next
7.0.0-44.44 don't have the fix.
+ Not affected: v7.1 and later, which have 04fe9aeb4f3c. Kernels w/o
cd305ee3633a, such as the 6.1 kernel of Debian 12. I didn't check other Ubuntu
series.
+ Upstream stable thread:
+ https://lore.kernel.org/stable/2026111310-pointer-citric-2f11@gregkh/T/
+
+ --- Original Report ---
+
Release: Ubuntu 26.04 LTS (resolute), Canonical's official AWS images
(ami-0547ecbf0e9b4aeb5 x86_64, ami-06b1a03fa3561aefb arm64, us-east-1).
Package: linux-aws 7.0.0-1016.17. uname -rv:
- - x86_64: 7.0.0-1016-aws #17-Ubuntu SMP PREEMPT Mon Oct 19 17:36:33 UTC 2026
- - arm64: 7.0.0-1016-aws #17-Ubuntu SMP PREEMPT Mon Oct 19 17:54:18 UTC 2026
+ - x86_64: 7.0.0-1016-aws #17-Ubuntu SMP PREEMPT Mon Oct 19 17:36:33 UTC 2026
+ - arm64: 7.0.0-1016-aws #17-Ubuntu SMP PREEMPT Mon Oct 19 17:54:18 UTC 2026
Expected: a registered io_uring eventfd becomes readable each time that
deferred task work is queued, as on Debian 12's 6.1 kernel and on
kernels that have 04fe9aeb4f3c.
What happened: the eventfd becomes readable for the first deferred task
work only. Later task work never signals it, and poll() on it blocks
until io_uring_enter(IORING_ENTER_GETEVENTS) runs the work.
apport: the affected systems were short-lived EC2 instances, so apport-
collect is not available. The cause is in the kernel source, as
described below.
---
Upstream report:
https://lore.kernel.org/stable/oMhla8VwCWoihfrmgn8znIy60W1QXI8g_v2OyB9i6sWESIDlVJlwoGGOLylJgIHRARNoieXUVRGqzeB__KvHMdXgnCfPPovs8vLMOzaMPEw=@rebasedinc.com/T/#u
---
While working on my own async runtime on io_uring, I found what looks
like a defect in the stable backports. I first saw it on Ubuntu 26.04's
kernel, and I can't find any existing report of it.
A registered io_uring eventfd stops signaling after its first deferred
signal on kernels that carry the backport of cd305ee3633a ("io_uring:
defer eventfd signaling when queued from a wakeup handler") but not
04fe9aeb4f3c ("io_uring/eventfd: reset deferred signal state").
What I see, on Ubuntu 26.04 7.0.0-1016-aws, x86_64 and arm64. Ubuntu's
7.0 kernel took the cd305ee3633a backport through the 6.18.49 stable
update:
1. A ring with IORING_SETUP_SINGLE_ISSUER | IORING_SETUP_DEFER_TASKRUN |
IORING_SETUP_TASKRUN_FLAG, and an eventfd registered with
IORING_REGISTER_EVENTFD.
2. Two IORING_OP_RECV on a nonblocking TCP socket. Each gets -EAGAIN, arms
poll, and later has data.
3. The first receive's task work signals the eventfd. For the second, tracing
shows io_uring_task_add, but the eventfd never becomes readable, and poll() on
it blocks.
4. io_uring_enter with IORING_ENTER_GETEVENTS then runs the work and posts
the completion.
Debian 12's 6.1 kernel does not show this.
What I THINK is going on (I read the source, w/ help from Opus 5.5;
please correct me if I'm wrong): after cd305ee3633a, task work queued
from a poll wakeup signals through the deferred path, which sets
IO_EVENTFD_OP_SIGNAL_BIT. Without 04fe9aeb4f3c, io_eventfd_do_signal()
never clears that bit, so each later deferred signal is skipped.
Where it applies: cd305ee3633a is in 6.18.49 and 6.12.114. 04fe9aeb4f3c
(Fixes: 60b6c075e8eb, in v7.1, no stable tag) is in neither branch, and
I didn't find a copy in the stable queue. I read this in the source of
the linux-6.18.y and linux-6.12.y heads, but I didn't run those kernels.
If this is correct, a backport of 04fe9aeb4f3c to 6.18.y and 6.12.y
looks like the right fix; it keeps the CVE-2026-80920 fix in place. The
6.12.y code differs, so it may need a small change. I will obviously
leave the fix to you, but I'm happy to test a candidate on the affected
Ubuntu kernel.
Thanks,
Nathan - Founder, Lead Developer @ Rebased, Inc.
---
Affected:
linux-aws 7.0.0-1016.17 and 7.0.0-1018.19 (-proposed). linux master-next
7.0.0-44.44 also lacks the clear. cd305ee3633a arrived in linux 7.0.0-39.39
("Upstream stable to v6.18.49, v7.1.13"). 04fe9aeb4f3c reached v7.1 in the main
release, not in a 7.1.y update, so the stable updates didn't carry it.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2174458
Title:
io_uring: registered eventfd signals only once after the cd305ee3633a
backport (7.0.0-1016-aws)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2174458/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs