diff options
author | Dylan Yudaken <dylany@fb.com> | 2022-02-22 19:17:51 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-02 13:47:48 +0300 |
commit | 0d773aaf5a90e2856301bd30781bf107db917a66 (patch) | |
tree | 8f31a09bc17732c3c33e7d8cbcda9190e4e964d6 /security | |
parent | 7c83437fb3aeda489638304edf7c386b16e7cc5b (diff) | |
download | linux-0d773aaf5a90e2856301bd30781bf107db917a66.tar.xz |
io_uring: disallow modification of rsrc_data during quiesce
commit 80912cef18f16f8fe59d1fb9548d4364342be360 upstream.
io_rsrc_ref_quiesce will unlock the uring while it waits for references to
the io_rsrc_data to be killed.
There are other places to the data that might add references to data via
calls to io_rsrc_node_switch.
There is a race condition where this reference can be added after the
completion has been signalled. At this point the io_rsrc_ref_quiesce call
will wake up and relock the uring, assuming the data is unused and can be
freed - although it is actually being used.
To fix this check in io_rsrc_ref_quiesce if a resource has been revived.
Reported-by: syzbot+ca8bf833622a1662745b@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220222161751.995746-1-dylany@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions