DoS vulnerability in timeout handling on older kernels #1446
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Denial of Service (DoS) vulnerability in
liburing
's timeout handling on older Linux kernels (those withoutIORING_FEAT_EXT_ARG
).The vulnerability occurs when an application uses a timeout function and a user-submitted operation happens to have the same
user_data
as the internal secret ID used for timeouts. In this scenario, the_io_uring_get_cqe
function would return a success code while providing aNULL
completion event pointer. This leads to a immediate NULL pointer dereference and crashes the application, resulting in a Denial of Service.The patch modifies the
_io_uring_get_cqe
function insrc/queue.c
. It adds a crucial check to ensure that if a success code (err >= 0
) is about to be returned, a valid completion event pointer (cqe
) must exist. If not, the function now correctly returns-EAGAIN
instead of a misleading success code, preventing the application crash.