Skip to content
Commit c1c03ee7 authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring/rsrc: fixup io_clone_buffers() error handling



Jann reports he can trigger a UAF if the target ring unregisters
buffers before the clone operation is fully done. And additionally
also an issue related to node allocation failures. Both of those
stemp from the fact that the cleanup logic puts the buffers manually,
rather than just relying on io_rsrc_data_free() doing it. Hence kill
the manual cleanup code and just let io_rsrc_data_free() handle it,
it'll put the nodes appropriately.

Reported-by: default avatarJann Horn <jannh@google.com>
Fixes: 3597f278 ("io_uring/rsrc: unify file and buffer resource tables")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent bd2703b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment