Files
xemu/util
Stefan Hajnoczi c31a445749 aio-posix: fix fdmon-io_uring.c timeout stack variable lifetime
io_uring_prep_timeout() stashes a pointer to the timespec struct rather
than copying its fields. That means the struct must live until after the
SQE has been submitted by io_uring_enter(2). add_timeout_sqe() violates
this constraint because the SQE is not submitted within the function.

Inline add_timeout_sqe() into fdmon_io_uring_wait() so that the struct
lives at least as long as io_uring_enter(2).

This fixes random hangs (bogus timeout values) when the kernel loads
undefined timespec struct values from userspace after the original
struct on the stack has been destroyed.

Reported-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20251104022933.618123-3-stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2025-11-11 17:32:48 +01:00
..
2025-10-01 08:33:24 +02:00
2023-12-19 19:03:38 +01:00
2025-01-16 20:57:17 -08:00
2024-09-20 10:00:27 +03:00
2025-10-01 08:33:24 +02:00
2024-09-13 20:11:13 +02:00
2025-03-10 17:07:16 +08:00
2025-10-01 11:22:07 -04:00
2025-01-29 11:43:04 -03:00
2024-06-21 09:47:22 -03:00
2025-10-03 09:48:02 -04:00
2025-10-03 09:48:02 -04:00
2023-08-31 19:47:43 +02:00
2023-11-15 12:06:05 +03:00
2025-10-28 12:39:59 +01:00
2024-06-19 12:42:03 +02:00
2023-11-03 09:20:31 +01:00